Bioinformatics Databases

Lesson 12 of 20 · 11 min

Pathways: KEGG and Reactome

By the end of this lesson you will be able to take a gene you already know by its accession — say BRCA1, NCBI Gene 672, UniProt P38398 — and look up the biological processes it takes part in: which repair pathway it works in, which reactions it catalyses, and which two databases will tell you, in two very different styles.

Every earlier module treated a gene or protein as a record you fetch and read. Useful, but incomplete. A gene never acts alone — it sits in a pathway, a chain of molecular events where the product of one step is the input to the next. A pathway database is a curated map of those events. Two dominate the field, KEGG and Reactome, and they disagree about how a map should be built. Knowing the difference is what lets you pick the right one.

Two ways to draw a pathway

KEGG and Reactome both answer "what does this gene do in context?" but from opposite starting points.

KEGG — the Kyoto Encyclopedia of Genes and Genomes — draws hand-painted pathway maps: a fixed diagram of a process (metabolism, DNA repair, a signalling cascade) onto which every organism's genes are projected. The map is the unit. You ask "which of my genes light up on the homologous-recombination map?"

Reactome takes the reaction as the unit. It is an expert-curated hierarchy of reactions — one molecular event, with defined inputs, outputs, catalysts and a literature citation — nested into sub-pathways and top-level pathways. You ask "which reactions does my protein participate in, and what larger process do they roll up into?"

KEGGReactome
UnitPathway map (a drawing)Reaction (one event)
ID styleOrganism-prefixed, e.g. hsa03440Species-coded stable ID, e.g. R-HSA-5685942
CoverageThousands of organisms, projectedHuman-centred, orthology-inferred elsewhere
Best forEnrichment, cross-species metabolismMechanistic detail, one reaction at a time
LicenseAcademic free; commercial needs a paid licenseFully open (CC0)

KEGG: organism-prefixed maps

KEGG names a gene by gluing a three-letter organism code to a number: hsa:672. The hsa means Homo sapiens; the 672 is literally the same integer as the NCBI Gene ID you met in the NCBI Gene lesson. So hsa:672 is BRCA1 — KEGG just reuses Entrez's number and stamps a species on the front. The mouse ortholog is mmu:12189; swap the prefix, keep the idea.

Pathways are named the same way. hsa03440 is the human Homologous recombination map; strip the organism and you get map03440, the organism-neutral reference diagram every species is projected onto. KEGG also gives each function a KO (KEGG Orthology) identifier — a species-independent label for "the same job across organisms." BRCA1's is K10605. The KO is what makes cross-species comparison work: two genes sharing a KO occupy the same slot on the map, whatever the organism.

BRCA1 lands on seven human maps, including hsa03440 (Homologous recombination), hsa03460 (Fanconi anemia pathway), and hsa05224 (Breast cancer) — its role in guarding the genome shows up on every one.

Reactome: an expert-curated reaction hierarchy

Reactome throws out the fixed drawing. Its stable IDs read R-HSA-5685942: R for Reactome, HSA for the human species code, and a number for the record. A stable ID never gets reused, so it is safe to cite in a paper — the same guarantee any well-formed accession carries.

The content is a tree. At the bottom are individual reactions, each written and reviewed by a domain expert and tied to a PubMed reference. Reactions gather into sub-pathways, sub-pathways into top-level pathways. For BRCA1 the relevant leaf is R-HSA-5685942, "HDR through Homologous Recombination (HRR)," which sits under the broader "DNA Double-Strand Break Repair" pathway. Entries are inferred by orthology, so a human reaction carries into mouse or zebrafish — curated once, then projected outward, the mirror image of KEGG's one-map-many-species trick.

The homologous-recombination pathway around BRCA1

Both databases place BRCA1 in the same story, so it makes a clean side-by-side. Homologous recombination is the high-fidelity way a cell mends a double-strand break: it copies the missing sequence from the intact sister chromatid instead of guessing. BRCA1 is a first responder — it helps mark the break and recruit the machinery that does the copying.

In KEGG you see this as a node on hsa03440, wired to the genes it acts with. In Reactome you see it as a participant in the reactions under R-HSA-5685942, each with its inputs and outputs spelled out. This is exactly why the protein's structure matters: the PDB lesson covered BRCA1's BRCT domain (1JNX) and its RING-domain heterodimer with BARD1 (1JM7) — those are the physical parts doing the pathway's work. Sequence → structure → pathway is the same molecule at three zoom levels.

Pulling pathways down programmatically

KEGG exposes a plain REST interface at https://rest.kegg.jp. Two operations do most of the work: get returns a full record, link returns cross-references. Biopython wraps both in Bio.KEGG.REST:

python
from Bio.KEGG import REST

# Which pathways does BRCA1 (hsa:672) sit on?
for line in REST.kegg_link("pathway", "hsa:672"):
    print(line.strip())
# hsa:672  path:hsa03440   (Homologous recombination)
# hsa:672  path:hsa05224   (Breast cancer)  ... and five more

The equivalent raw call is just a URL you can paste into a browser:

bash
curl https://rest.kegg.jp/link/pathway/hsa:672

Reactome's ContentService is separate and returns JSON — its /data/mapping/UniProt/P38398/pathways endpoint takes the UniProt accession straight and hands back the pathway list, R-HSA-5685942 among them.

Read KEGG's licence before you script against it. The public REST API and web maps are free for academic and personal use only. If you work at a company — or embed KEGG data in a commercial product or service — you need a paid licensed subscription (sold through Pathway Solutions), and hammering rest.kegg.jp from a corporate pipeline without one violates the terms. Reactome, by contrast, is released CC0 with no such restriction. When in doubt about which to build a commercial tool on, that difference alone often decides it. Be gentle either way: throttle your requests and cache what you pull instead of re-fetching.

You now have two lenses on the same gene. Reach for KEGG when you want a whole map or a cross-species metabolic view — it is the backbone of most enrichment analysis, as our GO and KEGG enrichment guide shows. Reach for Reactome when you need the exact reaction, its participants, and the paper behind it. Either way, BRCA1 has stopped being a lone record and become a node in the machinery of the cell.