Package: pubmed-lookup
pubmed-lookupis a Python package to lookup PubMed records and make Publication objects with info about a scientific publication.Source code is available on GitHub atmfcovington/pubmed-lookup.InstallationUsageCommand-Line Toolspubmed-citationpubmed-urlRevision HistoryInstallationPyPIpipinstallpubmed-lookupGitHub (development branch)pipinstallgit+http://github.com/mfcovington/pubmed-lookup.git@developUsageRetrieve a PubMed record:frompubmed_lookupimportPubMedLookup# NCBI will contact user by email if excessive queries are detectedemail=''url='http://www.ncbi.nlm.nih.gov/pubmed/22331878'lookup=PubMedLookup(url,email)Create a Publication object:frompubmed_lookupimportPublicationpublication=Publication(lookup)# Use 'resolve_doi=False' to keep DOI URLAccess the Publication object’s attributes:print("""
TITLE:\n{title}\n
AUTHORS:\n{authors}\n
JOURNAL:\n{journal}\n
YEAR:\n{year}\n
MONTH:\n{month}\n
DAY:\n{day}\n
URL:\n{url}\n
PUBMED:\n{pubmed}\n
CITATION:\n{citation}\n
MINICITATION:\n{mini_citation}\n
ABSTRACT:\n{abstract}\n
""".format(**{'title':publication.title,'authors':publication.authors,'journal':publication.journal,'year':publication.year,'month':publication.month,'day':publication.day,'url':publication.url,'pubmed':publication.pubmed_url,'citation':publication.cite(),'mini_citation':publication.cite_mini(),'abstract':repr(publication.abstract),}))Output of example:TITLE:
Arabidopsis synchronizes jasmonate-mediated defense with insect circadian behavior.AUTHORS:
Goodspeed D, Chehab EW, Min-Venditti A, Braam J, Covington MFJOURNAL:
Proc Natl Acad Sci U S AYEAR:
2012MONTH:
3DAY:
20URL:http://www.pnas.org/content/109/12/4674PUBMED:http://www.ncbi.nlm.nih.gov/pubmed/22331878CITATION:
Goodspeed D, Chehab EW, Min-Venditti A, Braam J, Covington MF (2012). Arabidopsis synchronizes jasmonate-mediated defense with insect circadian behavior. Proc Natl Acad Sci U S A 109(12): 4674-7.MINICITATION:
Goodspeed D - Covington MF - 2012 - Proc Natl Acad Sci U S AABSTRACT:
Diverse life forms have evolved internal clocks enabling them to monitor time and thereby anticipate the daily environmental changes caused by Earth’s rotation. The plant circadian clock regulates expression of about one-third of the Arabidopsis genome, yet the physiological relevance of this regulation is not fully understood. Here we show that the circadian clock, acting with hormone signals, provides selective advantage to plants through anticipation of and enhanced defense against herbivory. We found that cabbage loopers (Trichoplusia ni) display rhythmic feeding behavior that is sustained under constant conditions, and plants entrained in light/dark cycles coincident with the entrainment of the T. ni suffer only moderate tissue loss due to herbivory. In contrast, plants entrained out-of-phase relative to the insects are significantly more susceptible to attack. The in-phase entrainment advantage is lost in plants with arrhythmic clocks or deficient in jasmonate hormone; thus, both the circadian clock and jasmonates are required. Circadian jasmonate accumulation occurs in a phase pattern consistent with preparation for the onset of peak circadian insect feeding behavior, providing evidence for the underlying mechanism of clock-enhanced herbivory resistance. Furthermore, we find that salicylate, a hormone involved in biotrophic defense that often acts antagonistically to jasmonates, accumulates in opposite phase to jasmonates. Our results demonstrate that the plant circadian clock provides a strong physiological advantage by performing a critical role in Arabidopsis defense.”Command-Line Toolspubmed-citationGet a PubMed record’s citation (both give same result):pubmed-citation22331878pubmed-citationhttp://www.ncbi.nlm.nih.gov/pubmed/22331878Output of example:Goodspeed D, Chehab EW, Min-Venditti A, Braam J, Covington MF (2012). Arabidopsis synchronizes jasmonate-mediated defense with insect circadian behavior. Proc Natl Acad Sci U S A 109(12): 4674-7.Output of example (using--minioption):Goodspeed D - Covington MF - 2012 - Proc Natl Acad Sci U S Apubmed-urlGet a PubMed record’s url (both give same result):pubmed-url22331878pubmed-urlhttp://www.ncbi.nlm.nih.gov/pubmed/22331878Output of example:http://www.pnas.org/content/109/12/4674Output of example (using--doioption):http://dx.doi.org/10.1073/pnas.1116368109Version 0.2.3Revision History0.2.3 2019-10-31Refactor testsTest are requiring biopython>=1.66 to run/passFix error message for Python (3.3+) version checkRemove Python 3.3 and 3.4 from Travis CI config0.2.2 2019-10-31Accommodate publications with no authorsRetain DOI URL when resolving throws URLErrorCatch connection reset errors when resolving DOI URLsIndicate compatibility with recent versions of Python 3 (through 3.7)Update README badges0.2.1 2016-01-22Change import ofpubmed_lookup.command_linethat was causing Travis CI to fail0.2.0 2016-01-22Create command-line tool (pubmed-citation) to quickly retrieve citations for PubMed IDs/URLSCreate command-line tool (pubmed-url) to quickly retrieve article and DOI URLs for PubMed IDs/URLSAdd option to save time by not resolving DOI URL (Publication(pubmed_record, resolve_doi=False))Clean up documentation0.1.5 2016-01-08Add exception for publications that do not have month information (Thanks to Sasha Cuerda!)0.1.4 2015-12-24Resolve PEP8 errorsRefactor code to be cleanerConfigure Landscape and add code health badgeConvert Github installation instructions to install from develop branch0.1.3 2015-07-29Add tests for Publication and PubMedLookupConfigure Travis-CIConfigure CoverallsAdd PyPI, Travis-CI, and Coveralls badges to README0.1.2 2015-06-24Prepare for distribution via PyPI0.1.1 2015-05-26Return an abbreviated citation for a Publication with cite_mini()Change install docs to use GitHub link, since not yet on PyPI0.1.0 2015-05-22Lookup PubMed records and make Publication objects with info about a scientific publication