How to get a Newick file that contains the internal node number
I am trying to visualize and annotate a phylogenetic tree (Newick format) with Ggtree. However, in order to color all the descendents of a respective node, the internal nodes have to be numbered, and I found an author that did something similar to what I want to do, but in his case when he creates a tree object, he gets the internal node number as "node.label" and I was wondering if designed his Newick file in a way that would allow him to have that node.label. If any of you knows of a tool or software I can use to include the internal node number in my Newick file.
• 1,649 views
•
link
0 answers
No answers yet.
Log in to answer this question.
I'm pretty sure
ggtreeautomatically assigns node labels as numeric values when you read in a tree, though it has been a while since I've used it. Have you tried to read your newick tree into R as aggtreeobject? You could them inspect the structure of the object usingstr()on the object, and even thegeom_nodelabfunction to label the nodes so you can see the ones you are after.