rpkm2tpm: Convert a RPKM matrix to a TPM matrix

View source: R/tpm.R

rpkm2tpmR Documentation

Convert a RPKM matrix to a TPM matrix

Description

Convert a RPKM matrix to a TPM matrix

Usage

rpkm2tpm(x)

Arguments

x

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

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)
testMatrixRpkm <- edgeR::rpkm(testMatrix, testMatrixGeneLen)
testthat::expect_equal(testMatrixTpm, rpkm2tpm(testMatrixRpkm))


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