import logging
logging.basicConfig(level="DEBUG")
from cobra.test import create_test_model
DEBUG:optlang.util:Gurobi python bindings found at /home/moritz/.virtualenvs/cobra/lib/python3.5/site-packages/gurobipy DEBUG:optlang.util:GLPK python bindings found at /home/moritz/.virtualenvs/cobra/lib/python3.5/site-packages/swiglpk DEBUG:optlang.util:Mosek python bindings not available. DEBUG:optlang.util:CPLEX python bindings found at /home/moritz/.virtualenvs/cobra/lib/python3.5/site-packages/cplex DEBUG:optlang.util:Scipy solver not available DEBUG:pip._internal.utils.misc:lzma module is not available DEBUG:pip._internal.vcs:Registered VCS backend: git DEBUG:pip._internal.vcs:Registered VCS backend: hg DEBUG:pip._internal.vcs:Registered VCS backend: svn DEBUG:pip._internal.vcs:Registered VCS backend: bzr
from cobra.flux_analysis import single_gene_deletion
model = create_test_model("textbook")
genes = ['b0008', 'b0114', 'b2276', 'b1779']
model.solver = "cplex"
logging.getLogger().setLevel(logging.DEBUG)
%time single_gene_deletion(model, method="room", gene_list=genes, processes=1)
WARNING:root:Warning: No solution found from 6 MIP starts.
CPU times: user 21.4 s, sys: 84.2 ms, total: 21.5 s Wall time: 3.23 s
growth | status | |
---|---|---|
ids | ||
(b1779) | 45.0 | optimal |
(b0008) | 0.0 | optimal |
(b0114) | 27.0 | optimal |
(b2276) | 46.0 | optimal |
model.solver = "gurobi"
%time single_gene_deletion(model, method="room", gene_list=genes, processes=1)
CPU times: user 1.97 s, sys: 4.23 ms, total: 1.98 s Wall time: 1.97 s
growth | status | |
---|---|---|
ids | ||
(b1779) | 45.0 | optimal |
(b0008) | 0.0 | optimal |
(b0114) | 27.0 | optimal |
(b2276) | 46.0 | optimal |
model.solver = "glpk"
model.solver.configuration.timeout = 20
%time single_gene_deletion(model, method="room", gene_list=genes, processes=1)
DEBUG:optlang.glpk_interface:Status undefined. GLPK status code returned by glp_simplex was 1
CPU times: user 1min 21s, sys: 53.1 ms, total: 1min 21s Wall time: 1min 21s
growth | status | |
---|---|---|
ids | ||
(b1779) | 45.0 | optimal |
(b0008) | 0.0 | optimal |
(b0114) | NaN | time_limit |
(b2276) | NaN | time_limit |