mbecRUV2: Remove unwanted Variation 2 (RUV-2)

Description Usage Arguments Details Value

View source: R/mbecs_corrections.R

Description

Estimates unknown BEs by using negative control variables that, in principle, are unaffected by treatment/study/biological effect (aka the effect of interest in an experiment). These variables are generally determined prior to the experiment. An approach to RUV-2 without the presence of negative control variables is the estimation of pseudo-negative controls. To that end an lm or lmm (depending on whether or not the study design is balanced) with treatment is fitted to each feature and the significance calculated. The features that are not significantly affected by treatment are considered as pseudo-negative control variables. Subsequently, the actual RUV-2 function is applied to the data and returns the p-values for treatment, considering unwanted BEs (whatever that means).

Usage

1
mbecRUV2(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 vector of p-values.

Value

A vector of p-values that indicate significance of the batch-effect for the features.


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