Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Note

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.

Author(s)

Steven Kembel <steve.kembel@gmail.com>

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

Examples

data(phylocom)
unifrac(phylocom$sample, phylocom$phylo)

picante

Integrating Phylogenies and Ecology

v1.8.2
GPL-2
Authors
Steven W. Kembel <steve.kembel@gmail.com>, David D. Ackerly <dackerly@berkeley.edu>, Simon P. Blomberg <s.blomberg1@uq.edu.au>, Will K. Cornwell <cornwell@zoology.ubc.ca>, Peter D. Cowan <pdc@berkeley.edu>, Matthew R. Helmus <mrhelmus@wisc.edu>, Helene Morlon <morlon.helene@gmail.com>, Campbell O. Webb <cwebb@oeb.harvard.edu>
Initial release
2020-06-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.