{ "cells": [ { "cell_type": "markdown", "id": "fb270ec2-29da-4100-9485-39da5cce1663", "metadata": {}, "source": [ "# Loading and inspecting ME-models\n", "\n", "In this tutorial we will load and inspect the reconstructed _Bacillus subtilis_ ME-model." ] }, { "cell_type": "markdown", "id": "d37fa4bb-3c8f-4a62-923c-6c1747ebb652", "metadata": {}, "source": [ "## Import libraries" ] }, { "cell_type": "code", "execution_count": 1, "id": "d048f35f-6a3b-4642-86cd-49e4c4e4a187", "metadata": { "ExecuteTime": { "end_time": "2022-12-12T06:27:35.182100Z", "start_time": "2022-12-12T06:27:35.157355Z" } }, "outputs": [], "source": [ "from coralme.builder.main import MEBuilder\n", "import coralme" ] }, { "cell_type": "markdown", "id": "051e8ee6-15ba-4017-8fc0-5f54da314cd8", "metadata": {}, "source": [ "## Load as a JSON" ] }, { "cell_type": "markdown", "id": "77a83a0a-a0b6-4b74-b0b8-9331a34162d7", "metadata": {}, "source": [ "Load the ME-model coming out of the Troubleshooter" ] }, { "cell_type": "code", "execution_count": 2, "id": "b0d86d92-b978-402c-b16a-439986ea2904", "metadata": { "ExecuteTime": { "end_time": "2022-12-12T06:30:28.060280Z", "start_time": "2022-12-12T06:30:01.706785Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Adding Metabolites into the ME-model... : 100.0%|██████████| 4630/ 4630 [00:00<00:00]\n", "Adding ProcessData into the ME-model... : 100.0%|██████████| 4752/ 4752 [00:00<00:00]\n", "Adding Reactions into the ME-model... : 100.0%|██████████| 7758/ 7758 [00:14<00:00]\n", "Updating ME-model Reactions... : 100.0%|██████████| 6369/ 6369 [00:21<00:00]\n" ] } ], "source": [ "me = coralme.io.json.load_json_me_model(\"./bsubtilis/MEModel-step3-bsubtilis-TS.json\")" ] }, { "cell_type": "markdown", "id": "dd9c7e29-7a95-4cd7-a3f4-46a189be9e2a", "metadata": {}, "source": [ "## Load as a pickle" ] }, { "cell_type": "code", "execution_count": null, "id": "08fda213-38ab-4a84-9d72-6e3008848f5b", "metadata": { "ExecuteTime": { "end_time": "2022-12-12T06:30:28.060280Z", "start_time": "2022-12-12T06:30:01.706785Z" } }, "outputs": [], "source": [ "# me = coralme.io.pickle.load_pickle_me_model(\"./bsubtilis/MEModel-step3-bsubtilis-TS.pkl\")" ] }, { "cell_type": "markdown", "id": "b8874ac5-e7a4-473b-80e5-5b3bca962fe5", "metadata": {}, "source": [ "## Inspecting ME-model properties" ] }, { "cell_type": "markdown", "id": "caca0f28-cbf2-437e-b2ef-9af6bee233ff", "metadata": {}, "source": [ "### Summary of the ME-model" ] }, { "cell_type": "code", "execution_count": 3, "id": "a6c4835c-97d5-4583-8ccd-cec067baa26e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\t\t
| Name | \n", "\t\t\t\tcoralME | \n", "\t\t\t
| Memory address | \n", "\t\t\t\t7f1c5c495b10 | \n", "\t\t\t
| Number of metabolites | \n", "\t\t\t\t4630 | \n", "\t\t\t
| Number of reactions | \n", "\t\t\t\t7758 | \n", "\t\t\t
| Number of genes | \n", "\t\t\t\t1154 | \n", "\t\t\t
| Number of mRNA genes | \n", "\t\t\t\t1038 | \n", "\t\t\t
| Number of rRNA genes | \n", "\t\t\t\t30 | \n", "\t\t\t
| Number of tRNA genes | \n", "\t\t\t\t86 | \n", "\t\t\t
| Objective expression | \n", "\t\t\t\tdummy_reaction_FWD_SPONT | \n", "\t\t\t
| Compartments | \n", "\t\t\t\tmc, c, e | \n", "\t\t\t
| Reaction identifier | 23CN2P1_REV_BSU07840-MONOMER |
| Name | |
| Memory address | 0x7f1b98d6c9d0 |
| Stoichiometry\n", "\t\t\t | \n",
"\t\t\t\t 1.0 3amp_c + [4.47434028634533e-6*mu1] BSU07840-MONOMER + 1.0 h_c --> 1.0 23camp_c + 1.0 h2o_c \n", "\t\t\t\t1.0 3 AMP C10H12N5O7P + [4.47434028634533e-6*mu1] BSU07840-MONOMER + 1.0 H+ --> 1.0 2',3'-Cyclic AMP + 1.0 H2O H2O \n", "\t\t\t |
| 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 |
| Reaction identifier | translation_BSU00090 |
| Name | |
| Memory address | 0x7f1b9abcb310 |
| Stoichiometry\n", "\t\t\t | \n",
"\t\t\t\t 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... \n", "\t\t\t\t1.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... \n", "\t\t\t |
| 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 |
| Reaction identifier | transcription_TU8J2-1243_from_BSU25200-MONOMER |
| Name | |
| Memory address | 0x7f1b9aea4700 |
| Stoichiometry\n", "\t\t\t | \n",
"\t\t\t\t [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 \n", "\t\t\t\t[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 \n", "\t\t\t |
| 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 |
| Reaction identifier | formation_BSU00090-MONOMER |
| Name | |
| Memory address | 0x7f1b98def070 |
| Stoichiometry\n", "\t\t\t | \n",
"\t\t\t\t 4.0 protein_BSU00090 --> 1.0 BSU00090-MONOMER \n", "\t\t\t\t4.0 protein_BSU00090 --> 1.0 BSU00090-MONOMER \n", "\t\t\t |
| 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 |
| Reaction identifier | charging_tRNA_BSU_tRNA_5_AUU |
| Name | |
| Memory address | 0x7f1b9918bbe0 |
| Stoichiometry\n", "\t\t\t | \n",
"\t\t\t\t [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 \n", "\t\t\t\t[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 \n", "\t\t\t |
| 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 |
| Reaction identifier | translocation_BSU07840_Cell_Wall |
| Name | |
| Memory address | 0x7f1b98956650 |
| Stoichiometry\n", "\t\t\t | \n",
"\t\t\t\t [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 \n", "\t\t\t\t[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 \n", "\t\t\t |
| 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 |
| \n", " | count | \n", "
|---|---|
| Translation | \n", "209 | \n", "
| tRNA-Charging | \n", "135 | \n", "
| Metabolic:S_Nucleotides_and_nucleic_acids | \n", "67 | \n", "
| Metabolic:S_Coenzymes_and_prosthetic_groups | \n", "76 | \n", "
| Metabolic:S_Amino_acids_and_related_molecules | \n", "155 | \n", "
| Metabolic:S_Other_function | \n", "16 | \n", "
| Transcription | \n", "46 | \n", "
| Metabolic:S_Carbohydrates_and_related_molecules | \n", "148 | \n", "
| Metabolic:S_Cell_wall | \n", "40 | \n", "
| Metabolic:S_Lipids | \n", "55 | \n", "
| Post-translation | \n", "13 | \n", "
| Metabolic:S_Transport | \n", "235 | \n", "
| Metabolic:Not Determined | \n", "14 | \n", "
| Metabolic:S_Membrane_bioenergetics | \n", "47 | \n", "
| Metabolic: No subsystem | \n", "8 | \n", "
| Metabolic:S_Phosphate_and_sulfur | \n", "7 | \n", "