etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
781 stars 212 forks source link

Species group not included in get_descendant_taxa() #369

Closed matnguyen closed 6 years ago

matnguyen commented 6 years ago

Example:

ncbi = NCBITaxa()
descendants = ncbi.get_descendant_taxa(1763) # taxid of Mycobacterium

77643, taxid for Mycobacterium tuberculosis complex (species group) is not in descendants.

Is this the intended behavior? How can I obtain species group in the get_descendant_taxa() output?

jhcepas commented 6 years ago

you need to turn intermediate_nodes into True:


In [4]: 77643 in  ncbi.get_descendant_taxa(1763, intermediate_nodes=True)```