compute distance to root of phylogenetic tree
1
0
Entering edit mode
2.1 years ago
bioguy ▴ 50

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.

phylogenetics microbiology • 818 views
ADD COMMENT
0
Entering edit mode
2.1 years ago

Yes, you can try this:

Create a tree

require(ape)
require(phylobase)
x <- as(rtree(50), 'phylo4')

treePlot(x, type = 'fan')

gggg

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

ADD COMMENT

Login before adding your answer.

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