-
Notifications
You must be signed in to change notification settings - Fork 38
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
Using web history instead of ids returns more results than expected #193
Comments
It looks like
https://www.nlm.nih.gov/dataguide/eutilities/history.html#storing-results-to-the-history-server-using-esearch may also have relevant information. rentrez does have |
Many thanks @allenbaron for pointing out that entrez_fetch() also supports |
I can confirm that However,
So in this case I lose a large number of ids. My questions:
Any idea how I can efficently e.g. convert all E.coli BioSample IDs to Assembly IDs and then fetch the assembly summaries? |
Hi, |
Thanks @vtorda, I suspect my issue is different. I would not expect all biosamples to have a corresponding assembly but for e.g. Escherichia coli I would expect to find many biosamples and also many assemblies. If I query the NCBI Assembly database directly:
So if I look for E. coli assemblies directly, I get 20k of them (FYI, there are currently >250k assemblies overall on NCBI), however, if I first look for E. coli biosamples and then link them to assemblies, I get 294. Since all assemblies have corresponting biosamples, I would expect to get the same number of assemblies from 1. requesting biosample ids and converting to assembly ids and 2. requesting assembly ids directly. |
When I run
entrez_search()
withuse_history
andretmax = 5
, the function will respect this and return 5 UIDs:When I convert these to assembly UID without using web history, the
entrez_link()
will return 5 UIDs, as expected:However, when I use the web history, the function will return more than 5 UIDs:
Even if I set
retmax
:It seems this is not an
entrez_link()
thing, it also occurs e.g. withentrez_fetch()
:Again, ids instead of web history work fine:
Any idea what is going on here? Many thanks.
The text was updated successfully, but these errors were encountered: