draw_pathway_map
Draw a KEGG pathway map as a PNG with gene boxes colored by highlight groups, redrawn from KGML layout, and return an exact summary of colored boxes and matched KOs.
Instructions
Draw a KEGG pathway map as a PNG image, with gene boxes coloured by group.
The map is redrawn from KEGG's KGML layout (gene boxes, compounds, reactions and links to other maps), not copied from KEGG's image. Each gene box is split into one stripe per highlight group: coloured when the group has one of the box's KOs, grey when it doesn't. Returns the PNG plus an exact summary of what the image shows (per group: map KOs found and boxes coloured; per box: KOs and the groups that have them), so check the summary rather than describing the picture from memory.
Args: pathway_id: KEGG map number: 'map00010', 'ko00010', an organism map such as 'eco00010' (drawn as the KO reference map), or '00010'. Global and overview maps (011xx, 012xx) are refused. highlight: Optional {label: ids}, at most 8 groups (e.g. one per genome). Ids are KO ids ('K00844', 'ko:K00844', 'KEGG:K00844') or complete EC numbers ('2.7.1.1', 'EC:2.7.1.1'). One item may hold one gene's ids separated by spaces ('K00845 EC:2.7.1.2', or a GenBank db_xref string). A KO with no KO match is coloured through EC numbers only when one item carries every EC KEGG links to it; those KOs are listed under matched_by_ec.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| highlight | No | ||
| pathway_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| boxes | No | ||
| notes | No | ||
| steps | No | ||
| title | Yes | ||
| groups | No | ||
| box_count | Yes | ||
| pathway_id | Yes | ||
| step_count | No | ||
| image_width | Yes | ||
| image_height | Yes | ||
| map_ko_count | Yes | ||
| boxes_truncated | No | ||
| steps_truncated | No | ||
| unrecognized_ids | No | ||
| boxes_with_any_group | No | ||
| steps_with_any_group | No |