logCPM: Convert a matrix of raw counts to a matrix of log2(Counts per...

View source: R/util.R

logCPMR Documentation

Convert a matrix of raw counts to a matrix of log2(Counts per Million + 1) values

Description

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

Usage

logCPM(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 log2(CPM + 1) values (matching input)


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