orderedHypergeometric: Ordered Hypergeometric Test
Description
Perform a series of hypergeometric tests (a.k.a. Fisher's Exact tests), on a ranked list of genes ordered
by significance against a list of annotation genes. The hypergeometric tests are executed with
increasingly larger numbers of genes representing the top genes in order of decreasing scores.
The lowest p-value of the series is returned as the optimal enriched intersection of the ranked list of genes
and the biological term (pathway).
The index of genelist such that genelist[1:ind]
gives the lowest p-value
Arguments
genelist
Character vector of gene names, assumed to be ordered by decreasing importance.
For example, the genes could be ranked by decreasing significance of differential expression.
background
Character vector of gene names. List of all genes used as a statistical background (i.e., the universe).
annotations
Character vector of gene names. A gene set representing a functional term, process or biological pathway.