Question: How to get the outgroup of a rooted tree in R
0
gravatar for Gon
2.5 years ago by
Gon10
Edinburgh, UK
Gon10 wrote:

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

phangorn ape phylogenetics R • 1.4k views
ADD COMMENTlink modified 2.5 years ago by guptapayal8150 • written 2.5 years ago by Gon10
3
gravatar for Brice Sarver
2.5 years ago by
Brice Sarver2.4k
United States
Brice Sarver2.4k wrote:

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 COMMENTlink written 2.5 years ago by Brice Sarver2.4k
0
gravatar for Gon
2.5 years ago by
Gon10
Edinburgh, UK
Gon10 wrote:

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 COMMENTlink written 2.5 years ago by Gon10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 688 users visited in the last hour