Question: How to retrieve direct children of a taxon through Entrez using taxon IDs
gravatar for zbwrnz
10 weeks ago by
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:[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)[NXLV]&RetMax=1000&RetStart=0

Or use the 'txid2' convention (which I've seen a few places)[NXLV]&RetMax=1000&RetStart=0

I've tried using the UID tag in tandem with NXLV, but only one tag seems to be considered[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 • 216 views
ADD COMMENTlink modified 9 weeks ago by Biostar ♦♦ 20 • written 10 weeks ago by zbwrnz0

how about using the taxdump file to get all the children of a given id ?


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 10 weeks ago by Pierre Lindenbaum104k

Thanks Pierre! I probably should have provided more context. I am currently helping out with an R package that uses entrez ( 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 10 weeks ago by zbwrnz0
Please log in to add an answer.


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