phyloresembl: Pairwise resemblance in Phylogenetic Diversity of ecological...

Description Usage Arguments Details Value References

Description

Calculates the pairwise resemblance (similarity or dissimilarity) in the Phylogenetic Diversity of ecological samples. A variety of PD versions of classic ecological resemblance measures are available as options. Optional abundance weighting is implemented using the method of Nipperess et al. (2010).

Usage

1
phyloresembl(x, phy, incidence = TRUE, method = "sorensen", dissim = TRUE)

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.

incidence

is a logical indicating whether the data are to be treated as incidence (binary presence-absence) or abundance.

method

indicates the particular form of the resemblance index you wish to use. Current options are: 'sorensen' (default - 2a/a+b+c), 'jaccard' (a/a+b+c), 'simpson' (a/a+min(b,c)) and 'faith' (a+0.5d/a+b+c+d).

dissim

is a logical indicating whether the pairwise resemblance values should be similarity or dissimilarity (default)

Details

Takes a community data table and a rooted phylogenetic tree (with branch lengths) and calculates the resemblance in Phylogenetic Diversity (PD-resemblance) of all pairwise combinations of samples/sites. The principles for calculating PD-resemblance on incidence data are discussed by Ferrier et al. (2007). This approach has been extended to include abundance data (Nipperess et al. 2010). When using incidence data, the 'sorensen' option is equivalent to the 'PhyloSor' measure of Bryant et al. (2008), while the 'jaccard' option is equivalent to the 'UniFrac' measure of Lozupone & Knight (2005).

Value

A distance object giving the PD-resemblance of all pairwise combinations of sample/sites in x.

References


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