7. Loading and inspecting ME-models
In this tutorial we will load and inspect the reconstructed Bacillus subtilis ME-model.
7.1. Import libraries
[1]:
from coralme.builder.main import MEBuilder
import coralme
7.2. Load as a JSON
Load the ME-model coming out of the Troubleshooter
[2]:
me = coralme.io.json.load_json_me_model("./bsubtilis/MEModel-step3-bsubtilis-TS.json")
Adding Metabolites into the ME-model... : 100.0%|██████████| 4630/ 4630 [00:00<00:00]
Adding ProcessData into the ME-model... : 100.0%|██████████| 4752/ 4752 [00:00<00:00]
Adding Reactions into the ME-model... : 100.0%|██████████| 7758/ 7758 [00:14<00:00]
Updating ME-model Reactions... : 100.0%|██████████| 6369/ 6369 [00:21<00:00]
7.3. Load as a pickle
[ ]:
# me = coralme.io.pickle.load_pickle_me_model("./bsubtilis/MEModel-step3-bsubtilis-TS.pkl")
7.4. Inspecting ME-model properties
7.4.1. Summary of the ME-model
[3]:
me
[3]:
| Name | coralME |
| Memory address | 7f1c5c495b10 |
| Number of metabolites | 4630 |
| Number of reactions | 7758 |
| Number of genes | 1154 |
| Number of mRNA genes | 1038 |
| Number of rRNA genes | 30 |
| Number of tRNA genes | 86 |
| Objective expression | dummy_reaction_FWD_SPONT |
| Compartments | mc, c, e |
[4]:
print("ME-model has {} reactions".format(len(me.reactions)))
ME-model has 7758 reactions
[5]:
print("ME-model has {} metabolites".format(len(me.metabolites)))
ME-model has 4630 metabolites
[6]:
print("ME-model has {} genes".format(len(me.all_genes)))
ME-model has 1154 genes
7.4.2. Reactions
7.4.2.1. Metabolic reaction
[7]:
r = next(i for i in me.reactions if isinstance(i,coralme.core.reaction.MetabolicReaction))
r
[7]:
| Reaction identifier | 23CN2P1_REV_BSU07840-MONOMER |
| Name | |
| Memory address | 0x7f1b98d6c9d0 |
| Stoichiometry |
1.0 3amp_c + [4.47434028634533e-6*mu1] BSU07840-MONOMER + 1.0 h_c --> 1.0 23camp_c + 1.0 h2o_c 1.0 3 AMP C10H12N5O7P + [4.47434028634533e-6*mu1] BSU07840-MONOMER + 1.0 H+ --> 1.0 2',3'-Cyclic AMP + 1.0 H2O H2O |
| GPR | |
| Lower bound | 0 |
| Upper bound | 999999.0 |
| Reaction type | coralme.core.reaction.MetabolicReaction |
| Flux | ME-model not optimized/feasible |
| Reduced cost | ME-model not optimized/feasible |
| Bound violation | ME-model not optimized/feasible |
7.4.2.2. Translation reaction
[8]:
r = next(i for i in me.reactions if isinstance(i,coralme.core.reaction.TranslationReaction))
r
[8]:
| Reaction identifier | translation_BSU00090 |
| Name | |
| Memory address | 0x7f1b9abcb310 |
| Stoichiometry |
1.0 10fthf_c + [0.00208119658119658*mu1] BSU01120-MONOMER + [4.27350427350427e-6*mu1] BSU01390-MONOMER + [4.27350427350427e-6*mu1] BSU15720-MONOMER + [4.27350427350427e-6*mu1] BSU15730-MONOMER + [0.00208119658119658*mu1] BSU16500-MONOMER + [4.27350427350427e-6*mu1] BSU16520-MONOMER + [8.54700854700855e-6*mu1] BSU16630-MONOMER + [4.27350427350427e-6*mu1] BSU25460-MONOMER + [4.27350427350427e-6*mu1] BSU25470-MONOMER + [4.27350427350427e-6*mu1] BSU25480-MONOMER + [4.27350427350427e-6*mu1] BSU28870-MONOMER + [0.000498399634202103*mu1 + 0.000195123456790123 + 0.0269135802469136*(0.222222222222222*mu1 + 0.087)/mu1] RNA_BSU00090 + [2.55589556001079e-8*mu1 + 1.00063311174422e-8] RNA_degradosome + 36.0 ala__L_c + 23.0 arg__L_c + 14.0 asn__L_c + 27.0 asp__L_c + [488.0 + 9.86382716049383*(0.222222222222222*mu1 + 0.087)/mu1] atp_c + 3.0 cys__L_c + [8.54700854700855e-6*mu1] generic_RF + [0.00208119658119658*mu1] generic_Tuf + 29.0 generic_tRNA_AAA_lys__L_c + 8.0 generic_tRNA_AAC_asn__L_c + 8.0... 1.0 10-Formyltetrahydrofolate + [0.00208119658119658*mu1] BSU01120-MONOMER + [4.27350427350427e-6*mu1] BSU01390-MONOMER + [4.27350427350427e-6*mu1] BSU15720-MONOMER + [4.27350427350427e-6*mu1] BSU15730-MONOMER + [0.00208119658119658*mu1] BSU16500-MONOMER + [4.27350427350427e-6*mu1] BSU16520-MONOMER + [8.54700854700855e-6*mu1] BSU16630-MONOMER + [4.27350427350427e-6*mu1] BSU25460-MONOMER + [4.27350427350427e-6*mu1] BSU25470-MONOMER + [4.27350427350427e-6*mu1] BSU25480-MONOMER + [4.27350427350427e-6*mu1] BSU28870-MONOMER + [0.000498399634202103*mu1 + 0.000195123456790123 + 0.0269135802469136*(0.222222222222222*mu1 + 0.087)/mu1] RNA_BSU00090 + [2.55589556001079e-8*mu1 + 1.00063311174422e-8] RNA_degradosome + 36.0 L-Alanine + 23.0 L-Arginine + 14.0 L-Asparagine + 27.0 L-Aspartate + [488.0 + 9.86382716049383*(0.222222222222222*mu1 + 0.087)/mu1] ATP C10H12N5O13P3 + 3.0 L-Cysteine + [8.54700854700855e-6*mu1] generic_RF + [0.00208119658119658*mu1] generic_Tuf + 29.0... |
| GPR | |
| Lower bound | 0.0 |
| Upper bound | 1000.0 |
| Reaction type | coralme.core.reaction.TranslationReaction |
| Flux | ME-model not optimized/feasible |
| Reduced cost | ME-model not optimized/feasible |
| Bound violation | ME-model not optimized/feasible |
7.4.2.3. Transcription reaction
[9]:
r = next(i for i in me.reactions if isinstance(i,coralme.core.reaction.TranscriptionReaction))
r
[9]:
| Reaction identifier | transcription_TU8J2-1243_from_BSU25200-MONOMER |
| Name | |
| Memory address | 0x7f1b9aea4700 |
| Stoichiometry |
[4.27350427350427e-6*mu1] BSU00550-MONOMER_mod_mg2(1) + [4.27350427350427e-6*mu1] BSU01010-MONOMER + [4.27350427350427e-6*mu1] BSU16600-MONOMER + [4.27350427350427e-6*mu1] BSU27320-MONOMER + [4.27350427350427e-6*mu1] BSU37080-MONOMER_mod_mg2(3) + [0.00273829471591343*mu1 + 0.00107204238128011] RNAP_BSU25200MONOMER + 189.0 atp_c + 122 ctp_c + 111 gtp_c + 3.0 h2o_c + 154 utp_c --> 1.0 RNA_BSU23050 + 3.0 adp_c + 3.0 h_c + 183.35422381299998 mRNA_biomass + 3.0 pi_c + 573 ppi_c [4.27350427350427e-6*mu1] BSU00550-MONOMER_mod_mg2(1) + [4.27350427350427e-6*mu1] BSU01010-MONOMER + [4.27350427350427e-6*mu1] BSU16600-MONOMER + [4.27350427350427e-6*mu1] BSU27320-MONOMER + [4.27350427350427e-6*mu1] BSU37080-MONOMER_mod_mg2(3) + [0.00273829471591343*mu1 + 0.00107204238128011] RNAP_BSU25200MONOMER + 189.0 ATP C10H12N5O13P3 + 122 CTP C9H12N3O14P3 + 111 GTP C10H12N5O14P3 + 3.0 H2O H2O + 154 UTP C9H11N2O15P3 --> 1.0 RNA_BSU23050 + 3.0 ADP C10H12N5O10P2 + 3.0 H+ + 183.35422381299998 mRNA_biomass + 3.0 Phosphate + 573 Diphosphate |
| GPR | |
| Lower bound | 0.0 |
| Upper bound | 1000.0 |
| Reaction type | coralme.core.reaction.TranscriptionReaction |
| Flux | ME-model not optimized/feasible |
| Reduced cost | ME-model not optimized/feasible |
| Bound violation | ME-model not optimized/feasible |
7.4.2.4. Formation reaction
[10]:
r = next(i for i in me.reactions if isinstance(i,coralme.core.reaction.ComplexFormation))
r
[10]:
| Reaction identifier | formation_BSU00090-MONOMER |
| Name | |
| Memory address | 0x7f1b98def070 |
| Stoichiometry |
4.0 protein_BSU00090 --> 1.0 BSU00090-MONOMER 4.0 protein_BSU00090 --> 1.0 BSU00090-MONOMER |
| GPR | |
| Lower bound | 0.0 |
| Upper bound | 1000.0 |
| Reaction type | coralme.core.reaction.ComplexFormation |
| Flux | ME-model not optimized/feasible |
| Reduced cost | ME-model not optimized/feasible |
| Bound violation | ME-model not optimized/feasible |
7.4.2.5. tRNA Charging reaction
[11]:
r = next(i for i in me.reactions if isinstance(i,coralme.core.reaction.tRNAChargingReaction))
r
[11]:
| Reaction identifier | charging_tRNA_BSU_tRNA_5_AUU |
| Name | |
| Memory address | 0x7f1b9918bbe0 |
| Stoichiometry |
[4.27350427350427e-6*mu1*(0.000116266666666667*mu1 + 1.0000455184)] BSU15430-MONOMER_mod_zn2(2) + [0.000116266666666667*mu1 + 4.55184e-5] RNA_BSU_tRNA_5 + [0.000116266666666667*mu1 + 4.55184e-5] ile__L_c --> 1.0 generic_tRNA_AUU_ile__L_c [4.27350427350427e-6*mu1*(0.000116266666666667*mu1 + 1.0000455184)] BSU15430-MONOMER_mod_zn2(2) + [0.000116266666666667*mu1 + 4.55184e-5] RNA_BSU_tRNA_5 + [0.000116266666666667*mu1 + 4.55184e-5] L-Isoleucine --> 1.0 generic_tRNA_AUU_ile__L_c |
| GPR | |
| Lower bound | 0.0 |
| Upper bound | 1000.0 |
| Reaction type | coralme.core.reaction.tRNAChargingReaction |
| Flux | ME-model not optimized/feasible |
| Reduced cost | ME-model not optimized/feasible |
| Bound violation | ME-model not optimized/feasible |
7.4.2.6. Post-translational modification reaction
[12]:
r = next(i for i in me.reactions if isinstance(i,coralme.core.reaction.PostTranslationReaction))
r
[12]:
| Reaction identifier | translocation_BSU07840_Cell_Wall |
| Name | |
| Memory address | 0x7f1b98956650 |
| Stoichiometry |
[0.101527777777778*mu1] BSU27650-MONOMER + [0.101527777777778*mu1] BSU35300-MONOMER + 58.480000000000004 atp_c + 58.480000000000004 h2o_c + 1.0 protein_BSU07840 + [0.101527777777778*mu1] secYEG --> 58.480000000000004 adp_c + 58.480000000000004 h_c + 58.480000000000004 pi_c + 1.0 protein_BSU07840_Cell_Wall [0.101527777777778*mu1] BSU27650-MONOMER + [0.101527777777778*mu1] BSU35300-MONOMER + 58.480000000000004 ATP C10H12N5O13P3 + 58.480000000000004 H2O H2O + 1.0 protein_BSU07840 + [0.101527777777778*mu1] secYEG --> 58.480000000000004 ADP C10H12N5O10P2 + 58.480000000000004 H+ + 58.480000000000004 Phosphate + 1.0 protein_BSU07840_Cell_Wall |
| GPR | |
| Lower bound | 0.0 |
| Upper bound | 1000.0 |
| Reaction type | coralme.core.reaction.PostTranslationReaction |
| Flux | ME-model not optimized/feasible |
| Reduced cost | ME-model not optimized/feasible |
| Bound violation | ME-model not optimized/feasible |
7.4.3. Mapped gene functions
[13]:
from collections import defaultdict
import pandas
d = defaultdict(int)
for g in me.all_genes:
for f in g.functions:
d[f] += 1
pandas.DataFrame.from_dict({"count":d})
[13]:
| count | |
|---|---|
| Translation | 209 |
| tRNA-Charging | 135 |
| Metabolic:S_Nucleotides_and_nucleic_acids | 67 |
| Metabolic:S_Coenzymes_and_prosthetic_groups | 76 |
| Metabolic:S_Amino_acids_and_related_molecules | 155 |
| Metabolic:S_Other_function | 16 |
| Transcription | 46 |
| Metabolic:S_Carbohydrates_and_related_molecules | 148 |
| Metabolic:S_Cell_wall | 40 |
| Metabolic:S_Lipids | 55 |
| Post-translation | 13 |
| Metabolic:S_Transport | 235 |
| Metabolic:Not Determined | 14 |
| Metabolic:S_Membrane_bioenergetics | 47 |
| Metabolic: No subsystem | 8 |
| Metabolic:S_Phosphate_and_sulfur | 7 |
7.4.3.1. Inspecting functions of a gene
[14]:
g = me.all_genes.get_by_id("RNA_BSU37160")
g.functions
[14]:
{'Transcription'}
7.4.4. Complexes formed by a gene
[15]:
g = me.all_genes.get_by_id("RNA_BSU37160")
g.complexes
[15]:
{<Complex CPLX8J2-30_mod_zn2(1)_mod_mg2(2) at 0x7f1b9b1d9db0>,
<RNAP RNAP_BSU00980MONOMER at 0x7f1b9b1da530>,
<RNAP RNAP_BSU01730MONOMER at 0x7f1b9b1da5c0>,
<RNAP RNAP_BSU04730MONOMER at 0x7f1b9b1da5f0>,
<RNAP RNAP_BSU09520MONOMER at 0x7f1b9b1da4a0>,
<RNAP RNAP_BSU13450MONOMER at 0x7f1b9b1da410>,
<RNAP RNAP_BSU14730MONOMER at 0x7f1b9b1da4d0>,
<RNAP RNAP_BSU15320MONOMER at 0x7f1b9b1da680>,
<RNAP RNAP_BSU15330MONOMER at 0x7f1b9b1da560>,
<RNAP RNAP_BSU16470MONOMER at 0x7f1b9b1da650>,
<RNAP RNAP_BSU23100MONOMER at 0x7f1b9b1da500>,
<RNAP RNAP_BSU23450MONOMER at 0x7f1b9b1da440>,
<RNAP RNAP_BSU25200MONOMER at 0x7f1b9b1da620>,
<RNAP RNAP_BSU27120MONOMER at 0x7f1b9b1da470>,
<RNAP RNAP_BSU34200MONOMER at 0x7f1b9b1da3e0>,
<RNAP RNAP_CPLX8J236 at 0x7f1b9b1da6b0>,
<RNAP RNAP_MONOMER8J26 at 0x7f1b9b1da590>}
7.4.5. Sinks to be curated through manual curation
The Troubleshooter finds gaps that need to be curated to allow for growth. Most of these are cofactors that will require some synthesis pathways (e.g. 4fe4s), but others will only need some transporters (e.g. metal ions). This was run with curated files, so the following is empty.
[16]:
me.reactions.query("^TS_")
[16]:
[]