Learn R Programming

picante (version 1.8.2)

unifrac: Unweighted UniFrac distance between communities

Description

Calculates unweighted UniFrac, a phylogenetic beta diversity metric of the the unique (non-shared) fraction of total phylogenetic diversity (branch-length) between two communities.

Usage

unifrac(comm, tree)

Arguments

comm

Community data matrix

tree

Object of class phylo - a rooted phylogeny

Value

A dist object of the unweighted UniFrac distances between communities (the unique (non-shared) fraction of total phylogenetic diversity (branch-length) between two communities).

Warning

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)

References

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.

See Also

pd

Examples

Run this code
# NOT RUN {
data(phylocom)
unifrac(phylocom$sample, phylocom$phylo)
# }

Run the code above in your browser using DataLab