This is a test version of Biostars. For the public version, visit https://www.biostars.org.
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. enter image description here

ggtree phylogeny tree

I'm pretty sure ggtree automatically 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 a ggtree object? You could them inspect the structure of the object using str() on the object, and even the geom_nodelab function to label the nodes so you can see the ones you are after.

0 answers

No answers yet.

Log in to answer this question.