normalizeCounts {scater} | R Documentation |
Compute (log-)normalized expression values by dividing counts for each cell by the corresponding size factor.
normalizeCounts(x, size_factors, return_log = TRUE, log_exprs_offset = 1, centre_size_factors = FALSE, subset_row = NULL)
x |
A count matrix, with cells in the columns and genes in the rows. |
size_factors |
A numeric vector of size factors for all cells. |
return_log |
Logical scalar, should normalized values be returned on the log2 scale? |
log_exprs_offset |
Numeric scalar specifying the offset to add when log-transforming expression values. |
centre_size_factors |
Logical scalar indicating whether size fators should be centred. |
subset_row |
A vector specifying the subset of rows of |
This function will compute log-normalized expression values from x
.
It will endeavour to return an object of the same class as x
, with particular focus on DelayedMatrix inputs/outputs.
Note that the default centre_size_factors
differs from that in normalizeSCE
.
Users of this function are assumed to know what they're doing with respect to normalization.
A matrix-like object of (log-)normalized expression values.
Aaron Lun
data("sc_example_counts") normed <- normalizeCounts(sc_example_counts, librarySizeFactors(sc_example_counts))