normalizeCounts.Rd
Performs normalization, transformation, and/or scaling on a counts matrix
normalizeCounts(counts, normalize = c("proportion", "cpm", "median", "mean"), transformation.fun = NULL, scale.fun = NULL, pseudocount.normalize = 0, pseudocount.transform = 0)
counts | A count matrix |
---|---|
normalize | Character. Divides counts by the library sizes for each cell. One of "proportion", "cpm", "median", or "mean". "proportion" uses the total counts for each cell as the library size. "cpm" divides the library size of each cell by one million to produce counts per million. "median" divides the library size of each cell by the median library size across all cells. "mean" divides the library size of each cell by the mean library size across all cells. |
transformation.fun | Function. Applys a transformation such as `sqrt`, `log`, `log2`, `log10`, or `log1p`. If NULL, no transformation will be applied. Occurs after normalization. Default NULL. |
scale.fun | Function. Scales the rows of the normalized and transformed count matrix. Default NULL. |
pseudocount.normalize | Numeric. Add a pseudocount to counts before normalization. Default 0. |
pseudocount.transform | Numeric. Add a pseudocount to normalized counts before applying the transformation function. Adding a pseudocount can be useful before applying a log transformation. Default 0. |
Matrix, the normalized counts matrix.