Scales and centers features in the dataset. If variables are provided in vars.to.regress, they are individually regressed against each feautre, and the resulting residuals are then scaled and centered.
ScaleData(object, ...)# S3 method for default
ScaleData(
object,
features = NULL,
vars.to.regress = NULL,
latent.data = NULL,
split.by = NULL,
model.use = "linear",
use.umi = FALSE,
do.scale = TRUE,
do.center = TRUE,
scale.max = 10,
block.size = 1000,
min.cells.to.block = 3000,
verbose = TRUE,
...
)
# S3 method for Assay
ScaleData(
object,
features = NULL,
vars.to.regress = NULL,
latent.data = NULL,
split.by = NULL,
model.use = "linear",
use.umi = FALSE,
do.scale = TRUE,
do.center = TRUE,
scale.max = 10,
block.size = 1000,
min.cells.to.block = 3000,
verbose = TRUE,
...
)
# S3 method for Seurat
ScaleData(
object,
features = NULL,
assay = NULL,
vars.to.regress = NULL,
split.by = NULL,
model.use = "linear",
use.umi = FALSE,
do.scale = TRUE,
do.center = TRUE,
scale.max = 10,
block.size = 1000,
min.cells.to.block = 3000,
verbose = TRUE,
...
)
An object
Arguments passed to other methods
Vector of features names to scale/center. Default is variable features.
Variables to regress out (previously latent.vars in RegressOut). For example, nUMI, or percent.mito.
Extra data to regress out, should be cells x latent data
Name of variable in object metadata or a vector or factor defining
grouping of cells. See argument f
in split
for more details
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 return for scaled data. The default is 10. Setting this can help reduce the effects of feautres that are only expressed in a very small number of cells. If regressing out latent variables and using a non-linear model, the default is 50.
Default size for number of feautres to scale at in a single computation. Increasing block.size may speed up calculations but at an additional memory cost.
If object contains fewer than this number of cells, don't block for scaling calculations.
Displays a progress bar for scaling procedure
Name of Assay to scale
ScaleData now incorporates the functionality of the function formerly known as RegressOut (which regressed out given the effects of provided variables and then scaled the residuals). To make use of the regression functionality, simply pass the variables you want to remove to the vars.to.regress parameter.
Setting center to TRUE will center the expression for each feautre by subtracting the average expression for that feautre. Setting scale to TRUE will scale the expression level for each feautre by dividing the centered feautre expression levels by their standard deviations if center is TRUE and by their root mean square otherwise.