How to get a Newick file that contains the internal node number
0
1
Entering edit mode
3 months ago
Angels ▴ 10

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 • 358 views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1649 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6