From e29d2acba1404f5508ae1d6f1c4406f047e780fb Mon Sep 17 00:00:00 2001 From: seanebum Date: Mon, 10 Aug 2020 14:40:04 -0400 Subject: [PATCH 1/3] now sets ode propensity function for custom propensities from stochml --- gillespy2/core/model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gillespy2/core/model.py b/gillespy2/core/model.py index f45cfd22b..aa5719e7d 100644 --- a/gillespy2/core/model.py +++ b/gillespy2/core/model.py @@ -1114,6 +1114,7 @@ def to_model(self, name): raise InvalidStochMLError( "Found a customized propensity function, but no expression was given. {}".format(e)) reaction.propensity_function = propfunc + reaction.ode_propensity_function = propfunc else: raise InvalidStochMLError( "Unsupported or no reaction type given for reaction" + name) From e0376a13d1ed1b16793c86ab317736d8cfd84972 Mon Sep 17 00:00:00 2001 From: Fin Carter Date: Tue, 25 Aug 2020 13:05:43 -0400 Subject: [PATCH 2/3] - Fix on line 76 of results.py, species were never added to a legend group, leading to unexpected behavior. When each species belongs to the SAME legend group (i.e, the name displayed on the legend, ex: substrate), and you click on that "name" or "legend group" on the legend, all members of that legend group will disappear as expected --- gillespy2/core/results.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gillespy2/core/results.py b/gillespy2/core/results.py index 95202094c..810b5f0dd 100644 --- a/gillespy2/core/results.py +++ b/gillespy2/core/results.py @@ -42,7 +42,7 @@ def _plotplotly_iterate(trajectory, show_labels=True, trace_list=None, line_dict import plotly.graph_objs as go - for i,species in enumerate(trajectory.data): + for i, species in enumerate(trajectory.data): if species != 'time': if species not in included_species_list and included_species_list: @@ -61,7 +61,8 @@ def _plotplotly_iterate(trajectory, show_labels=True, trace_list=None, line_dict y=trajectory.data[species], mode='lines', name=species, - line = line_dict + line=line_dict, + legendgroup=species ) ) else: @@ -72,6 +73,7 @@ def _plotplotly_iterate(trajectory, show_labels=True, trace_list=None, line_dict mode='lines', name=species, line=line_dict, + legendgroup=species, showlegend=False ) ) @@ -432,6 +434,7 @@ def plotplotly(self, index=None, xaxis_label="Time ", yaxis_label="Species Popul trace_list = _plotplotly_iterate(trajectory, trace_list=trace_list, included_species_list= included_species_list) + layout = go.Layout( showlegend=show_legend, title=title, From 170b2b1726dfe11cd4060e49d6cd815c451f0308 Mon Sep 17 00:00:00 2001 From: Sean Matthew Date: Wed, 26 Aug 2020 13:30:34 -0400 Subject: [PATCH 3/3] Bump version to 1.5.4 --- gillespy2/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gillespy2/__version__.py b/gillespy2/__version__.py index 2bb83d52b..e38d7bc98 100644 --- a/gillespy2/__version__.py +++ b/gillespy2/__version__.py @@ -5,7 +5,7 @@ # @website https://github.com/GillesPy2/GillesPy2 # ============================================================================= -__version__ = '1.5.3' +__version__ = '1.5.4' __title__ = 'GillesPy2' __description__ = 'Python interface for Gillespie-style biochemical simulations' __url__ = 'https://github.com/GillesPy2/GillesPy2'