Unweighted UniFrac distance between communities
Calculates unweighted UniFrac, a phylogenetic beta diversity metric of the the unique (non-shared) fraction of total phylogenetic diversity (branch-length) between two communities.
unifrac(comm, tree)
comm |
Community data matrix |
tree |
Object of class phylo - a rooted phylogeny |
A dist object of the unweighted UniFrac distances between communities (the unique (non-shared) fraction of total phylogenetic diversity (branch-length) between two communities).
The UniFrac distance between samples will include the branch length connecting taxa in those samples and the root of the supplied tree. The root of the supplied tree may not be spanned by any taxa in the sample. If you want the root of your tree to correspond to the most recent ancestor of the taxa actually present in your samples, you should prune the tree before running unifrac
:
prunedTree <- prune.sample(sample,tree)
The supplied tree must be rooted. Single-species samples will be assigned a PD value equal to the distance from the root to the present.
Steven Kembel <steve.kembel@gmail.com>
Lozupone, C., Hamady, M., and Knight, R. 2006. UniFrac - an online tool for comparing microbial community diversity in a phylogenetic context. BMC Bioinformatics 7:371.
data(phylocom) unifrac(phylocom$sample, phylocom$phylo)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.