{ "cells": [ { "cell_type": "markdown", "id": "6cb73574-304b-4cf8-8237-f872f255dd7f", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "# Parameterizing the model\n", "Multi-omics data, including fluxomics, metabolomics, and proteomics, together with enzyme kinetic databases such as [BRENDA](https://www.brenda-enzymes.org/) and [SABIO-RK](https://sabiork.h-its.org/), as well as thermodynamics resources such as [eQuilibrator](https://equilibrator.weizmann.ac.il/), provide rich sources of information for parameterizing the kinetic model. However, these measurements are typically collected from different studies and experimental conditions and inherently contain noise and uncertainty. As a result, directly combining them often fails to produce a kinetically consistent model in which the mechanistic rate laws and steady-state constraints are simultaneously satisfied.\n", "\n", "RobustNet adopts a Bayesian framework to infer feasible model parameters (posterior distributions) that remain close to the experimentally measured data (prior distributions) while trying to maintain consistency with the kinetic equations and feasible steady states.\n", "\n", "## Estimating the reference flux distribution\n", "The first step is to estimate the reference-state flux distribution, which represents the steady-state metabolic fluxes before enzyme perturbation. These fluxes are typically obtained from isotope-assisted metabolic flux analysis (MFA). Our previously developed package, [FreeFlux](https://github.com/Chaowu88/freeflux), can be used for this purpose.\n", "\n", "Because the metabolic network used for MFA may differ from the kinetic network constructed in RobustNet, a calibration step is required to derive a flux distribution that both satisfies mass balance in the current network and remains close to the MFA estimates.\n", "\n", "This step can be performed as follows:" ] }, { "cell_type": "code", "execution_count": 1, "id": "23e70e38-18a2-4d1d-b6cf-31b8530c204e", "metadata": { "scrolled": true }, "outputs": [], "source": [ "import pandas as pd\n", "from robustnet import Model\n", "\n", "MODEL_FILE = '../../models/e_coli/e_coli_model.xlsx'\n", "\n", "model = Model('ecoli')\n", "model.read_from_file(MODEL_FILE)" ] }, { "cell_type": "code", "execution_count": 2, "id": "970b518c-a401-4f38-9a0b-6e20cb2c2b4a", "metadata": { "scrolled": true }, "outputs": [], "source": [ "FLUXOMICS = '../../models/e_coli/measured_fluxes.xlsx'\n", "FLUX_BOUNDS = '../../models/e_coli/flux_bounds.xlsx'\n", "\n", "flux_data = pd.read_excel(FLUXOMICS, header=0, index_col=0)\n", "flux_bounds = pd.read_excel(FLUX_BOUNDS, header=0, index_col=0)\n", "\n", "model.load_priors(\n", " 'fluxomics',\n", " data=flux_data.iloc[:,0],\n", " std=flux_data.iloc[:,1],\n", ")\n", "fit_res = model.estimate_reference_fluxes(\n", " bounds={rxn: tuple(row) for rxn, row in flux_bounds.iterrows()},\n", " optimizer='scipy',\n", " method='COBYQA',\n", " tol=1e-8\n", ")" ] }, { "cell_type": "markdown", "id": "16b2d788-7c0a-4d9a-9047-4d8e36b5d214", "metadata": {}, "source": [ "
| \n", " | Ka_ACCOA_vPPC | \n", "Ka_FBP_vPPC | \n", "Ka_FBP_vPYK | \n", "Ka_PEP_vFBPase | \n", "Keq_vACK | \n", "Keq_vACON | \n", "Keq_vADK | \n", "Keq_vAKGDH | \n", "Keq_vALCD | \n", "Keq_vALDDH | \n", "... | \n", "kcat_vPTA | \n", "kcat_vPYK | \n", "kcat_vRPE | \n", "kcat_vRPI | \n", "kcat_vSDH | \n", "kcat_vSUCOAS | \n", "kcat_vTAL | \n", "kcat_vTKT1 | \n", "kcat_vTKT2 | \n", "kcat_vTPI | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 10973 | \n", "1.870129 | \n", "0.870527 | \n", "1.747532 | \n", "2.243964 | \n", "337.527424 | \n", "0.073662 | \n", "0.699464 | \n", "155582.867178 | \n", "1192.781793 | \n", "0.491528 | \n", "... | \n", "21.905336 | \n", "124.891760 | \n", "2.109956 | \n", "2064.644968 | \n", "76.213010 | \n", "2.473156 | \n", "13.864075 | \n", "2.043599 | \n", "1.760774 | \n", "8741.377981 | \n", "
| 7099 | \n", "2.332932 | \n", "1.868009 | \n", "0.978254 | \n", "2.331784 | \n", "322.006271 | \n", "0.033219 | \n", "0.945926 | \n", "123754.968077 | \n", "1026.579617 | \n", "0.190596 | \n", "... | \n", "131.290824 | \n", "138.561988 | \n", "1.863342 | \n", "273.485551 | \n", "59.245313 | \n", "1.070354 | \n", "12.369193 | \n", "0.937129 | \n", "1.461572 | \n", "7178.409988 | \n", "
| 6569 | \n", "2.010493 | \n", "1.770139 | \n", "0.833338 | \n", "2.076259 | \n", "141.966629 | \n", "0.115442 | \n", "0.839103 | \n", "362922.022172 | \n", "1356.087648 | \n", "0.127495 | \n", "... | \n", "155.345317 | \n", "134.760783 | \n", "2.146779 | \n", "2355.050995 | \n", "132.490001 | \n", "3.681403 | \n", "15.224663 | \n", "0.254971 | \n", "2.363003 | \n", "9332.960377 | \n", "
| 9233 | \n", "2.198546 | \n", "1.933340 | \n", "1.249352 | \n", "2.111623 | \n", "229.801055 | \n", "0.081238 | \n", "1.003101 | \n", "185048.884845 | \n", "1572.620443 | \n", "0.225697 | \n", "... | \n", "31.319926 | \n", "153.433054 | \n", "1.755173 | \n", "586.469550 | \n", "86.098486 | \n", "2.388448 | \n", "13.255742 | \n", "1.460273 | \n", "1.749851 | \n", "7113.498239 | \n", "
| 7963 | \n", "2.387464 | \n", "1.557875 | \n", "3.141863 | \n", "3.601756 | \n", "261.003044 | \n", "0.160908 | \n", "1.022405 | \n", "103608.127097 | \n", "1432.528746 | \n", "0.297042 | \n", "... | \n", "113.045903 | \n", "153.958044 | \n", "2.227516 | \n", "311.411164 | \n", "58.020611 | \n", "1.738744 | \n", "11.246085 | \n", "2.944525 | \n", "2.777271 | \n", "7547.605797 | \n", "
5 rows × 351 columns
\n", "| \n", " | AC | \n", "ACALD | \n", "ACCOA | \n", "ACETP | \n", "ADP | \n", "AKG | \n", "AMP | \n", "ATP | \n", "BPG | \n", "CIT | \n", "... | \n", "PYR | \n", "Pi | \n", "R5P | \n", "Ru5P | \n", "S7P | \n", "SUC | \n", "SUCCOA | \n", "UQ | \n", "UQH2 | \n", "Xu5P | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 9932 | \n", "0.210686 | \n", "0.181244 | \n", "0.302144 | \n", "0.186986 | \n", "0.030406 | \n", "0.052820 | \n", "0.008098 | \n", "0.479109 | \n", "0.137904 | \n", "0.147553 | \n", "... | \n", "0.054040 | \n", "0.147472 | \n", "0.018113 | \n", "0.045438 | \n", "0.145702 | \n", "0.172249 | \n", "0.132912 | \n", "0.147945 | \n", "0.141645 | \n", "0.097859 | \n", "
| 7854 | \n", "0.216531 | \n", "0.125369 | \n", "0.312520 | \n", "0.150798 | \n", "0.052235 | \n", "0.045836 | \n", "0.005128 | \n", "0.510380 | \n", "0.184664 | \n", "0.196658 | \n", "... | \n", "0.056460 | \n", "0.145168 | \n", "0.024162 | \n", "0.109934 | \n", "0.170378 | \n", "0.140536 | \n", "0.174965 | \n", "0.200266 | \n", "0.139823 | \n", "0.179706 | \n", "
| 15282 | \n", "0.210595 | \n", "0.108958 | \n", "0.337574 | \n", "0.139802 | \n", "0.055148 | \n", "0.059934 | \n", "0.005603 | \n", "0.496219 | \n", "0.177995 | \n", "0.100588 | \n", "... | \n", "0.072680 | \n", "0.157538 | \n", "0.029852 | \n", "0.024523 | \n", "0.112865 | \n", "0.213476 | \n", "0.102343 | \n", "0.084586 | \n", "0.135467 | \n", "0.219680 | \n", "
| 276 | \n", "0.202213 | \n", "0.180576 | \n", "0.287823 | \n", "0.096652 | \n", "0.083652 | \n", "0.063701 | \n", "0.006530 | \n", "0.476595 | \n", "0.177534 | \n", "0.114668 | \n", "... | \n", "0.046049 | \n", "0.091807 | \n", "0.018890 | \n", "0.113220 | \n", "0.174743 | \n", "0.144751 | \n", "0.105163 | \n", "0.112118 | \n", "0.257921 | \n", "0.093595 | \n", "
| 6274 | \n", "0.195270 | \n", "0.233839 | \n", "0.314113 | \n", "0.225211 | \n", "0.042064 | \n", "0.059626 | \n", "0.006866 | \n", "0.529823 | \n", "0.074897 | \n", "0.216247 | \n", "... | \n", "0.144874 | \n", "0.156079 | \n", "0.015216 | \n", "0.085632 | \n", "0.076764 | \n", "0.125076 | \n", "0.185114 | \n", "0.142033 | \n", "0.195642 | \n", "0.183659 | \n", "
5 rows × 50 columns
\n", "| \n", " | ACK | \n", "ACON | \n", "ADK | \n", "AKGDH | \n", "ALCD | \n", "ALDDH | \n", "ATPSyn | \n", "COX | \n", "CS | \n", "EDA | \n", "... | \n", "PPS | \n", "PTA | \n", "PYK | \n", "RPE | \n", "RPI | \n", "SDH | \n", "SUCOAS | \n", "TAL | \n", "TKT | \n", "TPI | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1219 | \n", "0.002922 | \n", "0.038921 | \n", "0.007545 | \n", "0.009021 | \n", "0.005966 | \n", "0.006592 | \n", "0.009701 | \n", "0.001923 | \n", "0.016836 | \n", "0.008288 | \n", "... | \n", "0.003619 | \n", "0.003650 | \n", "0.026954 | \n", "0.007377 | \n", "0.001651 | \n", "0.004758 | \n", "0.015840 | \n", "0.019835 | \n", "0.012376 | \n", "0.005850 | \n", "
| 18685 | \n", "0.003086 | \n", "0.043500 | \n", "0.008532 | \n", "0.009250 | \n", "0.006752 | \n", "0.006218 | \n", "0.009592 | \n", "0.001733 | \n", "0.016289 | \n", "0.009758 | \n", "... | \n", "0.003315 | \n", "0.003463 | \n", "0.023613 | \n", "0.008305 | \n", "0.001588 | \n", "0.004434 | \n", "0.014752 | \n", "0.022703 | \n", "0.013093 | \n", "0.007637 | \n", "
| 15394 | \n", "0.003669 | \n", "0.050088 | \n", "0.009360 | \n", "0.008551 | \n", "0.007302 | \n", "0.006157 | \n", "0.009723 | \n", "0.002148 | \n", "0.015850 | \n", "0.009089 | \n", "... | \n", "0.003443 | \n", "0.003760 | \n", "0.023940 | \n", "0.008740 | \n", "0.001465 | \n", "0.003998 | \n", "0.014591 | \n", "0.022720 | \n", "0.012212 | \n", "0.007396 | \n", "
| 6000 | \n", "0.003094 | \n", "0.047729 | \n", "0.008681 | \n", "0.008357 | \n", "0.008051 | \n", "0.006331 | \n", "0.009771 | \n", "0.001866 | \n", "0.017154 | \n", "0.008673 | \n", "... | \n", "0.003319 | \n", "0.004492 | \n", "0.025234 | \n", "0.007138 | \n", "0.001584 | \n", "0.004128 | \n", "0.015617 | \n", "0.019959 | \n", "0.013493 | \n", "0.007629 | \n", "
| 9147 | \n", "0.003227 | \n", "0.045774 | \n", "0.007356 | \n", "0.009303 | \n", "0.007498 | \n", "0.006192 | \n", "0.009635 | \n", "0.001931 | \n", "0.017013 | \n", "0.008218 | \n", "... | \n", "0.003567 | \n", "0.003756 | \n", "0.021409 | \n", "0.008609 | \n", "0.001349 | \n", "0.004255 | \n", "0.014663 | \n", "0.015976 | \n", "0.011786 | \n", "0.006127 | \n", "
5 rows × 48 columns
\n", "