tpm: Convert count matrix to TPM values

View source: R/tpm.R

tpmR Documentation

Convert count matrix to TPM values

Description

Convert count matrix to TPM values

Usage

tpm(x, gene.length)

Arguments

x

A count matrix or other objects that can be converted to a matrix by as.matrix

gene.length

A numeric vector of the same length as the row count of x, giving gene lengths

Value

transcripts per million (TPM) values

See Also

rpkm2tpm

Examples


testMatrix <- matrix(rnbinom(200, size=5, prob=0.1), nrow=20, ncol=10)
testMatrixGeneLen <- as.integer(10^rnorm(20, mean=3, sd=0.5))
testMatrixTpm <- tpm(testMatrix, testMatrixGeneLen)


bedapub/ribiosNGS documentation built on Feb. 10, 2025, 12:34 a.m.