varRegression: Linear Regression of Sources of Variability
Description
This functions regresses out variability associated with particular sources.
Usage
varRegression(object, vars = NULL, logscale = FALSE, Batch = FALSE)
Value
The function returns an updated SCseq object with the corrected expression matrix written to the slot dimRed$x of the SCseq object.
Arguments
object
SCseq class object.
vars
data.frame of variables to be regressed out. Each column corresponds to a variable and each variable corresponds to a cell.
The object must contain all cells, i.e. column names of the slot ndata from the SCseq object.
logscale
logical. If TRUE data are log-transformed prior to regression. Default is FALSE.
Batch
logical. If TRUE, then the function will regress out batch-associated variability based on genes stored in the filterpar$BGenes
slot of the SCseq object. This requires prior batch correction with the filterdata function using bmode="RaceID".