R/runNormalization.R
runNormalization.Rd
Wrapper function to run any of the integrated normalization/transformation methods in the singleCellTK. The available methods include 'LogNormalize', 'CLR', 'RC' and 'SCTransform' from Seurat, 'logNormCounts and 'CPM' from Scater. Additionally, users can 'scale' using Z.Score, 'transform' using log, log1p and sqrt, add 'pseudocounts' and trim the final matrices between a range of values.
runNormalization(
inSCE,
useAssay = "counts",
outAssayName = "customNormalizedAssay",
normalizationMethod = NULL,
scale = FALSE,
seuratScaleFactor = 10000,
transformation = NULL,
pseudocountsBeforeNorm = NULL,
pseudocountsBeforeTransform = NULL,
trim = NULL,
verbose = TRUE
)
Input SingleCellExperiment
object.
Specify the name of the assay that should be used.
Specify the name of the new output assay.
Specify a normalization method from `LogNormalize`,
`CLR`, `RC` and `SCTransform` from Seurat or `logNormCounts` and `CPM` from
scater packages. Default NULL
is set which will not run any
normalization method.
Logical value indicating if the data should be scaled using
Z.Score. Default FALSE
.
Specify the `scaleFactor` argument if a Seurat
normalization method is selected. Default is 10000
. This parameter
will not be used if methods other than seurat are selected.
Specify the transformation options to run on the
selected assay. Options include `log2` (base 2 log transformation),
`log1p` (natural log + 1 transformation) and `sqrt` (square root). Default
value is NULL
, which will not run any transformation.
Specify a numeric pseudo value that should be added
to the assay before normalization is performed. Default is NULL
,
which will not add any value.
Specify a numeric pseudo value that should be
added to the assay before transformation is run. Default is NULL
,
which will not add any value.
Specify a vector of two numeric values that should be used
as the upper and lower trim values to trim the assay between these two
values. For example, c(10,-10)
will trim the values between 10
and -10. Default is NULL
, which will not trim the data assay.
Logical value indicating if progress messages should be
displayed to the user. Default is TRUE
.
Output SCE object with new normalized/transformed assay stored.
data(sce_chcl, package = "scds")
sce_chcl <- runNormalization(
inSCE = sce_chcl,
normalizationMethod = "LogNormalize",
useAssay = "counts",
outAssayName = "logcounts")
#> Normalization performed using LogNormalize method.