calculateCPM {scater}R Documentation

Calculate counts per million (CPM)

Description

Calculate count-per-million (CPM) values from the count data.

Usage

calculateCPM(object, use.size.factors = TRUE)

Arguments

object

an SingleCellExperiment object

use.size.factors

a logical scalar specifying whether the size factors should be used to construct effective library sizes, or if the library size should be directly defined as the sum of counts for each cell.

Value

Matrix of CPM values.

Examples

data("sc_example_counts")
data("sc_example_cell_info")
example_sce <- SingleCellExperiment(
assays = list(counts = sc_example_counts), colData = sc_example_cell_info)
cpm(example_sce) <- calculateCPM(example_sce, use.size.factors = FALSE)


[Package scater version 1.6.3 Index]