mbecRUV3: Remove Unwanted Variation 3 (RUV-3)

Description Usage Arguments Details Value

View source: R/mbecs_corrections.R

Description

This algorithm requires negative control-features, i.e., OTUs that are known to be unaffected by the batch effect, as well as technical replicates. The algorithm will check for the existence of a replicate column in the covariate data. If the column is not present, the execution stops and a warning message will be displayed.

Usage

1
mbecRUV3(input.obj, model.vars, type = "clr", nc.features = NULL)

Arguments

input.obj

phyloseq object or numeric matrix (correct orientation is handeled internally)

model.vars

Vector of covariate names. First element relates to batch.

type

Which abundance matrix to use, one of 'otu, tss, clr'. DEFAULT is 'clr'.

nc.features

(OPTIONAL) A vector of features names to be used as negative controls in RUV-3. If not supplied, the algorithm will use an 'lm' to find pseudo-negative controls

Details

The input for this function is supposed to be an MbecData object that contains total sum-scaled and cumulative log-ratio transformed abundance matrices. Output will be a matrix of corrected abundances.

Value

A matrix of batch-effect corrected counts


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