Skip to content

Instantly share code, notes, and snippets.

View flyboyleo's full-sized avatar
🎯
Focusing

Xin Wang flyboyleo

🎯
Focusing
View GitHub Profile
@slowkow
slowkow / counts_to_tpm.R
Last active March 18, 2024 20:38
Convert read counts to transcripts per million (TPM).
#' Convert counts to transcripts per million (TPM).
#'
#' Convert a numeric matrix of features (rows) and conditions (columns) with
#' raw feature counts to transcripts per million.
#'
#' 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.