mHG.pval.calc: Calculate the p-value of a minimum-hypergeometric (mHG)...

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculates the p-value associated with the (minimum-hypergeometric) mHG statistic.

Usage

1
mHG.pval.calc(p, N, B, n_max = N)

Arguments

p

the mHG statistic. It is marked as p as it represents an "uncorrected" p-value.

N

total number of white and black balls (according to the hypergeometric problem definition).

B

number of black balls.

n_max

the algorithm will calculate the p-value under the assumption that only the first n_max partitions were taken into account in determining the mHG statistic.

Details

O(NB) running time, O(NB) space.

Value

the p-value of the test.

Author(s)

Kobi Perl

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 (pages 11-12, 19-20)

Examples

1
2
3
4
5
6
N <- 50
B <- 15
lambdas <- numeric(50)
lambdas[sample(N, B)] <- 1
p <- mHG.statistic.calc(lambdas)@mHG
p.corrected <- mHG.pval.calc(p, N, B) # Could have used mHG.test directly

mHG documentation built on May 2, 2019, 2:14 p.m.