counts_to_tpm: Convert counts to transcripts per million (TPM).

View source: R/counts_to_TPM.R

counts_to_tpmR Documentation

Convert counts to transcripts per million (TPM).

Description

Convert a numeric matrix of features (rows) and conditions (columns) with raw feature counts to transcripts per million.

Usage

counts_to_tpm(counts, featureLength, meanFragmentLength = rep(1, ncol(counts)))

Arguments

counts

A numeric matrix of raw feature counts i.e. fragments assigned to each gene.

featureLength

A numeric vector with feature lengths.

meanFragmentLength

A numeric vector with mean fragment lengths.

Details

Lior Pachter. Models for transcript quantification from RNA-Seq. arXiv:1104.3889v2

Wagner, et al. Measurement of mRNA abundance using RNA-seq data: RPKM measure is inconsistent among samples. Theory Biosci. 24 July 2012. doi:10.1007/s12064-012-0162-3

Source for the code: https://gist.github.com/slowkow/c6ab0348747f86e2748b

Value

tpm A numeric matrix normalized by library size and feature length.


skimlab/CCSBUtils documentation built on March 30, 2022, 4:52 a.m.