Programmatic access to KEGG via BioServices for pathway analysis, gene functions, and metabolic cross-referencing.
BioServices is a Python package providing programmatic access to approximately 40 bioinformatics web services and databases. Retrieve biological data, perform cross-database queries, map identifiers, analyze sequences, and integrate multiple biological resources in Python workflows. The package handles both REST and SOAP/WSDL protocols transparently.
This skill should be used when:
BioServices Python client to query KEGG REST services for genes, pathways, and compounds.Retrieve protein information, sequences, and functional annotations:
Access KEGG pathway information for genes and organisms:
Key methods:
lookfor_organism(), lookfor_pathway(): Search by nameget_pathway_by_gene(): Find pathways containing genesparse_kgml_pathway(): Extract structured pathway datapathway2sif(): Get protein interaction networksReference: references/workflow_patterns.md for complete pathway analysis workflows.
Search and cross-reference compounds across multiple databases:
Common workflow:
Run BLAST searches and sequence alignments:
Note: BLAST jobs are asynchronous. Check status before retrieving results.
Convert identifiers between different biological databases:
Access GO terms and annotations:
Available databases: MINT, IntAct, BioGRID, DIP, and 30+ others.
BioServices excels at combining multiple services for comprehensive analysis. Common integration patterns:
Execute a full protein characterization workflow:
This script demonstrates:
Analyze all pathways for an organism:
Extracts and analyzes:
Map compound identifiers across databases:
Retrieves:
Convert multiple identifiers at once:
Different services return data in various formats:
Control API request behavior:
Wrap service calls in try-except blocks:
Use standard organism abbreviations:
hsa: Homo sapiens (human)mmu: Mus musculus (mouse)dme: Drosophila melanogastersce: Saccharomyces cerevisiae (yeast)List all organisms: k.list("organism") or k.organismIds
BioServices works well with: