示例#1
0
 def testRun(self):
     model = load_sbml_model(SMALL_TEST_MODEL, kind=GPR_CONSTRAINED)
     fix_bigg_model(model)
     simplify(model)
     solution = FBA(model)
     self.assertEqual(solution.status, Status.OPTIMAL)
     self.assertAlmostEqual(solution.fobj, GROWTH_RATE, places=2)
示例#2
0
    def testRun(self):
        model = load_sbml_model(SMALL_TEST_MODEL, kind=GPR_CONSTRAINED)
        fix_bigg_model(model)
        simplify(model)
        make_irreversible(model)
        simplify(model) #remove directionally blocked reactions

        model2 = load_sbml_model(SMALL_TEST_MODEL, kind=GPR_CONSTRAINED)
        fix_bigg_model(model2)
        make_irreversible(model2)
        simplify(model2)

        self.assertEqual(model.id, model2.id)
        self.assertListEqual(model.metabolites.keys(), model2.metabolites.keys())
        self.assertListEqual(model.reactions.keys(), model2.reactions.keys())
        self.assertDictEqual(model.stoichiometry, model2.stoichiometry)
        self.assertDictEqual(model.bounds, model2.bounds)
        self.assertListEqual(model.genes.keys(), model2.genes.keys())
        self.assertDictEqual(model.rules, model2.rules)