This is a test version of Biostars. For the public version, visit https://www.biostars.org.
root to node distance

I want to calculate the relative time from the tree root to the species' creation node for all species in my phylogeny. Is this possible in R?

phylogeny

By time, do you mean actual time - like dates? Or do you just want to know the distance?

These are 2 very different questions.

I’m curious how to do both. Thanks!

To get accurate dates you either need an appropriate molecular clock for your sequences, or ideally actual sequences corresponding to the deep nodes of the tree.

What data do you have?

I used a relaxed molecular clock, my tree is ultrametric

Any ideas on what R code I could use then?

My R isn't fantastic, so I can't give you working code for this, but I'd be amazed if there isn't something in ape or phangorn packages to calculate this. I would consult their documentation.

I'd typically do these types of analyses in python with dendropy or ete3.

Looks promising! Combine that with one or other of their tree traversal methods and you should be able to get a measure of all the relevant paths through the tree

Do you know what function does the tree traversal method in ape? I can't find what I'm looking for in the manual

0 answers

No answers yet.

Log in to answer this question.