Rooting phylogenetic trees in R using Treeio's root function: Trees don't seem to root.
0
0
Entering edit mode
8 months ago
lingxue • 0

Hi, I have a tree from the MrBayes software that I have loaded into R. As the trees are not rooted, I am trying to root the trees using one of the species (a branch) as the outgroup. However, when I run the root function like so:

x <- root(, outgroup = "Adineta vaga", edgelable = TRUE)

When I plotted it is still not rooted. I cannot fathom why the tree isn't being rooted. Can anyone shed any light on this? Thanks

R MrBayes • 1.0k views
ADD COMMENT
0
Entering edit mode
x <- root(, outgroup = "Adineta vaga", edgelable = TRUE)

Is that really your code? You are missing the tree variable. Also, how do you see the tree is not rooted? Can you post a picture before and after? Also, is there really a taxon named Adineta vaga (with the space) in your tree or is it maybe Adineta_vaga?

ADD REPLY
0
Entering edit mode

Sorry for the trouble caused by the wrong code. x<- root(tr, outgroup = "Adineta_vaga", edgelable = TRUE) After I execute the command, Adineta_vaga is at the bottom of the tree without any change, as shown in the figure. I'm new to R and can't figure out what the problem is. enter image description here

enter image description here

enter image description here

ADD REPLY
0
Entering edit mode

It appears as if it was already rooted in the correct way, then the topology won't change or probably the tree is midpoint rooted and rooting on the outgroup doesn't change the topology. Anyway, if Rotifera is a proper outgroup for your main taxa of interest, then the tree should look like that. The only other thing I would do is probably sort the tree by increasing node order.

ADD REPLY
0
Entering edit mode

Thank you for your answer.

  1. I'm still a little confused. You say the tree seems to be rooted in the right way, so why is the tree still "unrooted"?
  2. I looked up some information, but could not find the operation method of "sort the tree by increasing the node order". Can you give me an example?
  3. I tried to use "coi <- root (tr, outgroup = "Adineta_vaga", nod =339, resolve.root =TURE), then coi is rooted. However, coi does not contain branch length information, as shown in the figure. enter image description here
ADD REPLY
0
Entering edit mode

Unfortunately, I don't know the package well that you are using. Possibly you could try package ape to root the tree? I am not sure why it still say unrooted either. If you have a single tree to depict you could use an external viewer like FigTree or iTOL. The plot may be slightly prettier too. There you can place the root on any branch and see if that changes the big picture.

ADD REPLY
0
Entering edit mode

Thank you for your answer. I have solved the problem. Just remove the node information, like "coi <- root(tr, outgroup = "Adineta_vaga", resolve.root = TRUE)”

ADD REPLY

Login before adding your answer.

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