mbecRunCorrections: Run Correction Pipeline

Description Usage Arguments Value Examples

View source: R/mbecs_corrections.R

Description

Run all correction algorithms selected by method and add corrected counts as matrices to the data-set.

Usage

1
2
3
4
5
6
7
mbecRunCorrections(
  input.obj,
  model.vars = c("batch", "group"),
  type = "clr",
  method = c("ruv3", "bmc", "bat", "rbe", "pn", "svd"),
  nc.features = NULL
)

Arguments

input.obj

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

model.vars

two covariates of interest to select by first variable selects panels and second one determines coloring

type

One of 'otu', 'tss' or 'clr' to determine the abundance matrix to use for evaluation.

method

algorithms to use

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

Value

an object of class MbecDataSet

Examples

1
2
3
4
5
6
7
8
9
# This call will use 'ComBat' for batch effect correction and store the new
# counts in a list-obj in the output.
study.obj <- mbecRunCorrections(input.obj=dummy.mbec,
model.vars=c("batch","group"), method=c("bat","bmc"))

# This call will use 'Percentile Normalization' for batch effect correction
# and replace the old count matrix.
study.obj <- mbecRunCorrections(dummy.mbec, model.vars=c("batch","group"),
method=c("pn"))

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