Remove unwanted effects from scale.data
RegressOut(object, latent.vars, genes.regress = NULL, model.use = "linear",
use.umi = F, do.scale = T, do.center = T, scale.max = 10)
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'
Whether to scale the data.
Whether to center the data.
Max value to accept for scaled data. The default is 10. Setting this can help reduce the effects of genes that are only expressed in a very small number of cells.
Returns Seurat object with the scale.data (object@scale.data) genes returning the residuals from the regression model