Skip to content
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

Adding annotation to trees is not possible because of the lack of edge lengths #120

Closed
lhgergo opened this issue Aug 14, 2019 · 4 comments
Closed

Comments

@lhgergo
Copy link

lhgergo commented Aug 14, 2019

Hi!
I have some taxon-specific data, that I'd like to map on the synthetic tree, that I could get by using the tol_induced_subtree(ott_ids) expression. The ott_ids are the following:

201128 252145 779555 694358 542509 271555 770315 490099 730013 338023 857184 623689 755235 50826 850936 619502 301743

Everything had been working fine until I tried to add a given annotation to the tree, using the described method in "Connect your data to the tips of your tree" section of the vignette. When I tried to plot the results using phylo4d I got the following error message:

Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), :
Viewport has zero dimension(s)

I also got a plot, containing species names and the annotations, but the tree is missing from the plot.
image

I've found that in the tree object, produced by tol_induced_subtree() an element edge.length is missing. This was the only difference I found when I compared my dataset to working examples found online. Why is this missing from my object, and how could I solve the problem? Or is it a bug?

Thanks!

@ArthurPERE
Copy link

Hi,

I have the same problem than you, there is no branch length, so I can't see all the nearer species among others.

Dis you find a solution or at least download another tree of life with the branch length.

Thank you

@fmichonneau
Copy link
Member

The trees returned by the Open Tree of Life do not have branch lengths. These trees are only intended to show the relationships and do not include a measure of evolutionary distance. You could add arbitrary branch lengths to the trees so they can be plotted with phylobase. The ape package allows you to plot trees with no branch lengths.

@fmichonneau
Copy link
Member

this is not an issue with rotl per se, closing.

@bschilder
Copy link

bschilder commented May 28, 2022

@lhgergo @ArthurPERE
TimeTree seems to be a better resource for this, but the associated R package timetree hasn't been updated since 2015 and appears to no longer work. Did find the source code here though: https://github.com/cran/timetree

TimeTree also provides a frozen version of a 50k species tree here:
http://www.timetree.org/book

Doesn't take long to read in either:

tr <- ape::read.tree(file = "http://www.timetree.org/public/data/TimetreeOfLife2015.nwk")

Can't seem to find any API documentation for TimeTree, but if I can I'll build it into orthogene (or perhaps its own R package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants