mbecTransform: Normalizing Transformations

Description Usage Arguments Details Value Examples

Description

Wrapper to help perform cumulative log-ratio and total sum-scaling transformations ,adapted from packages 'mixOmics' and robCompositions' to work on matrices and Phyloseq objects alike.

Usage

1
mbecTransform(input.obj, method = "clr", offset = 0, required.col = NULL)

Arguments

input.obj

MbecData, phyloseq, list(counts, meta-data)

method

one of 'CLR' or 'TSS'

offset

(OPTIONAL) Offset in case of sparse matrix, for DEFAULT (0) an offset will be calculated if required.

required.col

(OPTIONAL) A vector of column names in the meta-data that need to be present. Sanity check for subsequent steps.

Details

The function returns an MbecData object with transformed counts and covariate information. Input for the data-set can be of type MbecData, phyloseq or a list that contains counts and covariate data. Correct orientation of counts will be handled internally, as long as both abundance table contain sample names.

Value

MbecData with transformed counts in 'clr' and 'tss' attributes respectively.

Examples

1
2
3
4
5
6
7
8
# This will return the cumulative log-ratio transformed counts in an
# MbecData object.
mbec.CLR <- mbecTransform(input.obj=dummy.mbec, method="clr", offset=0,
required.col=c("batch","group"))

# This will return total sum-scaled counts in an MbecData object.
mbec.CLR <- mbecTransform(input.obj=dummy.mbec, method="tss", offset=0,
required.col=c("batch","group"))

buschlab/MBECS documentation built on Jan. 21, 2022, 1:27 a.m.