tsf_paired: tsf_paired

Description Usage Arguments Value

View source: R/pltransform.R

Description

OTU transformation for paired data. Computes within-subject change (in presence for qualitative metrics and abundance for quantitative metrics) between time points for each taxon.

Usage

1
tsf_paired(otu.props, otu.clr, metadata, norm = TRUE)

Arguments

otu.props

Matrix of OTU proportions (rownames = sample IDs, colnames = OTU IDs)

otu.clr

Matrix of CLR-transformed OTU proportions (rownames = sample IDs, colnames = OTU IDs)

metadata

Data frame with three columns: subject identifiers (n unique values, column name "subjID"), sample identifiers (must match row names of otu.tab, column name "sampID"), and time point or group identifier (must have two unique values for paired transformation).

norm

Indicator of whether to normalize the difference to average taxon abundance or not (default TRUE)

Value

List with the following elements. Data matrices have subject identifiers as row names and OTU identifiers as column names.

dat.binary

n x p matrix of data after paired, binary/qualitative transformation

dat.quant.prop

n x p matrix of data after paired, quantitative transformation applied to OTU proportions

dat.quant.clr

n x p matrix of data after paired, quantitative transformation applied to CLR-transformed OTU proportions

avg.prop

n x p matrix with overall average proportion of each taxon


aplantin/pldist documentation built on Feb. 26, 2021, 2:19 p.m.