compute distance to root of phylogenetic tree
Does anyone know how to compute the patristic distance between the root node of a phylogenetic tree and every taxon within that tree? Ideally using Dendropy, but will take anything.
• 2,628 views
•
link
1 answer
Yes, you can try this:
Create a tree
require(ape)
require(phylobase)
x <- as(rtree(50), 'phylo4')
treePlot(x, type = 'fan')
Compute patristic distances from root
require(adephylo)
distances <- distRoot(x, method = 'patristic')
distances <- as.data.frame(distances)
head(distances)
distances
t45 3.527083
t17 4.705088
t35 4.619831
t30 3.971527
t34 5.263497
t2 5.297168
Kevin
• 0 views
•
link
Log in to answer this question.
