phylocurve: Generate a rarefaction curve of Phylogenetic Diversity

Description Usage Arguments Details Value References

Description

Calculates a rarefaction curve giving expected phylogenetic diversity (mean and variance) for multiple values of sampling effort. Sampling effort can be defined in terms of the number of individuals, sites or species. Expected phylogenetic diversity is calculated using an exact analytical formulation (Nipperess & Matsen 2013) that is both more accurate and more computationally efficient than randomisation methods.

Usage

1
phylocurve(x, phy, stepm = 1, subsampling = "individual", replace = FALSE)

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.

stepm

is the size of the interval in a sequence of numbers of individuals, sites or species to which x is to be rarefied.

subsampling

indicates whether the subsampling will be by 'individual' (default), 'site' or 'species'. When there are multiple sites, rarefaction by individuals or species is done by first pooling the sites.

replace

is a logical indicating whether subsampling should be done with (TRUE) or without (FALSE - default) replacement.

Details

phylocurve takes community data and a rooted phylogenetic tree (with branch lengths) and calculates expected mean and variance of Phylogenetic Diversity (PD) for every specified value of m individuals, sites or species. m will range from 1 to the total number of individuals/sites/species in increments given by stepm. Calculations are done using the exact analytical formulae (Nipperess & Matsen, 2013) generalised from the classic equation of Hurlbert (1971). When there are multiple sites in the community data and rarefaction is by individuals or species, sites are first pooled.

Value

a matrix object of three columns giving the expected PD values (mean and variance) for each value of m

References


davidnipperess/PDcalc documentation built on July 7, 2021, 1:07 p.m.