transcriptsPerKilobaseMillion: Calculates Reads Per Kilobase Million (RPKM) RPKM = (Rg *...

View source: R/expression_funks.R

transcriptsPerKilobaseMillionR 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.

Description

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.

Usage

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)))

Arguments

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 setdiff(colnames(raw.count.tbl), c(gene.col, gene.length.col))

Value

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.


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.