tpm.on.subset: Function tpm.on.subset

Description Usage Arguments Details Value Author(s) Examples

View source: R/convertCounts.R

Description

Use this to calculate TPM for a heavily subsetted DGEobj. It calculates TPM using the original data but returns a DGEobj with the subset.

Usage

1
tpm.on.subset(dgeo, applyFilter = TRUE)

Arguments

dgeo

A DGEobj data structure

applyFilter

If TRUE, reduces to the filtered gene list. FALSE returns all genes in the raw data. [Default = TRUE]

Details

Takes a DGEObj as input. Uses all data (pre-genefiltering; counts_orig) to calculate TPM values. Then optionally filters any genes that were already filtered out.

For GeneLength in the calculation, it takes geneData$ExonLength (for Omicsoft data) or uses rowMeans(effectiveLength) for data derived from Xpress.

Internally it uses edgeR::fpkm to calculate fpkm and converts to tpm using the formula provided by [Harold Pimental](https://haroldpimentel.wordpress.com/2014/05/08/what-the-fpkm-a-review-rna-seq-expression-units/).

Value

A matrix in the new unit space

Author(s)

John Thompson, jrt@thompsonclan.org

Examples

1
myTPM <- tpm(dgeobj)

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.