Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_sbml_to_gillespy_success_with_stochss_model(self):
sbml_file = "stochss-pkg/tests/mock_file_sys/sbml_files/test1.sbml"
gillespy2_model, errors = convert_to_gillespy_model(sbml_file)
self.assertIsInstance(gillespy2_model, Model)
self.assertIsInstance(errors, list)
stddev_plot["config"] = {"responsive": True,}
plots['stddev'] = stddev_plot
avg_plot = results.average_ensemble().plotplotly(return_plotly_figure=True)
avg_plot["config"] = {"responsive": True,}
plots['avg'] = avg_plot
plot = results.plotplotly(return_plotly_figure=True)
plot["config"] = {"responsive": True,}
plots['trajectories'] = plot
with open(os.path.join(self.res_path, 'plots.json'), 'w') as plots_file:
json.dump(plots, plots_file, cls=plotly.utils.PlotlyJSONEncoder)
class _Model(Model):
'''
##############################################################################
Build a GillesPy2 model.
##############################################################################
'''
def __init__(self, name, species, parameters, reactions, events, rate_rules,
assignment_rules, function_definitions, endSim, timeStep, volume):
'''
Initialize and empty model and add its components.
Attributes
----------
name : str
Name of the model.
species : list
List of GillesPy2 species to be added to the model.