|
phyper
Hypergeometric tail calculations in C++
|
The phyper library (pronounced "viper") computes the cumulative probability for a hypergeometric distribution, intended for testing overrepresentation of gene sets within a selection of marker genes. The interface is based on R's stats::phyper() function, with support for (log-transformed) probabilities of either tail.
Note that the upper-tailed cumulative probability returned by phyper::compute() includes the probability mass of the observed number of marker genes in the pathway. This means that it can be directly used as the overrepresentation p-value for the pathway. For comparable results from stats::phyper(), users should subtract 1 from the q= argument as inicated above.
Check out the reference documentation for more details.
FetchContentIf you're using CMake, you just need to add something like this to your CMakeLists.txt:
Then you can link to phyper to make the headers available during compilation:
find_package()To install the library, use:
If you're not using CMake, the simple approach is to just copy the files in include/ - either directly or with Git submodules - and include their path during compilation with, e.g., GCC's -I.T