Normalize counts either by scran or sctransform.
Source: R/single_sample_norm_clustering.R
sce_norm.RdNormalize 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
SingleCellExperimentobject.- norm_type
A character scalar: type of normalization.
- ...
Passed to
scran_normalization()orsctransform_normalization().- sce
A
SingleCellExperimentobject.- use_quickcluster
A logical scalar: if
TRUE, doscran::quickCluster()prior to normalization.- quickcluster_method
A character scalar: clustering method:
"igraph"uses graph-based clustering"hclust"uses hierarchical clustering
See
?scran::quickClusterfor 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 thenorm_typefunction 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.