From a gene list to biology: enrichment tests and their backgrounds
Enrichment analysis tests for unusual patterns involving annotated gene categories in selected or ranked genes. Results depend on the eligible background, annotations, selection effects and test model. Over-representation and rank-based methods can assess different patterns.
What a learner can do afterwards
- Run and interpret an over-representation test against a stated, defensible background set
- Explain how gene length and expression level bias enrichment results
- Compare an over-representation test with a rank-based method on the same data
1 · Read
An over-representation test asks whether a selected list contains unusually many members of a gene category. Let N be the number of eligible genes, K the number in the category, n the list size and k the number of category members in the list. A one-sided hypergeometric test gives the probability of k or more members when n genes are drawn without replacement, with equal selection chances under the null model.
The background contains genes eligible for selection. Exclude genes never measured or removed before selection. Match identifiers and annotations, and count each gene once. If 9,000 genes were measured and 1,500 excluded before testing, 7,500 remain eligible. The selected list is a subset of this background.
Take 10 eligible genes, including 4 category members. Draw 2 and observe both in the category. There are 10 times 9 divided by 2 = 45 possible pairs, including 4 times 3 divided by 2 = 6 category-only pairs. Two is the maximum count, so the upper-tail p-value is 6/45, about 0.133. This exceeds a single-test cutoff of 0.05.
In read-count RNA sequencing, longer transcripts tend to yield more reads at equal transcript abundance. Higher counts can increase power to detect genuine changes. High expression can also aid detection. Category members may therefore have unequal selection chances. Examine these effects and use a suitable bias-aware model when needed. A pattern alone proves neither bias nor biology.
Differential-expression tests compare conditions gene by gene. A cutoff on results can select a list for over-representation. Rank-based methods order eligible genes by a stated statistic, often signed to show change direction for the stated comparison. They test whether category members cluster toward an end of the ranking under a suitable null model. Coordinated shifts below a shortlist cutoff can contribute evidence. Ranking does not automatically remove measurement bias.
An ineligible background cannot support the intended selection inference. Use the eligible set before interpreting significance. Correct for testing many categories and report the procedure. Non-significance does not prove no effect. Different tests can disagree. Check annotation quality and overlapping terms. A small category is not automatically an artefact. Enrichment suggests follow-up; it does not prove pathway activation or causation.
Define the background and test model. Check selection effects, annotations and multiple testing. Interpret support without claiming proof of mechanism.
Lesson, questions and flashcards written for this dataset.
Readings and flashcards written for this dataset.
More to read
Define the random-selection question
First specify which genes could enter the selected list. Within that background, count the members of the category being tested. The basic hypergeometric model samples without replacement and gives eligible genes equal selection chances. Its upper tail measures how often a random list of the observed size would contain at least the observed category count. A large category share alone does not establish significance: background frequency and list size also matter.
Detection power and ranking
A selected gene can reflect a genuine change and the assay's ability to detect that change. Transcript length and expression can affect read counts and detection power. Examine whether category members consequently have different selection chances. A rank-based analysis retains information from eligible genes below a shortlist cutoff. It still needs a stated ranking statistic and null model. Ranking by itself does not remove measurement or selection effects.
Report what the result supports
Report the eligible background, category definitions, test and multiple-testing procedure. Inspect the genes contributing to a term and whether overlapping terms describe the same evidence. A small category may depend strongly on a few genes without being an artefact. Different methods can disagree because they use different information or null models. Statistical enrichment supports a follow-up hypothesis, not proof of activation or causation. Non-significance does not establish that a pathway has no effect.
2 · Watch
Take it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.