View source: R/expression_funks.R
| transcriptsPerKilobaseMillion | R Documentation |
Calculates Reads Per Kilobase Million (RPKM) RPKM = (Rg * 10^9) / (T * Lg) where Rg: number of reads mapped to a particular transcript g = count T = total number of transcripts sampled in run Lg: length of transcript g (bases) Note, that because we use gene length in bases and not in kilobases the scaling factor is 10^9 and not 10^6.
transcriptsPerKilobaseMillion(raw.count.tbl, gene.col = "gene",
gene.length.col = "gene.length",
replicate.cols = setdiff(colnames(raw.count.tbl), c(gene.col,
gene.length.col)))
raw.count.tbl |
A data.frame with at least three columns: One must contain gene IDs (accessions), another the genes' lengths, and the other columns are expected to hold the read counts. |
gene.col |
The column name or number in which to find the gene identifier (accessions). Default is 'gene'. |
gene.length.col |
The column name or number in which to find the gene lengths. Default is 'gene.length'. |
replicate.cols |
The names or numbers of the columns in which to find
the raw read counts. Default is |
An extended version of raw.count.tbl with added columns of
the RPKM values, one column for each column of raw reads in argument
replicate.cols.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.