{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Case study iMM904 curation\n", " Using the iMM904 model as a case study, we have used Thermo-Flux and did the few manual curation steps to show how models can be converted into a combined thermodynamic-stoichiometric model.\n", "Here, we present the steps that required manual attention when following the protocol described in the publication. \"\n", " " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import cobra\n", "from cobra import Model, Reaction, Metabolite\n", "from thermo_flux.core.metabolite import ThermoMetabolite\n", "import thermo_flux\n", "from thermo_flux.io import load_excel as ex\n", "from thermo_flux.core.model import ThermoModel, ThermoReaction\n", "from equilibrator_api import Q_\n", "import pandas as pd\n", "from thermo_flux.io import load_gams as gs\n", "from thermo_flux.io import helper_load as hl\n", "from thermo_flux.utils.vis import compare_met\n", "import numpy as np\n", "import gurobipy as gp\n", "from gurobipy import GRB\n", "\n", "\n", "import seaborn as sns\n", "import matplotlib.pyplot as plt\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import sbml model from BiGG" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set parameter Username\n", "Academic license - for non-commercial use only - expires 2025-02-26\n", "0.9748814206733495\n" ] }, { "data": { "text/html": [ "
| \n", " | fluxes | \n", "reduced_costs | \n", "
|---|---|---|
| EX_epistest_SC_e | \n", "0.0 | \n", "-96.275549 | \n", "
| EX_epist_e | \n", "0.0 | \n", "-1.676719 | \n", "
| EX_ergst_e | \n", "0.0 | \n", "-1.722387 | \n", "
| EX_ergstest_SC_e | \n", "0.0 | \n", "-96.321217 | \n", "
| EX_13BDglcn_e | \n", "0.0 | \n", "-0.196130 | \n", "
| ... | \n", "... | \n", "... | \n", "
| EX_xyl__D_e | \n", "0.0 | \n", "-0.163442 | \n", "
| EX_xylt_e | \n", "0.0 | \n", "-0.176421 | \n", "
| EX_rib__D_e | \n", "0.0 | \n", "-0.163442 | \n", "
| EX_zymst_e | \n", "0.0 | \n", "-1.620476 | \n", "
| EX_zymstest_SC_e | \n", "0.0 | \n", "-96.219306 | \n", "
164 rows × 2 columns
\n", "| Reaction identifier | ATPS3v | \n", "
| Name | ATP synthase vacuole | \n", "
| Memory address | \n", "0x16d19f17f40 | \n", "
| Stoichiometry | \n", "\n",
" adp_v + 3.0 h_c + pi_v --> atp_v + h2o_v + 2.0 h_v \n", "ADP C10H12N5O10P2 + 3.0 H+ + Phosphate --> ATP C10H12N5O13P3 + H2O H2O + 2.0 H+ \n", " | \n",
"
| GPR | YBR127C and YDL185W and YEL027W and YEL051W and YGR020C and YHR026W and YHR039C_A and YKL080W and... | \n", "
| Lower bound | 0.0 | \n", "
| Upper bound | 500 | \n", "
| Reaction identifier | ATPS3v | \n", "
| Name | ATP synthase vacuole | \n", "
| Memory address | \n", "0x16d19f17f40 | \n", "
| Stoichiometry | \n", "\n",
" adp_v + 3.0 charge_c + 3.0 h_c + pi_v --> atp_v + 3.0 charge_v + h2o_v + 3.021815 h_v \n", "ADP C10H12N5O10P2 + 3.0 charge + 3.0 H+ + Phosphate --> ATP C10H12N5O13P3 + 3.0 charge + H2O H2O + 3.021815 H+ \n", " | \n",
"
| GPR | YBR127C and YDL185W and YEL027W and YEL051W and YGR020C and YHR026W and YHR039C_A and YKL080W and... | \n", "
| Lower bound | 0.0 | \n", "
| Upper bound | 500 | \n", "