|
phyper
Hypergeometric tail calculations in C++
|
Compute hypergeometric tail probabilities. More...
Classes | |
| struct | Options |
Options for compute(). More... | |
Functions | |
| template<typename Count_ > | |
| double | compute (Count_ drawn_inside, Count_ num_inside, Count_ num_outside, const Count_ num_drawn, const Options &options) |
Compute hypergeometric tail probabilities.
| double phyper::compute | ( | Count_ | drawn_inside, |
| Count_ | num_inside, | ||
| Count_ | num_outside, | ||
| const Count_ | num_drawn, | ||
| const Options & | options ) |
Compute the tail probabilities for the hypergeometric distribution. It is intended for use in quantifying gene set enrichment in a list of top marker genes. The "successes" are the genes in the set, the "failures" are all other genes, and the drawing process typically involves selecting the top markers; our aim is to compute the p-value for enrichment of genes in the set among the top markers.
| Count_ | Integer type of the number of genes. |
| drawn_inside | Number of genes in the gene set that were selected as markers. |
| num_inside | Total number of genes in the gene set. |
| num_outside | Total number of genes outside the gene set. |
| num_drawn | Number of genes that were selected as top markers. |
| options | Further options for the calculation. |
drawn_inside genes from the gene set, if Options::upper_tail = true. Otherwise, the probability of randomly selecting no more than drawn_inside genes from the gene set. These probabilities are log-transformed when Options::log = true.