Example #1
0
    def _initializeRoadrunner(self):
        """
        Initializes the object and does error checking.

        Return
        ------
        Roadrunner
        """
        try:
            rr = te.loads(self.sbmlPath)
        except Exception as err:
            msg = "sbmlPath is not a valid file path or URL: %s" \
                  % self.sbmlPath
            self.logger.error("_initializeRoadrunner", err)
            raise ValueError(msg)
        return te.loads(self.sbmlPath)
Example #2
0
def modelHeaders(top_model):
    """

    :param top_model:
    :type top_model:
    :return:
    :rtype:
    """
    r = te.loads(top_model)
    print(r.selections)
    r.selections = [
        'time'
    ] + sorted(["[{}]".format(sid) for sid in r.getFloatingSpeciesIds()] +
               ["[{}]".format(sid)
                for sid in r.getBoundarySpeciesIds()]) + sorted(
                    r.getReactionIds()) + sorted(r.getGlobalParameterIds())
    print(r.selections)
Example #3
0
 def output_varaibles(self):
     return te.loads(self.get_sbml()).getFloatingSpeciesIds()
Example #4
0
 def test_loads_str(self):
     r = te.loads(self.sbml_str)
     self.assertIsNotNone(r)
Example #5
0
 def test_loads_file(self):
     r = te.loads(self.sbml_file)
     self.assertIsNotNone(r)
Example #6
0
 def test_loads_str(self):
     r = te.loads(self.sbml_str)
     self.assertIsNotNone(r)
Example #7
0
 def test_loads_file(self):
     r = te.loads(self.sbml_file)
     self.assertIsNotNone(r)