Skip to contents

Normalize counts either by scran or sctransform.

Usage

sce_norm_fn(sce_cc, norm_type = c("scran", "sctransform", "none"), ...)

scran_normalization(
  sce,
  use_quickcluster = TRUE,
  quickcluster_method = c("igraph", "hclust"),
  BSPARAM = BiocSingular::IrlbaParam(),
  BPPARAM = BiocParallel::SerialParam(),
  ...
)

sctransform_normalization(
  sce,
  vars_to_regress = NULL,
  n_hvg = 3000L,
  method = "glmGamPoi",
  seed = 1L,
  verbose = TRUE,
  ...
)

Arguments

sce_cc

(input target) A SingleCellExperiment object.

norm_type

A character scalar: type of normalization.

...

Passed to scran_normalization() or sctransform_normalization().

sce

A SingleCellExperiment object.

use_quickcluster

A logical scalar: if TRUE, do scran::quickCluster() prior to normalization.

quickcluster_method

A character scalar: clustering method:

  • "igraph" uses graph-based clustering

  • "hclust" uses hierarchical clustering

See ?scran::quickCluster for more details.

BSPARAM

A BiocSingular::BiocSingularParam object.

BPPARAM

A BiocParallel::BiocParallelParam object.

vars_to_regress

A list of character scalars: which variables to regress out during normalization. Passed to Seurat::SCTransform().

n_hvg

An integer scalar: number of HVGs to take. Passed to Seurat::SCTransform().

method

A character scalar: passed to Seurat::SCTransform().

seed

An integer scalar: passed to Seurat::SCTransform().

verbose

A logical scalar: passed to Seurat::SCTransform().

Value

A SingleCellExperiment object. normalization_type = norm_type is appended to metadata() of the returned SingleCellExperiment object. Output target: sce_norm

The following items are added to metadata() of the returned SingleCellExperiment object:

  • normalization_type: value of the norm_type function argument.

  • For norm_type = "sctransform": sctransform_hvg_ids, sctransform_pearson_residuals, sctransform_vst.out, sctransform_model_list.

sctransform_normalization()

Seurat::SCTransform() is returning counts in log1p (natural log) scale, but these are transformed to log2.