Remove unwanted effects from scale.data
RegressOutResid(object, vars.to.regress, genes.regress = NULL,
model.use = "linear", use.umi = FALSE)
Seurat object
effects to regress out
gene to run regression for (default is all genes)
Use a linear model or generalized linear model (poisson, negative binomial) for the regression. Options are 'linear' (default), 'poisson', and 'negbinom'
Regress on UMI count data. Default is FALSE for linear modeling, but automatically set to TRUE if model.use is 'negbinom' or 'poisson'
Returns the residuals from the regression model