Workflows

Gene Ontology enrichment explained

How over-representation and ranked enrichment work, why the background is critical, and how to read GO results without overclaiming.

Gene Ontology enrichment asks whether a list of genes is associated with biological processes, functions or cellular components more than expected by chance. It is a way to summarise a gene list, not a way to prove a mechanism.

What the Gene Ontology is

The Gene Ontology (GO) is a controlled vocabulary organised as a directed acyclic graph. Terms range from broad descriptions to specific ones, and a gene can be annotated to several terms. The three root branches are biological process, molecular function and cellular component.

Annotations are curated from experiments, literature and computational inference. They are not equally reliable. An annotation inferred electronically is weaker evidence than an experimentally validated one, and the evidence code should be checked when a result depends on it.

Over-representation analysis

The classic approach takes a list of genes, such as differentially expressed genes, and asks which GO terms contain more genes from the list than expected.

The test compares the observed overlap with the overlap expected from the background. The background is the set of genes that could have been selected in the experiment, not all genes in the genome. If the experiment measured 12,000 genes, the background should be those 12,000, not the full genome.

Choosing the wrong background is one of the most common causes of a misleading enrichment result. A term that is common in the genome but rare in the measured set can appear enriched only because the background was wrong.

Gene set enrichment analysis

Gene set enrichment analysis (GSEA) uses the full ranked list of genes rather than a cutoff-based list. It asks whether the members of a gene set are concentrated at the top or bottom of the ranking.

This avoids the arbitrary choice of a differential expression cutoff and can detect coordinated small changes that do not pass a per-gene threshold. It still depends on the gene sets, the ranking metric and the background.

p-values and redundancy

An enrichment analysis tests many terms. A correction for multiple testing is necessary, usually a false discovery rate. Report the adjusted value, not only the raw p-value.

GO terms overlap. A significant parent term and a significant child term may describe the same genes. The result table can look like many independent findings when it is really one signal repeated at different levels of specificity. Group related terms or use a method that accounts for the graph structure.

Effect size and gene counts

A term with a very small p-value may contain only a handful of genes. A term with a larger p-value may contain many genes and be more biologically coherent.

Report the number of genes in the term, the number overlapping the list and the fold enrichment or another effect measure. A p-value alone does not tell you whether the result is substantial.

Interpreting the result

An enriched term is a hypothesis about a shared process. It is not evidence that the process is altered in the way the term name suggests. The genes in a term may have different roles, and the annotation may be incomplete.

Look at the genes driving the signal. If a term is enriched because of one well-known gene and several poorly annotated genes, the interpretation is weaker than the p-value suggests. If the term contains a coherent set of genes with a plausible mechanism, the result is more interesting.

Direction and context

Over-representation analysis usually treats the gene list as unordered. If the list contains up- and down-regulated genes together, the result may reflect a process that is affected in both directions. Analyse the directions separately when that distinction matters.

Context matters too. A term may be enriched because of the cell type, the developmental stage or the treatment. A result that is expected from the biology is still a result, but it may not be the novel finding the study is looking for.

Tools and reproducibility

Several tools and R packages perform GO enrichment. They differ in the annotation release, the background handling and the correction method. Record the tool, the version, the annotation release and the settings.

Ontology annotations change over time. A result computed with an old release may not reproduce with a new one. For a publication, state the release date or the version.

A practical workflow

  1. Define the gene list and the background.
  2. Decide whether to analyse directions separately.
  3. Choose over-representation or a ranked method.
  4. Run the analysis with a stated annotation release.
  5. Correct for multiple testing.
  6. Inspect the genes behind each term.
  7. Group redundant terms.
  8. Report the method and the full table.

A worked illustration

Suppose a differential expression study measures 12,000 genes and finds 300 changed. A GO analysis is run against all 20,000 protein-coding genes as the background.

A term for a liver-specific metabolic process is significant. Is that because the treatment changed the process, or because the measured set contains many liver genes and the whole-genome background makes the term look rare? The answer depends on the background.

Re-running with the 12,000 measured genes as the background changes the result. The term may no longer be enriched, or a different term may emerge. The lesson is that the background is part of the hypothesis, not a technical detail.

Key points

  • GO enrichment summarises a gene list; it does not prove a mechanism.
  • The background must match the genes that could have been selected.
  • Correct for multiple testing and account for term redundancy.
  • Report gene counts and effect size, not only p-values.
  • Check the evidence behind the annotations.

Common mistakes

  • Using the whole genome as the background for a targeted panel.
  • Reporting raw p-values without correction.
  • Treating parent and child terms as independent findings.
  • Ignoring the genes that drive a term.
  • Combining up- and down-regulated genes when direction matters.

When to ask for help

If the background is unclear, if the results are dominated by redundant terms, or if the enrichment does not fit the biology, ask for a review. You can order an analysis or read the pathway analysis pitfalls. The RNA-seq Data Analysis course covers enrichment, the RNA-seq workflow shows where the gene list comes from, and the Gene Ontology Consortium provides the annotation resources.

Sources and further reading

When to ask for help. If your data or design do not fit a tutorial, order an analysis and we will reply with a fixed price.

Written by the Solagene team for research and education. Found an error? Tell us and we will correct it.