counts_to_tpm: Get transcripts per million

Description Usage Arguments Details Value Author(s)

View source: R/counts_to_tpm.R

Description

Convert read counts to transcripts per million

Usage

1
counts_to_tpm(countMat, geneLengths)

Arguments

countMat

Matrix? -

geneLengths

Vector? -

Details

# Given a gene (or whatever) by sample read count matrix and a length for each gene, return TPM matrix. Follows http://www.rna-seqblog.com/rpkm-fpkm-and-tpm-clearly-explained/ To spell it out a bit more: Gene length / 1000 gives you how many kilobases long the gene is. Count / length-in-kilobases gives you reads per kilobase for that gene. So you've normalized for gene length. Now, get how many millions of reads there are in the sample. And normalize by that. Reads per kilobase, per million reads in the sample.

Value

Matrix - TPM values

Author(s)

Emma Myers


e-myers/rnaseq documentation built on May 20, 2019, 9:14 p.m.