scSemiProfiler.utils.hyperp

scSemiProfiler.utils.hyperp(N, n1, n2, k)[source]

Returns the pmf of a hypergeometric test.

Parameters
  • N (int) – Population size. In our case this is the total number of gene

  • n1 (int) – The number of element in the first set

  • n2 (int) – The number of element in the second set

  • k (int) – The number of overlap

Return type

mpmath.ctx_mp_python.mpf

Returns

p – cdf

Example

>>> print(hyperp(6000,100,100,97))