-
Notifications
You must be signed in to change notification settings - Fork 1
Ecoli 0.2.0 #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Ecoli 0.2.0 #32
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
7b04f7e
feat (model): curations Carrao 2024
KennetLindquist 9974b51
chore: add macaw test result
KennetLindquist 4f7af53
feat (model): remove GLYCK
KennetLindquist 7a373e6
chore: add macaw test result
KennetLindquist 7fc76eb
fix (model): improves indentation consistency
KennetLindquist 3254f33
feat (model): curations Mao 2022
KennetLindquist f4abc54
fix (model): improves indentation consistency
KennetLindquist c95019a
feat (model): curation Bernstein 2023
KennetLindquist 7e94340
chore: add macaw test result
KennetLindquist 4ee1033
fix (model): improves indentation consistency
KennetLindquist 6802467
feat (model): curation XYLI2 removal
KennetLindquist cb0cb52
chore: add macaw test result
KennetLindquist ace9f59
feat: XYLI2 removal investigation
KennetLindquist 2b75495
feat (model): XYLI1 annotation update
KennetLindquist d84e957
feat: GLYCK removal investigation
KennetLindquist 1bb9346
feat: complete collection of deprications
KennetLindquist f47bd99
feat (model): curation XYLI2 removal
KennetLindquist 6eba948
feat (model): curation Bernstein 2023
KennetLindquist dda3323
feat (model): curations Mao 2022
KennetLindquist 08c0537
chore: merge latest changes from develop
KennetLindquist 116a549
chore: move deprecated reactions to model/reactions folder
KennetLindquist 45d713e
chore: fix spelling
KennetLindquist 1376034
feat: add Carrao deprecated reaction to deprecated file
KennetLindquist c4a2157
feat (model): curations Carrao 2024
KennetLindquist cbb443f
chore: removed duplicate deprications
KennetLindquist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| !!omap | ||
| - metaData: | ||
| id: "Ecoli-GEM" | ||
| name: "The Consensus Genome-Scale Metabolic Model of Escherichia coli" | ||
| date: "2025-06-16" | ||
| version: "" | ||
| github: "https://github.com/SysBioChalmers/Ecoli-GEM" | ||
| - metabolites: | ||
| - reactions: | ||
| - !!omap | ||
| - id: GLYCK | ||
| - name: Glycerate kinase | ||
| - metabolites: !!omap | ||
| - 3pg_c: 1.0 | ||
| - adp_c: 1.0 | ||
| - atp_c: -1.0 | ||
| - glyc__R_c: -1.0 | ||
| - h_c: 1.0 | ||
| - lower_bound: 0.0 | ||
| - upper_bound: 1000.0 | ||
| - gene_reaction_rule: b0514 | ||
| - subsystem: Glyoxylate Metabolism | ||
| - annotation: !!omap | ||
| - bigg.reaction: GLYCK | ||
| - biocyc: META:GLY3KIN-RXN | ||
| - ec-code: 2.7.1.31 | ||
| - kegg.reaction: R01514 | ||
| - metanetx.reaction: MNXR100328 | ||
| - reactome.reaction: | ||
| - R-MMU-6799495 | ||
| - R-TGU-6799495 | ||
| - R-DME-6799495 | ||
| - R-GGA-6799495 | ||
| - R-RNO-6799495 | ||
| - R-XTR-6799495 | ||
| - R-DRE-6799495 | ||
| - R-HSA-6799495 | ||
| - R-SSC-6799495 | ||
| - R-BTA-6799495 | ||
| - R-CEL-6799495 | ||
| - R-CFA-6799495 | ||
| - rhea: | ||
| - '23518' | ||
| - '23519' | ||
| - '23516' | ||
| - '23517' | ||
| - sabiork: '428' | ||
| - sbo: SBO:0000176 | ||
| - seed.reaction: rxn01102 | ||
| - !!omap | ||
| - id: XYLI2 | ||
| - name: Xylose isomerase | ||
| - metabolites: !!omap | ||
| - fru_c: 1.0 | ||
| - glc__D_c: -1.0 | ||
| - lower_bound: -1000.0 | ||
| - upper_bound: 1000.0 | ||
| - gene_reaction_rule: b3565 | ||
| - subsystem: Alternate Carbon Metabolism | ||
| - annotation: !!omap | ||
| - bigg.reaction: XYLI2 | ||
| - biocyc: META:GLUCISOM-RXN | ||
| - ec-code: 5.3.1.5 | ||
| - kegg.reaction: R00307 | ||
| - metanetx.reaction: MNXR105254 | ||
| - rhea: | ||
| - '28546' | ||
| - '28547' | ||
| - '28549' | ||
| - '28548' | ||
| - sabiork: '800' | ||
| - sbo: SBO:0000176 | ||
| - seed.reaction: rxn00223 | ||
| - genes: | ||
| - compartments: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| import cobra | ||
| from rebuild_groups import rebuild_groups_from_subsystems | ||
|
|
||
| # Load and rebuild model | ||
| model_path = 'path_to_repository/Ecoli-GEM/model/Ecoli-GEM.yml' | ||
| model = cobra.io.load_yaml_model(model_path) | ||
| rebuild_groups_from_subsystems(model) | ||
|
|
||
| # Metabolites of XYLI2 | ||
| metabolites = [met.id for met in model.reactions.XYLI2.metabolites] | ||
|
|
||
| # remove XYLI2 | ||
| print(model.reactions.XYLI2.reaction) | ||
| print(model.reactions.XYLI1.reaction) | ||
| model.remove_reactions(['XYLI2']) | ||
|
|
||
| # Check other reactions for XYLI2 metabolites | ||
| for met_id in metabolites: | ||
| met = model.metabolites.get_by_id(met_id) | ||
| print(f"\nMetabolite: {met.id} ({met.name})") | ||
| for rxn in met.reactions: | ||
| print(f" - {rxn.id}: {rxn.reaction}") | ||
|
|
||
| def orphan_check(met_id): | ||
| met = model.metabolites.get_by_id(met_id) | ||
| producing = [r for r in met.reactions if met in r.products] | ||
| consuming = [r for r in met.reactions if met in r.reactants] | ||
| print(f"\n{met_id} -> Produced by: {len(producing)} reactions, Consumed by: {len(consuming)} reactions") | ||
|
|
||
| for met_id in metabolites: | ||
| orphan_check(met_id) | ||
| # Metabolite results | ||
| # fru_c -> Produced by: 2 reactions, Consumed by: 1 reactions | ||
| # glc__D_c -> Produced by: 19 reactions, Consumed by: 2 reactions | ||
| # Conclusion: No dead-end reactions produced, keep all metabolites | ||
|
|
||
|
|
||
| # XYLI1 annotation | ||
| print(model.reactions.XYLI1.reaction) | ||
| print(model.reactions.XYLI1.annotation) | ||
| # Was MNXR105253 | ||
| model.reactions.XYLI1.annotation["metanetx.reaction"] = "MNXR146751" | ||
|
|
||
| # Save model | ||
| output_path='path_to_output_dir/Ecoli-GEM.yml' | ||
| cobra.io.save_yaml_model(model, output_path, sort='True') | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import cobra | ||
| from rebuild_groups import rebuild_groups_from_subsystems | ||
|
|
||
| # Load and rebuild model | ||
| model_path = 'path_to_repository/Ecoli-GEM/model/Ecoli-GEM.yml' | ||
| model = cobra.io.load_yaml_model(model_path) | ||
| rebuild_groups_from_subsystems(model) | ||
|
|
||
| #GHMT2r irreversible | ||
| print(model.reactions.GHMT2r.bounds) | ||
| model.reactions.GHMT2r.lower_bound = 0 | ||
|
|
||
| # Save model | ||
| output_path='path_to_output_dir/Ecoli-GEM.yml' | ||
| cobra.io.save_yaml_model(model, output_path, sort='True') | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| import cobra | ||
| from rebuild_groups import rebuild_groups_from_subsystems | ||
|
|
||
| # Load and rebuild model | ||
| model_path = 'path_to_repository/Ecoli-GEM/model/Ecoli-GEM.yml' | ||
| model = cobra.io.load_yaml_model(model_path) | ||
| rebuild_groups_from_subsystems(model) | ||
|
|
||
| # pntAB (THD2pp) | ||
| print(model.reactions.THD2pp.reaction) | ||
| model.reactions.THD2pp.add_metabolites({"h_c": -1, "h_p": 1}) | ||
| print(model.reactions.THD2pp.reaction) | ||
|
|
||
| # glxK (b0514) to GLYCK2 & remove GLYCK | ||
| print(model.reactions.GLYCK2.gene_reaction_rule) | ||
| model.reactions.GLYCK2.gene_reaction_rule = '(b3124 or b0514)' | ||
| print(model.reactions.GLYCK2.gene_reaction_rule) | ||
|
|
||
| # Metabolites of GLYCK | ||
| metabolites = [met.id for met in model.reactions.GLYCK.metabolites] | ||
|
|
||
| # remove GLYCK | ||
| print(model.reactions.GLYCK.reaction) | ||
| print(model.reactions.GLYCK2.reaction) | ||
| model.remove_reactions(['GLYCK']) | ||
|
|
||
| # Check other reactions for GLYCK metabolites | ||
| for met_id in metabolites: | ||
| met = model.metabolites.get_by_id(met_id) | ||
| print(f"\nMetabolite: {met.id} ({met.name})") | ||
| for rxn in met.reactions: | ||
| print(f" - {rxn.id}: {rxn.reaction}") | ||
|
|
||
| def orphan_check(met_id): | ||
| met = model.metabolites.get_by_id(met_id) | ||
| producing = [r for r in met.reactions if met in r.products] | ||
| consuming = [r for r in met.reactions if met in r.reactants] | ||
| print(f"\n{met_id} -> Produced by: {len(producing)} reactions, Consumed by: {len(consuming)} reactions") | ||
|
|
||
| for met_id in metabolites: | ||
| orphan_check(met_id) | ||
|
|
||
| # Metabolite results | ||
| # 3pg_c -> Produced by: 2 reactions, Consumed by: 2 reactions | ||
| # adp_c -> Produced by: 279 reactions, Consumed by: 8 reactions | ||
| # atp_c -> Produced by: 4 reactions, Consumed by: 345 reactions | ||
| # glyc__R_c -> Produced by: 5 reactions, Consumed by: 2 reactions | ||
| # h_c -> Produced by: 786 reactions, Consumed by: 293 reactions | ||
| # Conclusion: No dead-end reactions produced, keep all metabolites | ||
|
|
||
| # HSDy | ||
| print(model.reactions.HSDy.bounds) | ||
| print(model.reactions.HSDy.reversibility) | ||
| print(model.reactions.HSDy.reaction) | ||
| model.reactions.HSDy.lower_bound = 0 | ||
| print(model.reactions.HSDy.bounds) | ||
|
|
||
| # SUCCt1pp | ||
| print(model.reactions.SUCCt1pp.bounds) | ||
| print(model.reactions.SUCCt1pp.reversibility) | ||
| print(model.reactions.SUCCt1pp.reaction) | ||
| model.reactions.SUCCt1pp.lower_bound = 0 | ||
| print(model.reactions.SUCCt1pp.bounds) | ||
|
|
||
| # Save model | ||
| output_path='path_to_output_dir/Ecoli-GEM.yml' | ||
| cobra.io.save_yaml_model(model, output_path, sort='True') | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| import cobra | ||
| from rebuild_groups import rebuild_groups_from_subsystems | ||
|
|
||
| # Load and rebuild model | ||
| model_path = 'path_to_repository/Ecoli-GEM/model/Ecoli-GEM.yml' | ||
| model = cobra.io.load_yaml_model(model_path) | ||
| rebuild_groups_from_subsystems(model) | ||
|
|
||
| print(model.reactions.FMNRx2.gene_reaction_rule) | ||
| # From b3844 or b0937 or (b2764 and b2763) | ||
| model.reactions.FMNRx2.gene_reaction_rule = '(b0937 or b3844 or b2764)' | ||
|
|
||
| print(model.reactions.ARGabcpp.gene_reaction_rule) | ||
| # From (b2308 and b2306 and b2310 and b2307) or (b0864 and b0860 and b0863 and b0862 and b0861) | ||
| model.reactions.ARGabcpp.gene_reaction_rule = '( b2310 and b2308 and b2306 and b2307 ) or ( b0862 and b0860 and b0864 and b0861 ) or ( b0862 and b0864 and b0863 and b0861 )' | ||
|
|
||
| print(model.reactions.ECAP1pp.gene_reaction_rule) | ||
| # From b3785 and b3793 | ||
| model.reactions.ECAP1pp.gene_reaction_rule = '( b3785 and b3793 and b3792 )' | ||
|
|
||
| print(model.reactions.ECAP2pp.gene_reaction_rule) | ||
| # From b3785 and b3793 | ||
| model.reactions.ECAP2pp.gene_reaction_rule = '( b3785 and b3793 and b3792 )' | ||
|
|
||
| print(model.reactions.ECAP3pp.gene_reaction_rule) | ||
| # From b3785 and b3793 | ||
| model.reactions.ECAP3pp.gene_reaction_rule = '( b3785 and b3793 and b3792 )' | ||
|
|
||
| print(model.reactions.FADRx2.gene_reaction_rule) | ||
| # From b2764 and b2763 | ||
| model.reactions.FADRx2.gene_reaction_rule = '( b2764 )' | ||
|
|
||
| print(model.reactions.BWCOGDS1.gene_reaction_rule) | ||
| # From (b3857 and b3856) or b3857 | ||
| model.reactions.BWCOGDS1.gene_reaction_rule = '( b3857 )' | ||
|
|
||
| print(model.reactions.BWCOGDS2.gene_reaction_rule) | ||
| # From (b3857 and b3856) or b3857 | ||
| model.reactions.BWCOGDS2.gene_reaction_rule = '( b3857 )' | ||
|
|
||
| print(model.reactions.THZPSN3.gene_reaction_rule) | ||
| # From b0423 and b3990 and b2530 and b3992 and b4407 | ||
| model.reactions.THZPSN3.gene_reaction_rule = '( b3992 and b3990 and b0423 and b2530 and b4407 and b3991 )' | ||
|
|
||
| print(model.reactions.BMOGDS1.gene_reaction_rule) | ||
| # From b3857 or (b3857 and b3856) | ||
| model.reactions.BMOGDS1.gene_reaction_rule = '( b3857 )' | ||
|
|
||
| print(model.reactions.BMOGDS2.gene_reaction_rule) | ||
| # From (b3857 and b3856) or b3857 | ||
| model.reactions.BMOGDS2.gene_reaction_rule = '( b3857 )' | ||
|
|
||
| print(model.reactions.MOGDS.gene_reaction_rule) | ||
| # From (b3857 and b3856) or b3857 | ||
| model.reactions.MOGDS.gene_reaction_rule = '( b3857 )' | ||
|
|
||
| print(model.reactions.get_by_id('3NTD4pp').gene_reaction_rule) | ||
| # From b4213 or b0383 or b0383 | ||
| model.reactions.get_by_id('3NTD4pp').gene_reaction_rule = '( b0383 or b4213 or b2744 )' | ||
|
|
||
| print(model.reactions.GLUDy.gene_reaction_rule) | ||
| # From b1761 or (b3213 and b3212) | ||
| model.reactions.GLUDy.gene_reaction_rule = '( b1761 )' | ||
|
|
||
| # Save model | ||
| output_path='path_to_output_dir/Ecoli-GEM.yml' | ||
| cobra.io.save_yaml_model(model, output_path, sort='True') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a suggestive name for this file?