Over-representation analysis: what the numbers mean

A plain guide to gene-set enrichment tests, and how to run one in the browser

Methods Tools September 10, 2026 4 min read views

Most omics experiments end with a list of genes: the ones that changed after a treatment, the ones mutated in a tumor, the hits from a screen. Over-representation analysis (ORA) turns that list into a shorter list of themes by asking one question of every known gene set: does the list contain more of the set's genes than chance would predict?

That is the whole method. It is simple, widely used, and easy to misuse. Here is what the numbers mean, where analyses go wrong, and how to run one in the browser with enrichlite.

Three inputs

  • The gene list. Usually defined by a cutoff, such as adjusted p below 0.05 and fold change above 2. A different cutoff gives a different list.
  • The gene sets. Named groups of genes: a Gene Ontology term, a Reactome pathway, an MSigDB Hallmark. Each set is tested on its own.
  • The background. Every gene that could have ended up in the list. For RNA-seq that is the genes measured and expressed, not the whole genome. For a targeted panel it is the genes on the panel.

The background is the input people forget, and the one that changes results the most. Assume 20,000 genes when the experiment measured 12,000, and every set rich in expressed genes looks enriched whatever the treatment did. In a survey of 186 published analyses, 95 percent of ORA studies used an inappropriate background or did not say which one they used [1].

The test, with numbers

ORA uses the hypergeometric test, the same thing as a one-sided Fisher's exact test. Picture an urn of 18,000 background genes. A set called "mitotic cell cycle" holds 200 of them, about 1.1 percent. Draw 100 genes at random and about 1.1 will be in the set. The experiment's list of 100 genes contains 12 from the set. The probability of 12 or more by chance is about one in a billion (p = 1.1 × 10−9), and the fold enrichment is 12 divided by 1.1, roughly 11.

Now change only the background to 8,000, the honest number if that is what the experiment measured. The expected count becomes 2.5, the fold enrichment about 5, and the p-value 6.5 × 10−6: a thousand times weaker from the same data. Smaller overlaps cross the significance line entirely on this choice alone.

So the p-value measures surprise given the background, not biology. Read it together with the overlap and the fold enrichment: 3 of 8 genes is a high fold with a fragile p-value; 40 of 1,500 can be a tiny p-value with a fold of 1.5.

Multiple testing

One run tests thousands of sets, so at p below 0.05 dozens pass by chance. Benjamini–Hochberg FDR is the usual correction: among terms called significant at FDR 0.05, about 5 percent are expected to be false [2]. Bonferroni divides the threshold by the number of tests and is much stricter; use it when each reported term will be defended on its own. The size of the family matters, which is why enrichlite tests one collection at a time.

Why GO, Reactome, and Hallmark disagree

They are built differently, so the same list gives different answers. Gene Ontology [3] is a hierarchy in which a parent term contains every gene of its children, so one signal is reported several times ("spindle assembly checkpoint", "mitotic cell cycle", "cell cycle"), and many of its annotations are inferred electronically rather than curated. Reactome [4] is a curated set of human pathways with smaller, more specific sets. Hallmark [5] is 50 refined sets built for readability; with 50 tests instead of thousands, its FDR correction is also far lighter. A term at FDR 0.03 in Hallmark and FDR 0.2 in GO can be the same biology under different corrections.

Mistakes that keep appearing

  • A whole-genome background for a filtered experiment. The most common error and the largest.
  • No correction, or raw p-values reported as corrected. Found in 43 percent of analyses in the same survey [1].
  • Treating enrichment as mechanism. "Cell cycle enriched" means the list holds more cell-cycle genes than expected, not that the cells are dividing, and not in which direction expression moved.
  • Not reporting the setup. Tool, version, collection, background, correction, threshold. Without them the result cannot be reproduced.

Running it in the browser

enrichlite does this analysis and nothing else. The gene sets ship with the page, the test runs in the browser, and no gene list leaves the machine, which matters for unpublished or clinical data.

  1. Paste gene symbols. "Load example" inserts 19 mitotic genes for a first run.
  2. Pick the species (human or mouse) and one collection: GO biological process, molecular function, or cellular component, Reactome, or Hallmark.
  3. Pick the background: "Annotated in collection", "All protein-coding", or a custom list pasted from the experiment. The custom list is the right choice for real data.
  4. Choose BH-FDR or Bonferroni and a threshold, then run.

The table gives set size, overlap, fold enrichment, raw p, FDR, Bonferroni, and the overlapping genes. Switch the background on the example list and watch every p-value move. Turn on "Collapse redundant" to fold nested GO terms into one row. "Copy methods" writes a methods paragraph with the background size, genes mapped, correction, threshold, and data versions, ready for a manuscript.

When ORA is the wrong tool

ORA needs a discrete list, which means a cutoff. If every gene has a ranked measurement across the whole transcriptome, a rank-based method such as GSEA uses all of it without a threshold and can find sets whose genes shift modestly but consistently [6]. ORA fits when the list itself is the object: mutated genes, screen hits, a curated panel, or a differential-expression result with a defensible threshold.

Run the analysis in the browser with enrichlite (source on GitHub). See all tools.

References

  1. Wijesooriya, K., Jadaan, S. A., Perera, K. L., Kaur, T., & Ziemann, M. (2022). Urgent need for consistent standards in functional enrichment analysis. PLoS Computational Biology, 18(3), e1009935. doi:10.1371/journal.pcbi.1009935
  2. Benjamini, Y., & Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society: Series B, 57(1), 289–300. doi:10.1111/j.2517-6161.1995.tb02031.x
  3. Gene Ontology Consortium. (2023). The Gene Ontology knowledgebase in 2023. Genetics, 224(1), iyad031. doi:10.1093/genetics/iyad031
  4. Milacic, M., Beavers, D., Conley, P., et al. (2024). The Reactome Pathway Knowledgebase 2024. Nucleic Acids Research, 52(D1), D672–D678. doi:10.1093/nar/gkad1025
  5. Liberzon, A., Birger, C., Thorvaldsdóttir, H., Ghandi, M., Mesirov, J. P., & Tamayo, P. (2015). The Molecular Signatures Database (MSigDB) hallmark gene set collection. Cell Systems, 1(6), 417–425. doi:10.1016/j.cels.2015.12.004
  6. Subramanian, A., Tamayo, P., Mootha, V. K., et al. (2005). Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43), 15545–15550. doi:10.1073/pnas.0506580102

Cite this article

Vidva, R. (2026). Over-representation analysis: what the numbers mean. Robinson Vidva. https://robinsonvidva.com/articles/gene-set-over-representation-analysis.html

Back to All Articles
Share this article: