Compute normalized expression values from count data in a SingleCellExperiment object, using the size factors stored in the object.
This function is now deprecated, use
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
normalizeSCE( object, exprs_values = "counts", return_log = TRUE, log_exprs_offset = NULL, centre_size_factors = TRUE, preserve_zeroes = FALSE ) ## S4 method for signature 'SingleCellExperiment' normalize( object, exprs_values = "counts", return_log = TRUE, log_exprs_offset = NULL, centre_size_factors = TRUE, preserve_zeroes = FALSE )
A SingleCellExperiment object.
String indicating which assay contains the count data that should be used to compute log-transformed expression values.
Logical scalar, should normalized values be returned on the log2 scale?
Numeric scalar specifying the pseudo-count to add when log-transforming expression values.
Logical scalar indicating whether size fators should be centred.
Logical scalar indicating whether zeroes should be preserved when dealing with non-unity offsets.
Normalized expression values are computed by dividing the counts for each cell by the size factor for that cell.
This aims to remove cell-specific scaling biases, e.g., due to differences in sequencing coverage or capture efficiency.
log=TRUE, log-normalized values are calculated by adding
log_exprs_offset to the normalized count and performing a log2 transformation.
Features marked as spike-in controls will be normalized with control-specific size factors, if these are available. This reflects the fact that spike-in controls are subject to different biases than those that are removed by gene-specific size factors (namely, total RNA content). If size factors for a particular spike-in set are not available, a warning will be raised.
centre_size_factors=TRUE, all sets of size factors will be centred to have the same mean prior to calculation of normalized expression values.
This ensures that abundances are roughly comparable between features normalized with different sets of size factors.
By default, the centre mean is unity, which means that the computed
exprs can be interpreted as being on the same scale as log-counts.
It also means that the added
log_exprs_offset can be interpreted as a pseudo-count (i.e., on the same scale as the counts).
preserve_zeroes=TRUE and the pseudo-count is not unity, size factors are instead centered at the specified value of
The log-transformation is then performed on the normalized expression values with a pseudo-count of 1, which ensures that zeroes remain so in the output matrix.
This yields the same results as
preserve_zeroes=FALSE minus a matrix-wide constant of
In some cases, the function will return a DelayedMatrix with delayed division and log-transformation operations.
This requires that the assay specified by
exprs_values contains a DelayedMatrix, and only one set of size factors is used for all features.
This avoids the need to explicitly calculate normalized expression values across a very large (possibly file-backed) matrix.
A SingleCellExperiment object containing normalized expression values in
and log-normalized expression values in
All size factors will also be centred in the output object if
Davis McCarthy and Aaron Lun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.