get_TPM {granulator} | R Documentation |
get_TPM
is used to convert raw counts to TPMs,
which is the most suitable normalization for deconvolution.
get_TPM(counts, effLen)
counts |
Bulk RNAseq: a genes (rows) by samples (columns) matrix containing gene raw counts. |
effLen |
Vector of gene lengths. |
Returns a transcript-per-million (TPM)-normalized matrix.
Vincent Kuettel, Sabina Pfister
# get TPMs from raw counts and gene lengths. mat <- round(matrix(rexp(200, rate=.01), ncol=20)) len <- round(matrix(rexp(10, rate=.001), ncol=1))+10 tpm <- get_TPM(mat,as.vector(len))