Addition of KEGG Pathways

The KEGG database holds information on metabolic pathways. If your organism occurs in the KEGG database, you can use this module to add KEGG pathways with the libSBML Groups plugin.

The workflow of the script is as follows: 1. Extraction of the KEGG reaction ID from the annotations of your reactions 2. Identification, in which KEGG pathways this reaction occurs 3. Addition of all KEGG pathways for a reaction then as annotations with the biological qualifier ‘OCCURS_IN’ to the respective reaction. 4. Addition of all KEGG pathways as groups with references to the contained reactions as groups:member

The only function that you will need to access is kegg_pathways:

refinegems.pathways.kegg_pathways(modelpath: str) tuple[libsbml.Model, list[str]]

Executes all steps to add KEGG pathways as groups

Args:
  • modelpath (str): Path to GEM

Returns:
tuple: libSBML model (1) & List of reactions without KEGG Id (2)
  1. libModel: Modified model with Pathways as groups

  2. list: Ids of reactions without KEGG annotation

1import refinegems as rg
2model_pathway_groups, non_kegg_reactions = rg.pathways.kegg_pathways(<path to your model>)
3rg.io.write_to_file(model_pathway_groups, <path to modified model>)