mHG.statistic.calc: Calculate the minimum-hypergeometric (mHG) statistic.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculates the minimum-hypergeometric (mHG) statistic.
mHG definition: mHG(lambdas) = min over 1 <= n < N of HGT (b_n(lambdas); N, B, n)
Where HGT is the hypergeometric tail: HGT(b; N, B, n) = Probability(X >= b),
and b_n = sum over 1 <= i <= n of lambdas[i].

Usage

1
mHG.statistic.calc(lambdas, n_max = length(lambdas))

Arguments

lambdas

\{0,1\}^N, sorted from top to bottom.

n_max

the algorithm will only consider the first n_max partitions.

Details

O(n_max+B^2*log(B)) running time, O(B) space.

Value

Instance of the class mHG.statistic.info (stores the statistics, and for which n and b_n it was obtained). If several n give the same mHG, the smallest one is chosen.

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 10-11, 18-19)

See Also

mHG.statistic.info-class

Examples

1
2
3
4
5
N <- 50
B <- 15
lambdas <- numeric(50)
lambdas[sample(N, B)] <- 1
mHG.statistic.info <- mHG.statistic.calc(lambdas)@mHG

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