How to get the outgroup of a rooted tree in R
1
0
Entering edit mode
8.2 years ago
Gon ▴ 10

Dear all,

I need to identify the outgroup sequence(s) in a series of phylogenetic rooted trees. I've been trying to look for any function in ape or phangorn that does this, but so far I haven't found one. Any ideas?

Thanks!

Gon

ape R phangorn phylogenetics • 4.9k views
ADD COMMENT
3
Entering edit mode
8.2 years ago
Brice Sarver ★ 3.8k

A lot of trees are read in and assumed to be unrooted or rooted on the first taxon, or they can be rooted on the taxon closest to the MRCA of the tree (sometimes with a multifurcation). It really depends on the program/package you're using.

You might have success looking at the last taxon in your tip.label attribute:

library(ape)

a <- read.tree("your_tree.tre")
a$tip.label[length(a$tip.label)]

This might be in a trifurcation with the first taxon, too:

a$tip.label[1]

Alternatively, without getting into too much detail about figuring which is the root edge, etc., try this for a quick answer using R:

a <- read.tree("your_tree.tre")
plot(a)

#now, select the root by clicking on the tree
identify.phylo(a)

#this will return the position of the taxon you clicked on in the vector a$tip.label
ADD COMMENT
0
Entering edit mode

Thanks! Ideally I would've liked to find a function or a more automatized method, but sometimes that's asking too much.

I will use your recommendation, thanks a lot.

ADD REPLY

Login before adding your answer.

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