How to retrieve direct children of a taxon through Entrez using taxon IDs
0
0
Entering edit mode
6.4 years ago
zbwrnz • 0

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?

taxonomy entrez eutils • 1.9k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1980 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6