calcTPM: Calculate CAGE Tags-Per-Million (TPM)

Description Usage Arguments Value See Also Examples

View source: R/calc.R

Description

Normalize CAGE-tag counts into TPM values.

Usage

1
2
3
4
5
6
7
calcTPM(
  object,
  inputAssay = "counts",
  outputAssay = "TPM",
  totalTags = NULL,
  outputColumn = "totalTags"
)

Arguments

object

RangedSummarizedExperiment: CAGE data quantified at CTSS, cluster or gene-level.

inputAssay

character: Name of assay holding input expression values.

outputAssay

character: Name of assay to hold TPM values.

totalTags

character or NULL: Column in colData holding the total number of tags for each samples. If NULL, this will be calculated using calcTotalTags.

outputColumn

character: Name of column in colData to hold number of total tags, only used if totalTags is NULL.

Value

object with TPM-values added as a new assay. If totalTags is NULL, total tags added as a column in colData.

See Also

Other Calculation functions: calcBidirectionality(), calcComposition(), calcPooled(), calcShape(), calcSupport(), calcTotalTags(), subsetByBidirectionality(), subsetByComposition(), subsetBySupport()

Examples

1
2
3
4
5
6
7
8
9
data(exampleUnidirectional)

# Calculate TPM:
calcTPM(exampleUnidirectional)

# Use pre-calculated total number of tags:
calcTPM(exampleUnidirectional,
        outputAssay='TPMsupplied',
        totalTags='totalTags')

CAGEfightR documentation built on Nov. 8, 2020, 5:42 p.m.