Learn R Programming

pathfindR (version 1.3.0)

hyperg_test: Hypergeometic Distribution-based Hypothesis Testing

Description

Hypergeometic Distribution-based Hypothesis Testing

Usage

hyperg_test(pw_genes, chosen_genes, all_genes)

Arguments

pw_genes

vector of genes in the selected pathway

chosen_genes

vector containing the set of input genes

all_genes

vector of "all" genes (background)

Value

the p-value as determined using the hypergeometric distribution.

Details

To determine whether the `chosen genes` are enriched (compared to a background pool of genes) in the `pw_genes`, the hypergeometric distribution is assumed and the appropriate p value (the value under the right tail) is calculated and returned.

Examples

Run this code
# NOT RUN {
hyperg_test(letters[1:5], letters[2:5], letters)
hyperg_test(letters[1:5], letters[2:10], letters)
hyperg_test(letters[1:5], letters[2:13], letters)
# }

Run the code above in your browser using DataLab