{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from IPython.display import display\n", "import re" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ " \n", " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from cameo import load_model\n", "from cameo.strain_design import pathway_prediction" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "model = load_model(\"iMM904\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [], "source": [ "predictor = pathway_prediction.PathwayPredictor(model=model, compartment_regexp=re.compile(\".*_c$\"))" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "Pathway 1" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idequationlower_boundupper_bound
0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2...-1000 1000
1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ...-1000 1000
2 MNXR68718 H2O + 3,4-dihydroxybenzoate <=> 3-dehydroshiki...-1000 1000
\n", "
" ], "text/plain": [ " id equation lower_bound \\\n", "0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2... -1000 \n", "1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ... -1000 \n", "2 MNXR68718 H2O + 3,4-dihydroxybenzoate <=> 3-dehydroshiki... -1000 \n", "\n", " upper_bound \n", "0 1000 \n", "1 1000 \n", "2 1000 " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Pathway 2" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idequationlower_boundupper_bound
0 MNXR230 NADP(+) + H2O + 3,4-dihydroxybenzoate <=> O2 +...-1000 1000
1 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2...-1000 1000
2 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ...-1000 1000
\n", "
" ], "text/plain": [ " id equation lower_bound \\\n", "0 MNXR230 NADP(+) + H2O + 3,4-dihydroxybenzoate <=> O2 +... -1000 \n", "1 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2... -1000 \n", "2 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ... -1000 \n", "\n", " upper_bound \n", "0 1000 \n", "1 1000 \n", "2 1000 " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Pathway 3" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idequationlower_boundupper_bound
0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2...-1000 1000
1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ...-1000 1000
2 MNXR14769 NAD(+) + 3,4-dihydroxybenzoate + H2O <=> O2 + ...-1000 1000
\n", "
" ], "text/plain": [ " id equation lower_bound \\\n", "0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2... -1000 \n", "1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ... -1000 \n", "2 MNXR14769 NAD(+) + 3,4-dihydroxybenzoate + H2O <=> O2 + ... -1000 \n", "\n", " upper_bound \n", "0 1000 \n", "1 1000 \n", "2 1000 " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Pathway 4" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idequationlower_boundupper_bound
0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2...-1000 1000
1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ...-1000 1000
2 MNXR5836 O2 + 3.0 H(+) + NADPH + anthranilate <=> catec...-1000 1000
3 MNXR7067 3,4-dihydroxybenzoate + H(+) <=> catechol + CO(2)-1000 1000
\n", "
" ], "text/plain": [ " id equation lower_bound \\\n", "0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2... -1000 \n", "1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ... -1000 \n", "2 MNXR5836 O2 + 3.0 H(+) + NADPH + anthranilate <=> catec... -1000 \n", "3 MNXR7067 3,4-dihydroxybenzoate + H(+) <=> catechol + CO(2) -1000 \n", "\n", " upper_bound \n", "0 1000 \n", "1 1000 \n", "2 1000 \n", "3 1000 " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Pathway 5" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idequationlower_boundupper_bound
0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2...-1000 1000
1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ...-1000 1000
2 MNXR6101 O2 + 3.0 H(+) + NADH(2-) + anthranilate <=> ca...-1000 1000
3 MNXR7067 3,4-dihydroxybenzoate + H(+) <=> catechol + CO(2)-1000 1000
\n", "
" ], "text/plain": [ " id equation lower_bound \\\n", "0 MNXR5336 NAD(+) + H2O + vanillin <=> vanillate + NADH(2... -1000 \n", "1 MNXR5340 formaldehyde + NAD(+) + 3,4-dihydroxybenzoate ... -1000 \n", "2 MNXR6101 O2 + 3.0 H(+) + NADH(2-) + anthranilate <=> ca... -1000 \n", "3 MNXR7067 3,4-dihydroxybenzoate + H(+) <=> catechol + CO(2) -1000 \n", "\n", " upper_bound \n", "0 1000 \n", "1 1000 \n", "2 1000 \n", "3 1000 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "pathways = predictor.run(product=\"vanillin\", max_predictions=5)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from cameo import phenotypic_phase_plane\n", "from cameo.util import TimeMachine\n", "from cameo.visualization.plotting import Grid" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "with Grid(nrows=3) as grid:\n", " for i, pathway in enumerate(pathways):\n", " with TimeMachine() as tm:\n", " pathway.plug_model(model, tm=tm)\n", " ppp = phenotypic_phase_plane(model, variables=[model.reactions.biomass_SC5_notrace], objective=pathway.product)\n", " ppp.plot(grid=grid, width=450, height=350, title=\"Pathway %i\" % (i+1), axis_font_size=\"12pt\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python@cameo-env", "language": "python", "name": "cameo-env" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }