phyper
Hypergeometric tail calculations
|
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, Count_ num_drawn, const Options &options) |
Compute hypergeometric tail probabilities.
double phyper::compute | ( | Count_ | drawn_inside, |
Count_ | num_inside, | ||
Count_ | num_outside, | ||
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 marker lists. The "successes" are the genes in the set, the "failures" are all other genes, and the drawing process typically involves picking the top N markers; our aim is to compute the p-value for enrichment of genes in the set among the top markers.
Count_ | Integer type for the number of genes. |
drawn_inside | Number of genes inside the set that were drawn. |
num_inside | Total number of genes in the set. |
num_outside | Total number of genes outside the set. |
num_drawn | Number of genes that were drawn. |
options | Further options for the calculation. |
drawn_inside
genes from the set, if Options::upper_tail = true
. Otherwise, the probability of randomly drawing no more than drawn_inside
genes from the set. These probabilities are log-transformed in Options::log = true
.