Skip to content

Commit

Permalink
Enhanced applicability of the polish.py module #36 #46
Browse files Browse the repository at this point in the history
1. Changed parameters in `config.yaml`:
- Renamed parameter `polish_carveme` to `polish`
- Added parameter `BiGG_IDs`
2. Changed `main.py` according to 'new' parameters
  • Loading branch information
GwennyGit committed Nov 8, 2022
1 parent 17d6cc8 commit 317bdc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ kegg_path: '../C_striatum_GEMs/models/Cstr_KC-Na-01.xml' # path where to save m
sboterms: FALSE
sbo_path: '../C_striatum_GEMs/models/Cstr_KC-Na-01.xml' # path where to save model with sbo terms

### CarveMe polishing ###
polish_carveme: FALSE
### Model polishing ### If model has no BiGG IDs, set parameter BiGG_IDs to FALSE
polish: FALSE
BiGG_IDs: TRUE
polish_path: '../C_striatum_GEMs/models/Cstr_KC-Na-01.xml' # path where to save the polished model

### Charge correction ###
Expand Down
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ def main():
model, errors = cobra.io.sbml.validate_sbml_model(config['sbo_path'])
print(errors)

elif (config['polish_carveme']):
elif (config['polish']):
model_libsbml = rg.load.load_model_libsbml(config['model'])
rg.polish.polish_carveme_bigg(model_libsbml, config['polish_path'], config['entrez_email'])
if config['BiGG_IDs']:
rg.polish.polish_carveme_bigg(model_libsbml, config['polish_path'], config['entrez_email'])
else:
rg.polish.polish_not_bigg(model_libsbml, config['polish_path'], config['entrez_email'])
model, errors = cobra.io.sbml.validate_sbml_model(config['polish_path'])
print(errors)

Expand Down

0 comments on commit 317bdc2

Please sign in to comment.