Get support value of MRCA given a list of tip.label in R newick trees
1
0
Entering edit mode
7 months 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,

Paul

phylogeny newick R ape tree • 492 views
ADD COMMENT
2
Entering edit mode
7 months ago
liorglic ★ 1.4k

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)]
ADD COMMENT
0
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!

ADD REPLY

Login before adding your answer.

Traffic: 2465 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