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

Multiple PMIDs #131

Closed
agbarnett opened this issue Dec 17, 2018 · 1 comment
Closed

Multiple PMIDs #131

agbarnett opened this issue Dec 17, 2018 · 1 comment

Comments

@agbarnett
Copy link

I'm getting multiple PMIDs when searching for a single PMID, for example:

parse_pubmed_xml(entrez_fetch(db="pubmed", id='29743284', rettype="xml"))$pmid
[1] "29743284" "22116114" "19123933" "20091554" "27544377" "21466679" "10501796" "19657121" "12511679" "8560339"  "17043045" "25923524"
[13] "15507789" "19657122" "22773335" "8237484"  "22019853" "4139420"  "24325929"    "16923978" "19465306" "8950879"  "18165753" "20701962"
[25] "20190623"

The first PMID is the right one, the others seem unrelated. I can easily work around this by just selecting the first PMID, but is there a bigger issue with related data?

@dwinter
Copy link
Member

dwinter commented Dec 17, 2018

Thanks for filing this issue @agbarnett , looks like this is a bug in the way parse_pubmed_xml parses the record (looking for any PMID field, not specifically the one at the top-level of the record).

Will get a fix and test in the next little while. I think you can safetly everything after the first one for now (as the citation info with the correct pmid is in the top of the file).

@dwinter dwinter added the Bug label Dec 17, 2018
@dwinter dwinter self-assigned this Dec 17, 2018
dwinter added a commit that referenced this issue May 2, 2019
Prior to this commit, pubmed records hat contained a lit of cited papers
could generate a "pmid" field in teh pubmed record that included all
pmids. This commit fixes bug #131 and provides a test against
regression.

Thanks @agbarnett for the bug report
@dwinter dwinter closed this as completed May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants