I need help to add information in my phylogenetic tree on each branch.

I have two pieces of information at my disposal:

1 ) A phylogenetic tree in newick format :


2 ) A matrix with the edge number and information in the Information column:

Edge    Inf
7        0
6        0
5        2
4        1
3        2
2        2
1        2

Does someone have an idea in order to add these informations by creating a NHX format in python (witg ete3 for instance) or with a R package ?

Here is the tree : enter image description here

Thank you for your help


The treedata book has a section on tree annotations that should work for you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.