bc_get_kegg_id_by_gene_symbol
Convert gene symbols (e.g., TP53) to KEGG IDs (e.g., hsa:7157) for use in KEGG API workflows. Specify the organism code (e.g., 9606 for human) to retrieve accurate IDs.
Instructions
Get KEGG ID by gene symbol.
This function converts a gene symbol (like TP53) to a KEGG gene ID (like hsa:7157) for use in the KEGG API. The KEGG API typically requires KEGG IDs rather than gene symbols for most operations.
This is often the first step in a workflow - get the KEGG ID, then use it in subsequent API calls.
Common organism codes:
- Human: 9606 (KEGG code: hsa)
- Mouse: 10090 (KEGG code: mmu)
- Rat: 10116 (KEGG code: rno)
- E. coli: 562 (KEGG code: eco)
- Yeast: 4932 (KEGG code: sce)
Args: gene_symbol (str): The gene symbol to search for (e.g., "TP53" for human, "Trp53" for mouse). organism_code (str): The organism code as taxonomy ID (e.g., "9606" for human, "10090" for mouse).
Returns: str | dict: The KEGG ID (e.g., "hsa:7157") or an error message.
Examples: >>> get_kegg_id_by_gene_symbol(gene_symbol="TP53", organism_code="9606") "hsa:7157"
Input Schema
Name | Required | Description | Default |
---|---|---|---|
gene_symbol | Yes | Gene symbol to convert to KEGG ID (e.g., 'TP53' for human, 'Trp53' for mouse) | |
organism_code | Yes | KEGG organism code or taxonomy ID (e.g., '9606' for human, '10090' for mouse) |