How To Use KEGG: A Complete Guide To Bioinformatics Pathway Mapping
Master the Kyoto Encyclopedia of Genes and Genomes to map high-throughput genomic data, identify metabolic pathways, and perform functional orthology annotations. By leveraging KEGG Orthology identifiers and advanced mapping tools, researchers can translate raw sequence files into interactive metabolic network models. This step-by-step guide details the precise configurations and diagnostic protocols required for robust biological network reconstruction.
Pre-Analysis Requirements and Database Setup
Before initiating pathway mapping, researchers must format their source biological data to match the precise query specifications of the database. KEGG operates primarily on standardized sequence identifiers, chemical nomenclature, and taxons. Preparing clean, correctly formatted input files prevents processing errors and ensures high annotation coverage rates.
Required Software, Data Assets, and Pre-requisites
- Input Data Formats: FASTA files containing predicted amino acid (protein) sequences for de novo annotation, or a clean text list of gene symbols, NCBI Entrez Gene IDs, UniProt accessions, or CAS registry numbers.
- System Tools: A modern web browser with HTML5 support for pathway visualization, or a command-line environment equipped with curl or wget utilities for programmatic database access.
- Knowledge Prerequisites: Foundational understanding of Enzyme Commission (EC) classification, orthology-based annotation, and the hierarchical organization of biochemical pathways.
- Access Credentials: Free access for academic and non-profit research via the public web interface. Commercial entities must obtain a commercial license from Pathway Solutions, the official licensing agent for KEGG.
- Time and Resource Budgets: Web-based mapping of small lists (under 500 genes) resolves in less than two minutes. Large-scale genome annotation using GhostKOALA can take between 1 to 4 hours depending on server load and query sequence volume.
Step-by-Step Gene Annotation and Pathway Reconstruction Workflow
Step 1: Generating KEGG Orthology Identifiers via GhostKOALA
The baseline currency of the KEGG ecosystem is the KEGG Orthology (KO) number, represented by a capital K followed by five digits (such as K00844 for hexokinase). To reconstruct pathways from unannotated genomic or transcriptomic sequence data, you must first assign these KO identifiers using the KEGG Automatic Annotation Server (KAAS) or the specialized GhostKOALA service.
- Navigate to the official GhostKOALA submission page on the KEGG portal.
- Upload your query sequence file in FASTA format. For maximum annotation accuracy, upload predicted amino acid sequences rather than nucleotide sequences.
- Select the taxonomical scope most appropriate for your dataset. Choosing a narrower taxon (such as Eukaryotes or Gammaproteobacteria) reduces search space, accelerates processing times, and lowers the rate of false-positive ortholog assignments.
- Input a valid email address to receive the computation link, and submit the job.
- Upon receipt of the results email, download the tab-delimited text file. This file links your original sequence headers directly to their newly assigned KO identifiers.
Pro-Tip: GhostKOALA utilizes GHOSTX, a sequence similarity search tool that runs up to 100 times faster than standard BLAST, making it the preferred entry point for large metagenomic or environmental datasets.
Step 2: Mapping KO Identifiers to Metabolic Pathways
Once you possess a list of KO numbers, you can map them to canonical biological maps to identify which pathways are active in your organism or sample.
- Open the KEGG Mapper tool suite and select the Search and Color Pathway tool.
- Paste your list of K numbers into the large input text box. Place one identifier per line.
- If you are working with differential expression data, append hex color codes directly to each identifier. For example, enter K00844 followed by a space and then #ff0000 to highlight hexokinase in red, indicating up-regulation.
- Select the Target Selection criteria. Choose ko to map to the generic reference pathway map, or enter a three-letter organism code (such as hsa for Homo sapiens or eco for Escherichia coli) to restrict mapping to a specific species.
- Click the Exec button to initiate the search.
Step 3: Interpreting and Customizing Pathway Diagrams
The output of the mapping process is a list of biological pathways populated by your query data. Understanding how to read these diagrams is vital for scientific reporting.
- Click on any of the returned pathway titles (such as Glycolysis / Gluconeogenesis) to open the interactive map viewer.
- Examine the rectangular nodes within the pathway. These boxes represent gene products, enzymes, or ortholog groups. Nodes that match your input data will be highlighted in the custom colors you specified in Step 2.
- Examine the circular nodes. These represent chemical compounds, metabolites, or glycans. Clicking on a circle will navigate you to the corresponding KEGG Compound database entry (e.g., C00031 for D-glucose).
- Utilize the display control panel at the top of the map to toggle between generic reference maps (which show all possible biochemical reactions) and organism-specific maps (which show only the reactions proven to occur in that organism).
Warning: Do not confuse global maps (numbered 01100 to 01200) with local metabolic maps. Global maps are highly condensed overview diagrams. Attempting to display detailed gene annotation data on a global map can result in visually cluttered diagrams where individual nodes are difficult to isolate.
Step 4: Performing Functional Classification with KEGG BRITE
To understand the broader biological classes represented in your dataset, use the BRITE functional hierarchy system to organize your annotated genes.
- Select the Reconstruct pathway option within the KEGG Mapper interface.
- Input your KO list and execute the analysis.
- Locate the BRITE Hierarchies tab in the output menu. This displays a collapsible tree structure categorizing your genes.
- Expand categories like Enzymes, Transcription Factors, or Membrane Transport to identify which cellular machineries are most heavily represented or enriched in your experimental samples.
- Export the hierarchical tree as a text file for further statistical processing in downstream programming environments.
Step 5: Programmatic Data Retrieval via the KEGG API
For bioinformaticians processing thousands of genes, the web-based interface is impractical. Programmatic queries can be executed directly using simple API requests.
- Construct an HTTP GET request to search the database. To retrieve a list of human pathways, direct your software or command-line tool to the KEGG API endpoint pathway slash list slash hsa.
- To retrieve the raw flat-file record for a specific compound or pathway, construct a request using the get command followed by the target identifier, such as get slash C00031.
- To map one database identifier system to another, use the link endpoint. For example, to find all NCBI Gene IDs associated with human pathways, send an HTTP query to link slash hsa slash pathway.
- Parse the returned tab-delimited text files using custom scripts in R or Python to automate data integration.
How to retrieve KEGG Pathways - BioBam | OmicsBox
KEGG Database Identifiers and Search Parameters Reference
The table below outlines the core identifier formats, biological contexts, and analytical applications utilized within the database system.
| Identifier Type | Code Prefix | Example Format | Primary Biological Meaning | Best Mapping Tool |
|---|---|---|---|---|
| KEGG Orthology | K | K00844 | Functional ortholog group across different organisms | GhostKOALA / KAAS |
| Pathway Map | map or org | map00010 / hsa00010 | Complete biochemical network or reference pathway | Search & Color Pathway |
| Chemical Compound | C | C00031 | Specific metabolic substrate, product, or cofactor | KEGG Search / SimComp |
| Reaction | R | R00118 | Two-sided biochemical reaction equation | KEGG Reaction Database |
| Enzyme | EC | 2.7.1.1 | Numerical classification of catalytic function | KEGG Enzyme Finder |
| BRITE Hierarchy | br | br08901 | Hierarchical categorization of biological systems | Reconstruct BRITE Tool |
Troubleshooting Common Mapping Failures and API Timeouts
Scenario 1: High rate of "Unmapped" or "Unknown" IDs during search
- Root Cause: Input lists contain non-standard gene names, custom transcript identifiers, or symbols from mismatched database releases (e.g., mixing old RefSeq accessions with current genomic builds).
- Actionable Fix: Convert your gene lists to standard NCBI Gene IDs or UniProt accessions before querying KEGG. Alternatively, pass your sequences through GhostKOALA to generate fresh, standardized KO (K) numbers that bypass naming discrepancies.
Scenario 2: Color mapping fails to appear on pathway diagrams
- Root Cause: Syntax formatting errors in the input text field, such as missing spaces between the K number and the hex color code, or the utilization of unsupported custom colors (e.g., typing "red" instead of the hex format "#ff0000").
- Actionable Fix: Format your data strictly as one identifier per line, followed by a single space, and then the exact 6-character hex color code preceded by a pound sign. Ensure no trailing tab characters or spaces remain at the ends of your input lines.
Scenario 3: API queries return 400 Bad Request or HTTP 403 Forbidden errors
- Root Cause: Exceeding the rate limit threshold of the public servers by sending excessive parallel queries, or attempting bulk database downloads which are restricted to licensed academic download portals.
- Actionable Fix: Insert a delay of at least one second between sequential HTTP GET requests in your script. For large-scale data queries, bundle your identifiers and use the batch query features of the GET endpoint (e.g., query multiple K numbers separated by a plus sign) to minimize total API requests.
Frequently Asked Questions
Can I use KEGG for free in commercial research?
No, commercial research and development requires a paid subscription license. Academic researchers can freely access the online interactive web tools, but copying, distributing, or programmatic batch downloading of database tables for commercial integration is strictly prohibited without a license.
What is the difference between map, ko, and organism-specific pathways?
A map prefix (e.g., map00010) represents the reference pathway showing all theoretical metabolic steps compiled from all studied organisms. A ko prefix (e.g., ko00010) represents pathways constructed strictly of KO identifiers. An organism prefix (e.g., hsa00010) shows only the specific genes and reactions verified to exist within that particular organism.
How do I convert a list of Ensembl IDs to KEGG K numbers?
You can convert Ensembl IDs by using the KEGG Convert tool, which links external database identifiers to internal database codes. Alternatively, you can run a sequence-to-sequence annotation search on the KAAS platform using the amino acid sequences linked to your Ensembl identifiers to directly generate K numbers.
What do the green, blue, and white boxes represent in KEGG pathway maps?
In reference pathways, white boxes represent genes or ortholog groups that are not mapped in your current analysis. In organism-specific pathway maps, green boxes denote genes that are confirmed to exist in that organism's genome. Blue or custom-colored boxes represent nodes that matched your submitted query list.
How can I perform gene set enrichment analysis (GSEA) using KEGG?
To perform GSEA, download your mapped gene list with their assigned KO identifiers or pathway affiliations. Import this structured list along with your complete expression dataset into an enrichment analysis tool such as clusterProfiler in R, or use web-based platforms like WebGestalt to calculate statistically significant pathway enrichment over a background dataset.
Accelerate Your Genomic Discoveries
Ready to scale your bioinformatics pipeline and unlock deep biological insights within complex metabolic networks? Partner with leading genomic analysis platforms to automate your structural annotation, streamline KEGG pathway enrichment steps, and accelerate your publication timelines.