Applies one of two normalization/scaling approaches supported by Seurat.

scNormScale(
  object,
  method = "SCT",
  vars2regress = NULL,
  enable.parallelization = T,
  n.workers = 1,
  max.memory = (20480 * 1024^2),
  variable.features.n = NULL,
  variable.features.rv.th = 1.3,
  return.only.var.genes = F,
  mean.cutoff = c(0.1, 8),
  dispersion.cutoff = c(1, Inf),
  conserve.memory = FALSE,
  assay = "RNA",
  verbose = F,
  ...
)

Arguments

object

Seurat Object

method

Character specifying data normalization and scaling method. One of:

  • "NFS" - Seurat's NormalizeData, FindVariableFeatures, ScaleData workflow. Parameters are set to use LogNormalization method with a scale.factor of 1000. Variable features are selceted using 'mvp' method, and var2regress is regressed out during data scaling.

  • "SCT" - Default. SCTransform workflow; Uses regularized negative binomial regression to normalize UMI count data.

vars2regress

Character vector specifying which variables to regress out during data scaling.

enable.parallelization

Logical specifying whether to enable parallelization. Default is T.

max.memory

Max memory to use during parallel processing. Default is 20480 * 1024^2

variable.features.n

If method = SCT, integer that specifies number of variable features to retrieve. If specified, overrides variable feature threshold specified by `variable.features.rv.th`.

variable.features.rv.th

If method = SCT, numerical that specifies residual variance theshold for variable features. Default is 1.3.

return.only.var.genes

If method = SCT, logical that specifies whether only variable genes are retrieved.

mean.cutoff

If method = NFS, a two-length numeric vector with low- and high-cutoffs for feature means.

dispersion.cutoff

If method = NFS, a two-length numeric vector with low- and high-cutoffs for feature dispersions.

conserve.memory

If set to TRUE the residual matrix for all genes is never created in full; useful for large data sets, but will take longer to run; this will also set return.only.var.genes to TRUE; default is FALSE.

assay

Name of assay to pull the count data from; default is 'RNA'

verbose

print progress report. Default is FALSE.

...

additional parameters passed to SCTransform.

n.works

Number of works to used during parallel processing. Default is 1.

Value

Seurat Object