#!/usr/bin/env python # coding: utf-8 # In[1]: import logging # In[2]: logging.basicConfig(level="DEBUG") # In[3]: from cobra.test import create_test_model # In[4]: from cobra.flux_analysis import single_gene_deletion # In[5]: model = create_test_model("textbook") # In[6]: genes = ['b0008', 'b0114', 'b2276', 'b1779'] # In[7]: model.solver = "cplex" # In[8]: logging.getLogger().setLevel(logging.DEBUG) # In[9]: get_ipython().run_line_magic('time', 'single_gene_deletion(model, method="linear room", gene_list=genes, processes=1)') # In[10]: model.solver = "gurobi" # In[11]: get_ipython().run_line_magic('time', 'single_gene_deletion(model, method="linear room", gene_list=genes, processes=1)') # In[12]: model.solver = "glpk" # In[13]: model.solver.configuration.timeout = 20 # In[14]: get_ipython().run_line_magic('time', 'single_gene_deletion(model, method="linear room", gene_list=genes, processes=1)') # In[ ]: