cpm: Convert a matrix of raw counts to a matrix of Counts per...

View source: R/util.R

cpmR Documentation

Convert a matrix of raw counts to a matrix of Counts per Million values

Description

The input can be a base R matrix or a sparse matrix from the Matrix package.

Usage

cpm(counts)

Arguments

counts

a matrix, dgCMatrix, or dgTMatrix of count values.

Details

This function expects that columns correspond to samples, and rows to genes.

Value

a matrix, dgCMatrix, or dgTMatrix of CPM values (matching input)


AllenInstitute/scrattch.hicat documentation built on Oct. 20, 2023, 6:55 a.m.