geneLevelStats: geneLevelStats

View source: R/geneLevel.R

geneLevelStatsR Documentation

geneLevelStats

Description

Aggregates bin-level statistics to the gene-level

Usage

geneLevelStats(
  se,
  coef = NULL,
  excludeTypes = NULL,
  includeTypes = NULL,
  returnSE = TRUE,
  minDensityRatio = 0.1,
  minWidth = 20,
  excludeGeneAmbiguous = TRUE
)

Arguments

se

A 'RangedSummarizedExperiment' containing the results of one of the DEU wrappers.

coef

The coefficients tested (if the model included more than one term).

excludeTypes

Vector of bin types to exclude.

includeTypes

Vector of bin types to include (overrides 'excludeTypes')

returnSE

Logical; whether to return the updated 'se' object (default), or the gene-level table.

minDensityRatio

Minimum ratio of read density (with respect to the gene's average) for a bin to be included.

minWidth

Minimum bin width to include

excludeGeneAmbiguous

Logical; whether to exclude bins which are ambiguous (i.e. can be from different genes)

Value

If 'returnSE=TRUE' (default), returns the 'se' object with an updated 'metadata(se)$geneLevel' slot, otherwise returns the gene-level data.frame.

Examples

library(SummarizedExperiment)
data(example_bin_se)
se <- diffSpliceWrapper(example_bin_se, ~condition)
se <- geneLevelStats(se, includeTypes="3UTR")
head(metadata(se)$geneLevel)

ETHZ-INS/diffUTR documentation built on Nov. 3, 2024, 6:26 p.m.