Question: How to retrieve direct children of a taxon through Entrez using taxon IDs
0
gravatar for zbwrnz
3 days ago by
zbwrnz0
United States
zbwrnz0 wrote:

I am trying to retrieve the direct children of a taxon from entrez. I can accomplish this easily if I use the taxon name, for example:

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=taxonomy&term=Bacteria[NXLV]&RetMax=1000&RetStart=0

This retrieves all taxa whose immediate parent is 'Bacteria'.

However, taxon names are ambiguous. In this case, 'Bacteria' can refer to either the domain or to a genus of walking sticks (e.g. taxon 629398 from the link above).

So rather than use the term 'Bacteria' in the search, I would like to use the taxon ID.

But I can't directly replace Bacteria with its taxon ID (2)

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=taxonomy&term=2[NXLV]&RetMax=1000&RetStart=0

Or use the 'txid2' convention (which I've seen a few places)

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=taxonomy&term=txid2[NXLV]&RetMax=1000&RetStart=0

I've tried using the UID tag in tandem with NXLV, but only one tag seems to be considered

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=taxonomy&term=2[UID:NXLV]&RetMax=1000&RetStart=0

Using taxon ID ought to be at least as straightforward as using taxon name. Am I missing something?

eutils entrez taxonomy • 90 views
ADD COMMENTlink written 3 days ago by zbwrnz0

how about using the taxdump file to get all the children of a given id ? ftp://ftp.ncbi.nih.gov/pub/taxonomy/

nodes.dmp
---------

This file represents taxonomy nodes. The description for each node includes 
the following fields:

    tax_id                  -- node id in GenBank taxonomy database
    parent tax_id               -- parent node id in GenBank taxonomy database
ADD REPLYlink written 3 days ago by Pierre Lindenbaum102k

Thanks Pierre! I probably should have provided more context. I am currently helping out with an R package that uses entrez (https://github.com/ropensci/taxize). One restriction of this package (by design) is that it does not require downloading and building entire databases. We have a related package, taxizedb, that builds an SQLite database from the taxonomy dump. In this case, getting the direct children is a trivial SQL command.

So, for this project, I would like to get the children just through a simple REST interface, if possible.

ADD REPLYlink written 3 days ago by zbwrnz0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 966 users visited in the last hour