KEGG Pathway XML Download
pdb.download_all_kegg_pathway_xml
Downloads all KGML XML files for pathways of a specified KEGG species or the KEGG Orthology (KO) from the KEGG REST API, storing them in a species-specific subdirectory.
| Parameter | Type | Default | Description |
|---|---|---|---|
species_code |
str | None (downloads KO) | The three-letter KEGG species code (e.g., 'hsa' for human). If None, fetches KEGG Orthology pathways ('ko'). |
kgml_path |
str | None (uses current dir) | The base directory where the species-specific folder will be created (e.g., if set to '/data', files go into '/data/hsa'). |
Returns
None. Files are downloaded to the specified/created directory.
Usage
# Download human (hsa) pathways to the 'kegg_kgml' folder
pdb.download_all_kegg_pathway_xml(species_code="hsa", kgml_path="./kegg_kgml")