-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-rooting tree with correct branch support labels #89
Comments
A shorter version of my question: How can you re-root a tree after imported using the |
i have the same question... would be nice to have an option built into the ggtree framework that will quickly reroot (or midpoint root) a tree |
I think I have a partial solution. The recently updated R package ape ver 4.0 included a new option in their Therefore, if you simply use If you import a tree using However, there is still one problem. How can I root the tree to the midpoint? I don't think that can be done using the ape |
I'm sorry, but I was wrong about the Therefore, my workflow is the same as in my above comment. (ignore the bold statement, which is wrong). Thanks again, you can close this issue. |
the information attached to the node may not make sense after re-rooting. This is why I didn't implement midpoint method for S4 tree object. see also the discussion in KlausVigo/phangorn#5. |
Hi Guangchuang, Thanks for the link to your discussion with Klaus. This discussion and your comment above clears things up for me. I think if I take a tree with support values as node labels, root or midroot the tree using Hopefully, in the future there could be some way of re-rooting the S4 tree object (via |
I try to split ggtree into two packages, treeio and of course ggtree, which will focus on visualization. Maybe I will implement |
Hi Todd, hi Guangchuang, While I don't have a perfect solution to this issue, I would like to offer a (half-baked) workaround. It appears that the column
I hope this helps in finding a more permanent solution! |
If function |
Hi Michael, Thanks for this tip (it took me a long time to figure that out!). This is what I am doing now. I import the bipartitions file from RAxML using the standard
Presumably, |
been a long time since this thread was active, but I figured I'd post another potentially useful solution... I've been lazily rooting trees and doing various other manipulations using Archaeopteryx. You can then save the modified tree in newick format as long as you select the option "Use brackets for confidence values" in the 'options' menu. After saving the re-rooted/modifed tree you can then read the modified tree using treeio/ggtree This is often the easiest method for me if I need to just quickly plot some metadata along with my tree in ggtree |
I have implemented the |
Hi, still I am getting same issue, but when I used python , I got proper, but other work is still in R only, my file ML, and extension is .nhx |
(Update: 2016-11-11 8:35 AM CST): I added images of the trees I was talking about.
Hi,
I found this recent article from the authors of RAxML, that reviews many tree viewing software. A Critical Review on the Use of Support Values in Tree Viewers and Bioinformatics Toolkits. In the review they evaluate the
root()
function in APE and the developers of APE have updated the software to correctly display support values (when originally stored as node labels) in version 3.5-0.10 (and likely a future version 3.6).My question is, how do I re-root a tree using ggtree methods? Do I use the "ape" package
root()
function to re-root a tree, then plot with ggtree? Currently, CRAN only has ape v3.5 available. How exactly can this be done if I imported the "RaxML_bipartitionsBranchLabels_example.nex" file using theread.raxml()
function?I tried directly re-assigning the
phylo
object within the raxml tree object:raxml_tree@phylo <- root(raxml_tree@phylo, node = 10)
But that creates a tree with incorrect support values.
Here is my code:
Original tree, before any rerooting (with support values):
Re-rooted tree, with incorrect support labels:
I would appreciate any advice on how to re-root phylogenetic trees that show accurate support values after re-rooting using ggtree. FYI, According to the manuscript listed above, iTOL will correctly label the branchs with support values after re-rooting. The tree I used in iTOL is:
"((C,D)1,(A,(B,X)3)2,E);R"
.iTOL tree, re-rooted, displaying correct support labels:
Thanks so much for a great R package. I really like it!
The text was updated successfully, but these errors were encountered: