Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PubMed ID citation support #24

Merged
merged 7 commits into from
Jan 10, 2018
Merged

PubMed ID citation support #24

merged 7 commits into from
Jan 10, 2018

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented Jan 9, 2018

This pull request migrates the previous pmid citations functionality (from NCBI Citation Exporter) to pmcid. This is more accurate because the NCBI Citation Exporter only works for records in PubMed Central. pmid citations are now supported that use the NCBI E-Utilities. pubmed.py enables parsing the XML returned by from E-Utilities into JSON CSL metadata.

Closes #21
Refs https://github.com/ncbi/citation-exporter/issues/3

@dhimmel dhimmel requested a review from agitter January 10, 2018 18:40
Copy link
Member

@agitter agitter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I've only noted possible additional documentation.

@@ -8,3 +8,5 @@ The website Sci-Hub, now in its fifth year of existence, provides gratis access
Sci-Hub brands itself as "the first pirate website in the world to provide mass and public access to tens of millions of research papers."
The website, started in 2011, is run by Alexandra Elbakyan, a graduate student and native of Kazakhstan who now resides in Russia [@doi:10.1126/science.aaf5675; @doi:10.1038/nature.2015.18876].
Elbakyan describes herself as motivated to provide universal access to knowledge [@url:https://engineuring.wordpress.com/2016/03/11/sci-hub-is-a-goal-changing-the-system-is-a-method/; @url:https://www.courtlistener.com/docket/4355308/50/elsevier-inc-v-sci-hub/; @url:http://www.leafscience.org/alexandra-elbakyan/].

Cite the same paper in three ways [@pmid:25648772; @pmcid:PMC4304851; @doi:10.7717/peerj.705].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the behavior that each is treated as a separate reference? We may want to note that behavior in the manubot-rootstock usage instructions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah

citeproc['abstract'] = abstract

citeproc['URL'] = f"https://www.ncbi.nlm.nih.gov/pubmed/{citeproc['PMID']}"
citeproc['type'] = 'article-journal'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is article-journal always the article type? PubMed apparently has books as well. As an example, https://www.ncbi.nlm.nih.gov/pubmed/29227604. It looks like a few other things like the title (BookTitle in the XML) will fail for books.

I'm okay leaving this as an uncovered corner case, but we may want to document that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Previously this would fail. But now I made the failure better documented and have it throw a NotImplementedError. Added a test case

}


def extract_publication_date_parts(article):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly repeat the documentation that article is a PubmedArticle xml element tree

@dhimmel dhimmel merged commit b53f487 into manubot:master Jan 10, 2018
@dhimmel dhimmel deleted the pubmed branch January 10, 2018 21:52
dhimmel added a commit to dhimmel/manubot-rootstock that referenced this pull request Jan 11, 2018
dhimmel added a commit to manubot/rootstock that referenced this pull request Jan 11, 2018
dhimmel added a commit to manubot/rootstock that referenced this pull request Jan 11, 2018
This build is based on
b140c76.

This commit was created by the following Travis CI build and job:
https://travis-ci.org/greenelab/manubot-rootstock/builds/327801824
https://travis-ci.org/greenelab/manubot-rootstock/jobs/327801825

[ci skip]

The full commit message that triggered this build is copied below:

Enable PubMed ID citations (#98)

Upgrade Manubot to manubot/manubot@b53f487

Refs manubot/manubot#24
dhimmel added a commit to manubot/rootstock that referenced this pull request Jan 11, 2018
This build is based on
b140c76.

This commit was created by the following Travis CI build and job:
https://travis-ci.org/greenelab/manubot-rootstock/builds/327801824
https://travis-ci.org/greenelab/manubot-rootstock/jobs/327801825

[ci skip]

The full commit message that triggered this build is copied below:

Enable PubMed ID citations (#98)

Upgrade Manubot to manubot/manubot@b53f487

Refs manubot/manubot#24
dhimmel added a commit to dhimmel/manubot that referenced this pull request Feb 19, 2020
Only applies to manuscripts built on Travis.
adebali pushed a commit to CompGenomeLab/lemur-manuscript-archive that referenced this pull request Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants