tsf_long: tsf_long

Description Usage Arguments Value

View source: R/pltransform.R

Description

OTU transformation for longitudinal data. Computes average within-subject change (in presence for qualitative metrics, abundance for quantitative metrics) during one unit of time for each taxon.

Usage

1
tsf_long(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.

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 longitudinal, binary/qualitative transformation

dat.quant.prop

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

dat.quant.clr

n x p matrix of data after longitudinal, 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.