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
Edge colouring with vector containing continuous data #105
Comments
Speak of the devil: Nevermind - I think I managed to get it working: I just have to check whether the continuous data values are applied to the correct branches. I'll let you know, once I've figured that out. Thanks again for this marvellous tool! |
see http://guangchuangyu.github.io/2016/01/label-edge-number-in-ggtree/ and use:
Here contains more examples you may find useful. |
The data has been applied to the correct branches! Thank you very much for your comment: Yes, indeed, that's how I did it (see also https://groups.google.com/forum/#!topic/bioc-ggtree/4GgivKqVjB8). I'll close this issue. |
This reminds me that I already added this link in FAQ. |
This is probably the wrong place to post this question, but I've been stuck with this problem for quite some time and so I thought I might ask here for help. Apologies in advance, if I should have posted this somewhere else.
I have a phylogenetic tree in "phylo" format and a vector with continuous data that corresponds to the branch/endge lengths of my tree. The continuous data values in the vector are in the same order as the edge lengths on the tree. I would like to colour the branch lengths of my tree according to the continuous data values of my vector. The output tree should look somewhat similar to the "Color tree" shown here:
https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/treeAnnotation.html
I managed to produce such a tree with phytools, following this tutorial:
http://blog.phytools.org/2013/03/neat-new-function-to-color-branches-by.html
But when I try to do this with ggtree, I always get stuck somewhere. I've tried to convert my tree and the associated data into a phylo4d object (see #76), but when i do this the order of the continuous data points no longer corresponds to the original branch lengths. I've also tried to produce a jplace file, but that does not seem to work either for me.
I'm pretty sure there's probably a straightforward way of doing this in ggtree, but currently I just cannot see it. Could you help me with that? Apologies again for the silly question.
The text was updated successfully, but these errors were encountered: