For each GO node, with N genes in the background, M annotated to the node, a study list of n genes of which k are annotated, the p-value is the upper-tail hypergeometric sum \(P = 1 - \sum_{i=0}^{k-1} C(M,i) C(N-M,n-i) / C(N,n)\), the probability of k or more annotated genes by chance (one-tailed Fisher exact test). Optional Bonferroni correction multiplies each p-value by the number of terms and caps at 1.
Usage
Goenr(
hits,
list_size,
term_size,
background_size,
correction = c("none", "bonferroni")
)References
Boyle, E. I., Weng, S., Gollub, J., Jin, H., Botstein, D., Cherry, J. M. and Sherlock, G. (2004), GO::TermFinder–open source software for accessing Gene Ontology information and finding significantly enriched Gene Ontology terms associated with a list of genes, Bioinformatics 20(18), 3710-3715 (PMC3037731). Hypergeometric formula and Bonferroni correction, Algorithm section, p. 3711.
