scSemiProfiler.utils.hypert

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

Returns the p-value 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

pval – p-value

Example

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