{ "cells": [ { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from cameo import models, phenotypic_phase_plane" ] }, { "cell_type": "code", "execution_count": 63, "metadata": { "collapsed": true }, "outputs": [], "source": [ "model = models.bigg.e_coli_core.copy()" ] }, { "cell_type": "code", "execution_count": 64, "metadata": { "collapsed": true }, "outputs": [], "source": [ "model.reactions.EX_o2_e.lower_bound = 0" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
IdEX_succ_e
NameSuccinate exchange
Stoichiometrysucc_e -->
Lower bound0.000000
Upper bound1000.000000
\n", " " ], "text/plain": [ "" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "model.reactions.EX_succ_e" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [], "source": [ "ppp = phenotypic_phase_plane(model,\n", " variables=[model.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=model.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "code", "execution_count": 39, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant1 = model.copy()" ] }, { "cell_type": "code", "execution_count": 40, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant1.reactions.ACKr.knock_out()\n", "mutant1.reactions.ATPS4r.knock_out()\n", "mutant1.reactions.ATPM.knock_out()\n", "mutant1.reactions.FUM.knock_out()" ] }, { "cell_type": "code", "execution_count": 41, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ppp = phenotypic_phase_plane(mutant1,\n", " variables=[mutant1.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant1.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant2 = model.copy()" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant2.reactions.ACALD.knock_out()\n", "mutant2.reactions.PYK.knock_out()\n", "mutant2.reactions.ME2.knock_out()" ] }, { "cell_type": "code", "execution_count": 36, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ppp = phenotypic_phase_plane(mutant2,\n", " variables=[mutant2.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant2.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "code", "execution_count": 42, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant3 = model.copy()" ] }, { "cell_type": "code", "execution_count": 43, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant3.reactions.ACALD.knock_out()\n", "mutant3.reactions.LDH_D.knock_out()" ] }, { "cell_type": "code", "execution_count": 44, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ppp = phenotypic_phase_plane(mutant3,\n", " variables=[mutant3.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant3.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Excercises" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Do any of these desigs work under aerobic conditions?\n", "* Can any of these designs actually be achieved with gene knockouts?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Solutions" ] }, { "cell_type": "code", "execution_count": 67, "metadata": { "collapsed": true }, "outputs": [], "source": [ "### Solution 1" ] }, { "cell_type": "code", "execution_count": 46, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "mutant1.reactions.EX_o2_e.lower_bound = -20\n", "ppp = phenotypic_phase_plane(mutant1,\n", " variables=[mutant1.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant1.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "code", "execution_count": 47, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "mutant2.reactions.EX_o2_e.lower_bound = -20\n", "ppp = phenotypic_phase_plane(mutant2,\n", " variables=[mutant2.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant2.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "code", "execution_count": 49, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "mutant3.reactions.EX_o2_e.lower_bound = -20\n", "ppp = phenotypic_phase_plane(mutant3,\n", " variables=[mutant3.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant3.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The anwer is no!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Solution 2" ] }, { "cell_type": "code", "execution_count": 53, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "'mhpF or adhE'" ] }, "execution_count": 53, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mutant3.reactions.ACALD.gene_name_reaction_rule" ] }, { "cell_type": "code", "execution_count": 54, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "'dld or ldhA'" ] }, "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mutant3.reactions.LDH_D.gene_name_reaction_rule" ] }, { "cell_type": "code", "execution_count": 58, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "adhE frozenset({, })\n", "mhpF frozenset({})\n" ] } ], "source": [ "for gene in mutant3.reactions.ACALD.genes:\n", " print(gene.name, gene.reactions)" ] }, { "cell_type": "code", "execution_count": 59, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ldhA frozenset({})\n", "dld frozenset({})\n" ] } ], "source": [ "for gene in mutant3.reactions.LDH_D.genes:\n", " print(gene.name, gene.reactions)" ] }, { "cell_type": "code", "execution_count": 65, "metadata": { "collapsed": true }, "outputs": [], "source": [ "mutant4 = model.copy()\n", "mutant4.reactions.ACALD.knock_out()\n", "mutant4.reactions.LDH_D.knock_out()\n", "mutant4.reactions.ALCD2x.knock_out()" ] }, { "cell_type": "code", "execution_count": 66, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ppp = phenotypic_phase_plane(mutant4,\n", " variables=[mutant4.reactions.BIOMASS_Ecoli_core_w_GAM],\n", " objective=mutant4.reactions.EX_succ_e)\n", "\n", "ppp.plot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The answer is yes!" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.4", "language": "python", "name": "python3.4" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.4" }, "widgets": { "state": {}, "version": "1.1.2" } }, "nbformat": 4, "nbformat_minor": 0 }