I made a phylotree using .get_topology on a list, but I cannot add the scientific names and rank to the nodes. Specifically :
from ete3 import NCBITaxa, Tree, TreeStyle, NodeStyle
Ltax = [561863, 333367, 518636, 1262999, 657322, 550540, 44012, 748224, 518636, 1309411]
ncbi = NCBITaxa()
t = ncbi.get_topology(Ltax, intermediate_nodes=False)
I tried using :
tax2names, tax2lineages, tax2rank = t.annotate_ncbi_taxa()
ncbi.annotate_tree(t, taxid_attr='name', tax2name=tax2names, tax2track=tax2lineages, tax2rank=tax2rank)
But it returns empty dictionaries. I want the nodes to have their ranks, sci names and tax ids under corresponding attributes. What am I doing wrong?
Thanks, Arash