phylodiv.estimate: Estimate Phylogenetic Diversity from a sample

phylodiv.estimateR Documentation

Estimate Phylogenetic Diversity from a sample

Description

Estimates total phylogenetic diversity (both detected and undetected) for each sample/site or a set of samples/sites. Estimated phylogenetic diversity is calculated using an extrapolation of the rarefaction curve (Chao et al. 2015). For undetected phylogenetic diversity, this is considered a lower bound.

Usage

phylodiv.estimate(x, phy, subsampling = "individual")

Arguments

x

is the community data given as a data.frame or matrix with species/OTUs as columns and samples/sites as rows (like in the vegan package). Columns are labelled with the names of the species/OTUs. Rows are labelled with the names of the samples/sites. Data can be either abundance or incidence (0/1). Column labels must match tip labels in the phylogenetic tree exactly!

phy

is a rooted phylogenetic tree with branch lengths stored as a phylo object (as in the ape package) with terminal nodes labelled with names matching those of the community data table. Note that the function trims away any terminal taxa not present in the community data table, so it is not necessary to do this beforehand.

subsampling

indicates whether the subsampling will be by 'individual' (default) or 'site'.

Details

phylodiv_estimate takes community data and a rooted phylogenetic tree (with branch lengths) and calculates estimated total Phylogenetic Diversity (PD) for both detected and undetected species. When there are multiple sites in the community data and subsampling is by site, data are converted to incidence (if not already) and then pooled. When subsampling is by individual, estimated PD is calculated for every sample/site.

Value

a list, giving observed and estimated PD values. Each element of the list is a numeric, giving PD values for every sample/site or a single value for pooled samples/sites.

References

  • Chao et al. (2015) Rarefaction and extrapolation of phylogenetic diversity. Methods in Ecology & Evolution 6: 380-388.


davidnipperess/PDcalc documentation built on Dec. 21, 2024, 4:25 p.m.