{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "bMOOBVzP9ave", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "bMOOBVzP9ave", "outputId": "0342fcb8-251d-440c-b8b6-34f4b0a445aa", "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CobraMod version: 1.2.0\n", "COBRApy version: 0.29.0\n" ] } ], "source": [ "from IPython.display import display, display_html\n", "from cobramod import __version__\n", "from cobra import __version__ as cobra_version\n", "from pandas import set_option\n", "#set_option('max_rows', None)\n", "print(f'CobraMod version: {__version__}')\n", "print(f'COBRApy version: {cobra_version}')\n", "# From Escher:\n", "# This option turns off the warning message if you leave or refresh this page\n", "import escher\n", "escher.rc['never_ask_before_quit'] = True" ] }, { "cell_type": "markdown", "id": "SLOGRXdE8zOJ", "metadata": { "id": "SLOGRXdE8zOJ" }, "source": [ "\n", "# Adding a synthetic homoserine cycle to a genome-scale model of *E. coli* to reproduce *in silico* experiments" ] }, { "cell_type": "markdown", "id": "c25b3164", "metadata": { "id": "c25b3164" }, "source": [ "## Introduction\n", "\n", "In this tutorial, we use a genome-scale model of *E. coli* (`iML1515`) [1] and extend it with a synthetic homoserine cycle as described in this study [2]. The authors of the article describe current efforts to engineer microorganisms toward using methanol as a carbon source. Methanol can be oxidized into formaldehyde, which can be later utilized for the production of C3-compounds.\n", "\n", "In this paper, the authors designed a synthetic cycle (homoserine cycle) that can outperform the natural serine cycle with respect to biomass yield. In this test case, we recreate the *in silico* experiments using CobraMod and visualize the fluxes of the homoserine pathway.\n", "\n", "\n", "## Loading CobraMod, the *E. coli* model and setting the growth medium\n", "\n", "We use the BiGG Models repository to retrieve the `iML1515` model and load it using COBRApy. The model includes 2712 reactions, 1877 metabolites, and 1516 genes. Using basic shell commands, we download the model into our current working directory." ] }, { "cell_type": "code", "execution_count": 2, "id": "29a1d77b", "metadata": { "id": "29a1d77b" }, "outputs": [], "source": [ "!wget http://bigg.ucsd.edu/static/models/iML1515.xml -nc -q" ] }, { "cell_type": "markdown", "id": "GVfuxpKy9Twf", "metadata": { "id": "GVfuxpKy9Twf" }, "source": [ "We load the *E. coli* model using the COBRApy function [read_sbml_model()]( https://cobrapy.readthedocs.io/en/latest/autoapi/cobra/io/sbml/index.html#cobra.io.sbml.read_sbml_model). From CobraMod we load the function\n", "[cobramod.add_pathway()](module/cobramod/index.html#cobramod.add_pathway) and the Python module [pathlib](https://docs.python.org/3/library/pathlib.html ) to define the system's path where CobraMod stores the metabolic pathway information (`dir_data`). All the pathway information will be saved here.\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "f2e21846", "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 230 }, "execution": { "iopub.execute_input": "2021-06-04T09:23:30.608216Z", "iopub.status.busy": "2021-06-04T09:23:30.605802Z", "iopub.status.idle": "2021-06-04T09:23:33.249873Z", "shell.execute_reply": "2021-06-04T09:23:33.249480Z" }, "id": "f2e21846", "outputId": "cf174716-f279-4369-ae12-e1e98c2de946", "scrolled": false }, "outputs": [ { "data": { "text/html": [ "\n", "
| Name | \n", "iML1515 | \n", "
| Memory address | \n", "7bf6506b7fe0 | \n", "
| Number of metabolites | \n", "1877 | \n", "
| Number of reactions | \n", "2712 | \n", "
| Number of genes | \n", "1516 | \n", "
| Number of groups | \n", "0 | \n", "
| Objective expression | \n", "1.0*BIOMASS_Ec_iML1515_core_75p37M - 1.0*BIOMASS_Ec_iML1515_core_75p37M_reverse_35685 | \n", "
| Compartments | \n", "cytosol, extracellular space, periplasm | \n", "
| Pathway identifier | \n", "Homoserine-PWY |
| Name | \n", "|
| Memory address | \n", "0x0136297760899344 |
| Reactions involved | \n", " SAL, MeDH, HAL, HSK, THRS, ACALD, SERD_L, THRA, FDH, HAT |
| Genes involved | b0003, b0004, b0351, b1241, b3117, b3708, b4471, b2797, b1814, b0870, b2551 |
| Visualization attributes |
|
" ], "text/plain": [ "
| Name | \n", "iML1515 | \n", "
| Memory address | \n", "7bf633ddd250 | \n", "
| Number of metabolites | \n", "1878 | \n", "
| Number of reactions | \n", "2717 | \n", "
| Number of genes | \n", "1516 | \n", "
| Number of groups | \n", "1 | \n", "
| Objective expression | \n", "1.0*BIOMASS_Ec_iML1515_core_75p37M - 1.0*BIOMASS_Ec_iML1515_core_75p37M_reverse_35685 | \n", "
| Compartments | \n", "cytosol, extracellular space, periplasm | \n", "
| Pathway identifier | \n", "Homoserine-PWY |
| Name | \n", "|
| Memory address | \n", "0x0136297856290928 |
| Reactions involved | \n", " MeDH, HAT, THRS, THRA, HSK, SAL, ACALD, SERD_L, FDH, HAL |
| Genes involved | b0004, b2551, b0870, b0003, b0351, b1241, b2797, b1814, b3708, b3117, b4471 |
| Visualization attributes |
|
" ], "text/plain": [ "