ete3 version 3.1.3 issue

23 views
Skip to first unread message

Elizaveta Kazakova

unread,
Feb 1, 2024, 8:26:23 AM2/1/24
to eteto...@googlegroups.com
Good afternoon,
I am a PhD student in Bioinformatics and I really enjoy using your toolkit. Recently I have encountered a problem when using the module ncbi_taxonomy. I am using it to define the groups of bacterial species and their strains. If I use the NCBITaxa.get_lineage() function for Escherichia coli K-12 (NCBI:txid83333), Escherichia coli species (NCBI:txid562) is listed as a parent taxa. However if I use the NCBITaxa().get_descdendant_taxa() for Escherichia coli, the results do not include Escherichia coli K-12. Could you please help me with this issue?

--
Best regards
Elizaveta Kazakova

dengzi...@gmail.com

unread,
Feb 1, 2024, 8:43:18 AM2/1/24
to The ETE toolkit
Hi Elizaveta!
Thanks for the kind word! The method get_descdendant_taxa() will get the descendant taxa of lowest rank (for example, subspecies) of the given parent, which means it will skip the lineage from the internal nodes by default. If you want to include them, set the argument "intermediate_nodes=True", it will include taxa from the full lineage. 

Example from your case
```
In [7]: ecoli = ncbi.get_descendant_taxa("562", intermediate_nodes=True)
In [8]: 83333 in ecoli
Out[8]: True

In [9]: ecoli = ncbi.get_descendant_taxa("562", intermediate_nodes=False) # default

In [10]: 83333 in ecoli
Out[10]: False
```

Best,
Ziqi
Reply all
Reply to author
Forward
0 new messages