Gene Ontology and KEGG Enrichment Analysis Explained for Beginners

BIOINFORMATICS · PRACTICAL GUIDE

Gene Ontology and KEGG Enrichment Analysis Explained for Beginners

Bioinformatics • Beginner guide • 8 minute read
After a differential expression experiment, you often get a long list of genes. The list alone does not tell a story. Enrichment analysis turns it into biology. It asks one simple question. Are genes from one process or pathway present in your list more often than expected by chance?
If the answer is yes, that process may matter in your study. Gene Ontology, called GO, and KEGG are the two main reference systems for this test. This guide explains both in plain language. It also shows how the test works and how to read the results.

What is enrichment analysis?

Imagine a bag with 20,000 gene names. You pick 500 genes that changed in your experiment. Suppose 50 of them are linked to cell division. Is that a lot? It depends on the total number of cell division genes. If only 100 exist in total, finding 50 is striking. If 5,000 exist, finding 50 is not surprising. Enrichment analysis makes this comparison formal. It compares the share of a category in your list with its share in the background. The background is usually all genes that could have been detected. A category is enriched when it appears much more often in your list than in the background.

What is Gene Ontology?

Gene Ontology describes what genes do. It has three branches. Biological Process describes a larger goal, such as DNA repair or cell division. Molecular Function describes a specific activity, such as protein binding. Cellular Component describes where a gene product works, such as the nucleus. Each gene can have several GO terms. Each term sits in a hierarchy. A broad term, such as metabolic process, contains narrower terms, such as lipid metabolic process. Results can therefore look repetitive. If a broad term and several narrow terms appear, they may describe the same signal. Look for the most specific term that still makes sense.

What is KEGG?

KEGG is a set of pathway maps. A pathway shows how genes, proteins, and small molecules work together in steps. Examples include glycolysis, the cell cycle, and the MAPK signalling pathway. GO answers what genes do. KEGG answers how genes work together in a known route. Many studies report both. GO gives a broad view of processes. KEGG gives a focused view of pathways that may be switched on or off. Together, they help you move from a gene list to a testable idea.

How enrichment analysis works in five steps

  • Prepare your gene list. Use genes that passed your filters, for example an adjusted p-value below 0.05. Keep upregulated and downregulated genes separate, because mixing them can hide opposite effects.
  • Choose the background. Use all genes tested in your experiment, not all genes in the genome. A wrong background can create false enrichment.
  • Map genes to terms. Convert gene symbols or Ensembl IDs to one consistent ID type. Check that most genes map well. If many are lost, check the species and ID type first.
  • Run the test. Most tools use a hypergeometric test or Fisher exact test. It asks how likely this result is by chance alone.
  • Correct for multiple testing. You test hundreds of terms at once. Use an adjusted p-value, such as Benjamini-Hochberg false discovery rate. Report that value, not the raw p-value.
  • How to read the results

    A result table has four columns that matter most. The term name tells you the biology. The gene count tells you how many of your genes belong to that term. The adjusted p-value tells you if the result is likely real. The enrichment ratio tells you how much more common the term is in your list. Do not rank by p-value alone. A term with a tiny p-value but only three genes may be less useful than a term with a moderate p-value and thirty genes. Look at count, ratio, and biology together. Ask if the result fits your experiment.

    A quick reading rule

    Start with terms that have an adjusted p-value below 0.05, at least ten genes, and a clear link to your question. Then read the gene names inside those terms. If the same genes drive several terms, you have one signal, not several findings.

    Common mistakes to avoid

  • Using all genes in the genome as the background, not the genes tested.
  • Mixing upregulated and downregulated genes in one list.
  • Reporting raw p-values instead of adjusted p-values.
  • Treating overlapping terms as separate discoveries.
  • Forgetting to state species, ID type, tool version, and database version.
  • Your practical checklist

    Before you run the analysis, write down your gene list, background, species, and cut-offs. After you run it, save the full result table, not only the top ten terms. Note the tool and database version. When you write results, report the adjusted p-value, gene count, and enrichment ratio for each term. For example, 32 DNA repair genes with an adjusted p-value of 0.001 is a hypothesis to test, not a final conclusion.

    Learn enrichment analysis step by step

    Enrichment analysis is easier with guided practice on a real dataset. Our lessons walk through gene lists, backgrounds, and result tables in simple steps.
    Your next step

    A clearer path through your research.

    Tell us where you are stuck. Let’s work out a practical next step.

    MolBio Academy

    MolBio Academy — Molecular Biology and Bioinformatics, Made Simple.