varRegression {RaceID} | R Documentation |
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)
Arguments
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 |
logscale |
logical. If |
Batch |
logical. If |
Value
The function returns an updated SCseq
object with the corrected expression matrix written to the slot dimRed$x
of the SCseq
object.
Examples
sc <- SCseq(intestinalDataSmall)
sc <- filterdata(sc)
b <- sub("(\\_\\d+)$","",colnames(intestinalData))
vars <- data.frame(row.names=colnames(intestinalData),batch=b)
sc <- varRegression(sc,vars)