contrib {otuSummary}R Documentation

Contribution of rare/abundant biosphere to the total Bray-Curtis dissimilarity

Description

function to calculate the contribution (in fraction) of the abundant or rare biosphere to the Bray-Curtis dissimilarity of the whole community.

Usage

contrib(otutab, siteInCol = TRUE, taxhead = NULL, threshold = 1, percent = FALSE,
    check = "rare", write = FALSE, plot = FALSE, ...)

Arguments

otutab

An OTU table of microbial community, which can contain taxonomy in a column or a row.

siteInCol

Logical, if "TRUE", the OTU table contains samples in columns and taxa in rows. The function will decide whether to transpose the OTU table based on this parameter.

taxhead

Character, specify the header of taxonomy, e.g. "taxonomy" if there is a taxonomy column or row. It is NULL by default.

threshold

Numeric, the threshold relative abundance cutoff upon which the rare biosphere will be subset.

percent

Logical, whether the input OTU table are in relative abundance.

check

Character, either "rare" or "abundant", telling the function which biosphere to be check.

write

Logical, if TRUE, the result will be written out as "txt" file, default is FALSE.

plot

Logical, whether the contribution result to be visualized in boxplot. By default is FALSE.

...

arguments to be passed to/from other methods.

Details

In this function, the rare biosphere is defined by the relative abundance cutoffs (argument threshold). The Bray-Curtis distance between pairwise samples was partitioned. The Bray-Curtis measure is a scaled summation of abundance differences between two communities and can thus be partitioned for a subset population from the community (Shade et al 2014, Yang et al 2017).

Value

The function will return a data frame of five columns. The first two columns specify the sample names whose Bray-Curtis distance were calculated. The third and forth columns give the distances respectively based on the whole community OTU data or the subset data. The last column gives the contribution (in fraction, not percentage) of the subset data for each pair of samples.

Author(s)

Sizhong Yang <yanglzu@163.com>

References

Shade A, Jones SE, Caporaso JG, Handelsman J, Knight R, Fierer N et al (2014). Conditionally rare taxa disproportionately contribute to temporal changes in microbial diversity. Mbio 5: e01371-01314.

Yang S, Winkel M, Wagner D, Liebner S (2017). Community structure of rare methanogenic archaea: insight from a single functional group. FEMS Microbiology Ecology: fix126.

Examples

data(otuqiime)

result <- contrib(otutab = otuqiime, siteInCol = TRUE, taxhead = "taxonomy",
    threshold = 1, percent = FALSE, check = "abund", plot = FALSE)

names(result)
head(result)

[Package otuSummary version 0.1.2 Index]