ora: Overrepresentation Analysis

View source: R/enrichment-functions.R

oraR Documentation

Overrepresentation Analysis

Description

ora performs an overrepresentation enrichment analysis (Fisher's test; hypergeometric) given a data set and a list of signatures. This function is a wrapper around contingencyTable and enrichmentTestFisher.

Usage

ora(x, cols, signatures, features = "rownames", alpha = 0.05)

Arguments

x

A SummarizedExperiment with rowData or a data frame.

cols

A character vector containing the names of the columns (must be logical) with the target (TRUE) and reference sets (FALSE).

signatures

A named list with signature sets.

features

A character vector of length 1. In case that x is a SummarizedExperiment, this argument will be used to create the features column. In case that x is a data frame, this argument must indicate the name of the column containing the features names (taxa, genes, etc.).

alpha

Minimum p-value to filter results. Defult is 0.05.

Value

A data frame; a report containing the p-value and odds ratio for each set x signature combination in the input list of contingency tables

See Also

contingencyTable; enrichmentTestFisher; ora

Other enrichment functions: contingencyTable(), enrichmentTestFisher()

Examples

library(misctoolsr)
se <- exampleSE()
sigs <- exampleSignatures()
ora_results <- ora(x = se, cols = c("up", "down"), signatures = sigs)

sdgamboa/misctoolsr documentation built on May 4, 2022, 12:33 p.m.