Beispiel #1
0
 def test_simulate(self):
     dm = basico.load_example('LM')
     data = basico.get_experiment_data_from_model()
     self.assertTrue(len(data) == 5)
     df = basico.run_time_course(100, automatic=False)
     self.assertTrue(df.shape == (101, 5))
     basico.remove_datamodel(dm)
Beispiel #2
0
    def test_load_example(self):
        dm = basico.load_example('brusselator')
        self.assertTrue(dm is not None)
        self.assertTrue(isinstance(dm, COPASI.CDataModel))
        self.assertTrue('The Brusselator' in basico.model_io.overview())

        # save model to string
        copasi = basico.save_model_to_string()
        basico.remove_datamodel(dm)

        # try to load the model from string
        dm = basico.load_model(copasi)
        self.assertTrue(dm is not None)
        self.assertTrue(isinstance(dm, COPASI.CDataModel))
        self.assertTrue('The Brusselator' in basico.model_io.overview())

        # save model as temp file
        sbml_name = tempfile.mktemp()
        basico.save_model(sbml_name, type='sbml')
        cps_name = tempfile.mktemp()
        basico.save_model(cps_name, type='copasi')

        # model and data
        basico.save_model_and_data(cps_name, delete_data_on_exit=True)

        basico.remove_datamodel(dm)
Beispiel #3
0
 def setUp(self):
     dm = basico.load_example('LM-test1')
     self.assertTrue(dm is not None)
     self.assertTrue(isinstance(dm, COPASI.CDataModel))
     self.assertTrue(
         'Kinetics of a  Michaelian enzyme measured spectrophotometrically'
         in basico.model_io.overview())
     print('Running setup')
Beispiel #4
0
 def setUp(self):
     basico.load_example('bruss')
     self.assertIsNotNone(basico.get_species('X', exact=True))
Beispiel #5
0
 def setUp(self):
     self.model = basico.load_example('bruss')
     self.assertTrue(self.model.getModel().getObjectName() == 'The Brusselator')
 def setUp(self):
     self.model = basico.load_example('PK')
     self.assertTrue(self.model.getModel().getObjectName() ==
                     'Pritchard2002_glycolysis')
 def setUp(self):
     self.model = basico.load_example('LM')
     self.assertTrue(
         self.model.getModel().getObjectName() ==
         'Kinetics of a  Michaelian enzyme measured spectrophotometrically')
Beispiel #8
0
 def test_load_example(self):
     dm = basico.load_example('brusselator')
     self.assertTrue(dm is not None)
     self.assertTrue(isinstance(dm, COPASI.CDataModel))
     self.assertTrue('The Brusselator' in basico.model_io.overview())
     basico.remove_datamodel(dm)
Beispiel #9
0
 def setUp(self):
     basico.load_example('brusselator')
     self.assertEqual(basico.get_current_model().getModel().getObjectName(),
                      'The Brusselator')
Beispiel #10
0
 def setUp(self):
     dm = basico.load_example('brusselator')
     self.assertTrue(dm is not None)
     self.assertTrue(isinstance(dm, COPASI.CDataModel))
     self.assertTrue('The Brusselator' in basico.model_io.overview())
     print('Running setup')