mHG-package {mHG} | R Documentation |
Minimum-Hypergeometric Test
Description
Sometimes when running a hypergeometric test to check for enrichment for a feature in a group versus the background, the separation between the group and the background is done arbitrarily by setting a threshold on some other property.
When the correct threshold is unknown, different thresholds can be tried, and the minimal p-value of the hypergeometric tests can be retreived.
If the elements can be sorted according to the property, it is possible to perform the hypergeometric tests on groups of increasing size.
The minimum over all the tests is the minimum hypergeometric statistic, or mHG.
The mHG is not a p-value by itself, as multiple tests were performed, without correcting for this.
The package provides means to calculate the statistic (mHG.statistic.calc), to fix the p-value (mHG.pval.calc) or to perform the entire test at once (mHG.test).
This is an R implementation of the algorithm described in:
Eden, E. (2007). Discovering Motifs in Ranked Lists of DNA Sequences. Haifa.
Retrieved from http://bioinfo.cs.technion.ac.il/people/zohar/thesis/eran.pdf
Details
Package: | mHG |
Type: | Package |
Version: | 1.0 |
Date: | 2015-05-18 |
License: | GPL-2 |
Depends: | methods |
The package provides means to calculate the statistic (mHG.statistic.calc
), to fix the p-value (mHG.pval.calc
) or to perform the entire test at once (mHG.test
).
Author(s)
Kobi Perl <kobipe3@gmail.com>
References
Eden, E. (2007). Discovering Motifs in Ranked Lists of DNA Sequences. Haifa. Retrieved from http://bioinfo.cs.technion.ac.il/people/zohar/thesis/eran.pdf
See Also
mHG.statistic.calc
mHG.pval.calc
mHG.test
Examples
N <- 50
B <- 15
lambdas <- numeric(50)
lambdas[sample(N, B)] <- 1
t <- mHG.test(lambdas)
t <- mHG.test(lambdas, n_max = 20)