{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import logging" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "logging.basicConfig(level=\"INFO\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "from cobra.io import load_model" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from cobra.flux_analysis import flux_variability_analysis" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "INFO:cobra.core.model:The current solver interface glpk doesn't support setting the optimality tolerance.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Scaling...\n", " A: min|aij| = 1.000e+00 max|aij| = 1.000e+00 ratio = 1.000e+00\n", "Problem data seem to be well scaled\n" ] } ], "source": [ "model = load_model(\"iJO1366\")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 7.15 s, sys: 119 ms, total: 7.27 s\n", "Wall time: 7.55 s\n" ] }, { "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", " \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", "
minimummaximum
DM_4crsol_c0.0002080.000219
DM_5drib_c0.0002100.112258
DM_aacald_c0.0000000.000000
DM_amob_c0.0000020.000002
DM_mththf_c0.0004180.515309
.........
ZN2abcpp0.00000011.842500
ZN2t3pp0.00000047.370000
ZN2tpp0.00000047.370318
ZNabcpp0.0000009.474064
Zn2tex0.0003180.000335
\n", "

2583 rows × 2 columns

\n", "
" ], "text/plain": [ " minimum maximum\n", "DM_4crsol_c 0.000208 0.000219\n", "DM_5drib_c 0.000210 0.112258\n", "DM_aacald_c 0.000000 0.000000\n", "DM_amob_c 0.000002 0.000002\n", "DM_mththf_c 0.000418 0.515309\n", "... ... ...\n", "ZN2abcpp 0.000000 11.842500\n", "ZN2t3pp 0.000000 47.370000\n", "ZN2tpp 0.000000 47.370318\n", "ZNabcpp 0.000000 9.474064\n", "Zn2tex 0.000318 0.000335\n", "\n", "[2583 rows x 2 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%time flux_variability_analysis(model, fraction_of_optimum=0.95, processes=1)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 106 ms, sys: 75.7 ms, total: 182 ms\n", "Wall time: 4.74 s\n" ] }, { "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", " \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", "
minimummaximum
DM_4crsol_c0.0002080.000219
DM_5drib_c0.0002100.112258
DM_aacald_c0.0000000.000000
DM_amob_c0.0000020.000002
DM_mththf_c0.0004180.515309
.........
ZN2abcpp0.00000011.842500
ZN2t3pp0.00000047.370000
ZN2tpp0.00000047.370318
ZNabcpp0.0000009.474064
Zn2tex0.0003180.000335
\n", "

2583 rows × 2 columns

\n", "
" ], "text/plain": [ " minimum maximum\n", "DM_4crsol_c 0.000208 0.000219\n", "DM_5drib_c 0.000210 0.112258\n", "DM_aacald_c 0.000000 0.000000\n", "DM_amob_c 0.000002 0.000002\n", "DM_mththf_c 0.000418 0.515309\n", "... ... ...\n", "ZN2abcpp 0.000000 11.842500\n", "ZN2t3pp 0.000000 47.370000\n", "ZN2tpp 0.000000 47.370318\n", "ZNabcpp 0.000000 9.474064\n", "Zn2tex 0.000318 0.000335\n", "\n", "[2583 rows x 2 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%time flux_variability_analysis(model, fraction_of_optimum=0.95, processes=4)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "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.7.1" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": false, "sideBar": true, "skip_h1_title": true, "title_cell": "Table of Contents", "title_sidebar": "Table of Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": true } }, "nbformat": 4, "nbformat_minor": 2 }