Skip to content

Commit

Permalink
Update cmd access #118
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-Hades committed May 23, 2024
1 parent e17bf58 commit 0e738e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/refinegems/cmd_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import logging

from refinegems.curation.db_access import biocyc
from refinegems.utility.io import write_model_to_file

################################################################################
# Entry points
Expand Down Expand Up @@ -327,10 +328,17 @@ def sboterms(modelpath):

@annot.command()
@click.argument('modelpath', type=click.Path(exists=True))
@click.option('-d','--dir', required=False, default='./', help='Path to the output dorectory')
def pathways(modelpath):
"""Add KEGG pathways as groups to a model
"""
rg.curation.pathways.kegg_pathways(modelpath) # @TODO what exactly gets returned?
model, missing = rg.curation.pathways.kegg_pathways(modelpath)
with open(Path(dir, 'reac_wo_kegg_pathway_groups.txt'), 'w') as outfile:
# save reactions with missing groups
for line in missing:
outfile.write(f'{line}\n')
# save model
write_model_to_file(Path(dir,'model_with_added_KeggPathwayGroups.xml'))


# -----------------------------------------------
Expand Down

0 comments on commit 0e738e6

Please sign in to comment.