root to node distance
0
2
Entering edit mode
4.9 years ago
phylofun ▴ 50

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 • 1.9k views
ADD COMMENT
0
Entering edit mode

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

These are 2 very different questions.

ADD REPLY
0
Entering edit mode

I’m curious how to do both. Thanks!

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

I used a relaxed molecular clock, my tree is ultrametric

ADD REPLY
0
Entering edit mode

Any ideas on what R code I could use then?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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