def test_gapFind_exp(self): solver = GlpkSolverLazy() model = '../../../examples/models/toy_model' self.model = read_model_from_file(model, kind=CONSTRAINT_BASED) fix_bigg_model(self.model) print self.model framed_result = GapFind(self.model, solver, root_gaps_only=True) print framed_result
def testRun(self): model = load_sbml_model(SMALL_TEST_MODEL, kind=CONSTRAINT_BASED) fix_bigg_model(model) write_model_to_file(model, PLAIN_TEXT_COPY) model_copy = read_model_from_file(PLAIN_TEXT_COPY, kind=CONSTRAINT_BASED) solution = FBA(model_copy) self.assertEqual(solution.status, Status.OPTIMAL) self.assertAlmostEqual(solution.fobj, GROWTH_RATE, places=2)
def test_gapFind_gurobi_simpleToyModel(self): solver = GlpkSolverLazy() model = '../../../examples/models/gapFill/toy_model_simple_holes' reactionsDB = '../../../examples/models/gapFill/toy_model_simple_DB' self.model = read_model_from_file(model, kind=CONSTRAINT_BASED) fix_bigg_model(self.model) framed_result = GapFill(self.model, reactionsDB, solver, 'R_EX_Biomass', 0.05, 'txt') self.assertEquals(framed_result[1], ['R_EX_gluc1', 'R_gluc1_A', 'R_A_B'])
def testRun(self): model = load_sbml_model(SMALL_TEST_MODEL, kind=CONSTRAINT_BASED) write_model_to_file(model, PLAIN_TEXT_COPY) model_copy = read_model_from_file(PLAIN_TEXT_COPY, kind=CONSTRAINT_BASED) self.assertListEqual(sorted(model.metabolites.keys()), sorted(model_copy.metabolites.keys())) self.assertListEqual(model.reactions.keys(), model_copy.reactions.keys()) self.assertDictEqual(dict(model.stoichiometry), dict(model_copy.stoichiometry)) self.assertDictEqual(model.bounds, model_copy.bounds)