calcSupport: Calculate support of CAGE data.

Description Usage Arguments Value See Also Examples

View source: R/calc.R

Description

Calculate the number of samples expression a feature above a certain level. This number is refered to as the 'support'.

Usage

1
2
3
4
5
6
calcSupport(
  object,
  inputAssay = "counts",
  outputColumn = "support",
  unexpressed = 0
)

Arguments

object

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

inputAssay

character: Name of assay holding input expression values.

outputColumn

character: Name of column in rowRanges to hold support values.

unexpressed

numeric: Support will be calculated based on features larger than this cutoff.

Value

object with support added as a column in rowRanges.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(exampleUnidirectional)

# Count samples with at at least a single tags
exampleUnidirectional <- calcSupport(exampleUnidirectional,
                                     inputAssay='counts',
                                     unexpressed=0)

# Count number of samples with more than 1 TPM and save as a new column.
exampleUnidirectional <- calcTPM(exampleUnidirectional,
                                 totalTags = 'totalTags')
exampleUnidirectional <- calcSupport(exampleUnidirectional,
                                     inputAssay='TPM',
                                     unexpressed=1,
                                     outputColumn='TPMsupport')

MalteThodberg/CAGEfightR documentation built on Sept. 11, 2021, 4:42 a.m.