normalize {rliger} | R Documentation |
Normalize raw counts data
Description
Perform library size normalization on raw counts input. As for the preprocessing step of iNMF integration, by default we don't multiply the normalized values with a scale factor, nor do we take the log transformation. Applicable S3 methods can be found in Usage section.
normalizePeak
is designed for datasets of "atac" modality, i.e. stored
in ligerATACDataset. S3 method for various container object is
not supported yet due to difference in architecture design.
Usage
normalize(object, ...)
## S3 method for class 'dgCMatrix'
normalize(object, log = FALSE, scaleFactor = NULL, ...)
## S3 method for class 'ligerDataset'
normalize(object, chunk = 1000, verbose = getOption("ligerVerbose", TRUE), ...)
## S3 method for class 'liger'
normalize(
object,
useDatasets = NULL,
verbose = getOption("ligerVerbose", TRUE),
format.type = NULL,
remove.missing = NULL,
...
)
## S3 method for class 'Seurat'
normalize(object, assay = NULL, layer = "counts", save = "ligerNormData", ...)
normalizePeak(
object,
useDatasets = NULL,
verbose = getOption("ligerVerbose", TRUE),
...
)
Arguments
object |
liger object |
... |
Arguments to be passed to S3 methods. The "liger" method calls
the "ligerDataset" method, which then calls "dgCMatrix" method.
|
log |
Logical. Whether to do a |
scaleFactor |
Numeric. Scale the normalized expression value by this
factor before transformation. |
chunk |
Integer. Number of maximum number of cells in each chunk when
working on HDF5 file based ligerDataset. Default |
verbose |
Logical. Whether to show information of the progress. Default
|
useDatasets |
A character vector of the names, a numeric or logical
vector of the index of the datasets to be normalized. Should specify ATACseq
datasets when using |
format.type , remove.missing |
Deprecated. The functionality of these is covered through other parts of the whole workflow and is no long needed. Will be ignored if specified. |
assay |
Name of assay to use. Default |
layer |
Where the input raw counts should be from. Default
|
save |
For Seurat>=4.9.9, the name of layer to store normalized data.
Default |
Value
Updated object
.
dgCMatrix method - Returns processed dgCMatrix object
ligerDataset method - Updates the
normData
slot of the objectliger method - Updates the
normData
slot of chosen datasetsSeurat method - Adds a named layer in chosen assay (V5), or update the
data
slot of the chosen assay (<=V4)normalizePeak
- Updates thenormPeak
slot of chosen datasets.
Examples
pbmc <- normalize(pbmc)