Skip to content

Instantly share code, notes, and snippets.

@cdiener cdiener/bug245.py
Created Apr 5, 2016

Embed
What would you like to do?
#/usr/bin/env python
from cobra.test import create_test_model
from cobra.flux_analysis import single_gene_deletion
cobra_model = create_test_model("textbook")
dels = {"b0008": 0.87, "b0114": 0.71, "b0116": 0.56, "b2276": 0.11, "b1779": 0.00}
rates, statuses = single_gene_deletion(cobra_model, gene_list=dels.keys(),
method="moma", solver="mosek")
for gene in dels:
if statuses[gene] != 'optimal':
raise ValueError("Non-optimal status: {}".format(statuses[gene]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.