ropensci / rentrez

talk with NCBI entrez using R
https://docs.ropensci.org/rentrez
Other
195 stars 38 forks source link

entrez_link by_id = TRUE with web_history #124

Open willgearty opened 6 years ago

willgearty commented 6 years ago

Right now it appears you can only use by_id = TRUE if you are supplying IDs with id, but it would be great if it also worked when a web_history object is supplied instead.

dwinter commented 6 years ago

As far as I know, this is not possible.

Getting the results organized by ID requires that we use a special format in the call, with "id" specified many times in the URL. If the IDs exist only on the NCBI's servers, then there is no way to format the call in the right way (short of downloading them with entrez_fetch... but that sort of defeats the point of using the web history in the first place)

willgearty commented 6 years ago

Ah, that makes sense. The frustrating thing I'm encountering is that the call removes duplicates upon returning the links, and I then can't figure out which link goes with which ID. I'm getting around it by just chunking through a long list of IDs, but, as you said, it defeats the whole point of having the web history functionality.