Get support value of MRCA given a list of tip.label in R newick trees
Entering edit mode
9 weeks ago
pl.terzian • 0

I am working in R with a tree that has edge, edge.length, Nnode, node.label (the actual support values) and tip.label fields. This tree was build using fasttree.

For each taxonomic group in my tree I can find their MRCA given the list of tip.label passed to the getMRCA() function.

What I am trying to do is to find the support value associated to my MRCAs, meaning the support value to my MRCA subtrees. I can find it manually inspecting the tree with TreeViewer or Archaeopteryx but I found no way to do that in R and I am a bit confused by the structure of node.label in phylo objects.

Maybe I don't use the right key-words to describe what I intent to do, neverless I did not find any trick to do what I want on forums.

Any suggestions/links appreciated,


phylogeny newick R ape tree • 346 views
Entering edit mode
9 weeks ago
liorglic ★ 1.3k

Yes, this is quite confusing, and I wish this could be resolved in one of the phylogeny packages. In any case, here is how you can get it:

mrca = getMRCA(tree, c('sp1','sp2','sp3'))
mrca_label = tree$node.label[mrca-length(tree$tip.label)]
Entering edit mode

Thank you very much, I understand how it works now. Simple trick but not that obvious and definitly not easy to find in documentations!


Login before adding your answer.

Traffic: 957 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6