You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to import and convert an SBML model with 50 reactions, 29 species, 34 parameters and 17 events into a ReactionSystem using the following recommended code from you example page
sbml_file = string(petab_folder, "/", model_name, ".sbml")
SBMLToolkit.checksupport_file(sbml_file)
# import the model from SBML
model = readSBML(sbml_file, doc -> begin
set_level_and_version(3, 2)(doc)
convert_promotelocals_expandfuns(doc)
end)
The problem is that model.events is a vector of Pair{String, SBML.Event} and then an element ev in values(model.events) is a Pair, so the line
for as in ev.event_assignments
cannot be executed and would need to be changed to
for as in ev[2].event_assignments
in order to grab the SBML.Event from the pair.
I am not sure whether this is something unique to my SBML model and I would need to change my import, or it is a bug in the code.
Any help is appreciated, thanks.
Vincent
The text was updated successfully, but these errors were encountered:
Hi @vwiela, thanks for reporting this issue and suggesting a solution. Looks like your model contains parameters with constant=false that are updated in an event. I added a test case and fixed the failure. Can you check if #171 works for you?
Dear all,
I am trying to import and convert an SBML model with 50 reactions, 29 species, 34 parameters and 17 events into a
ReactionSystem
using the following recommended code from you example pageThis works great and I does import the model. However, when I want to convert it then, I get an error.
Precisely it fails in the event assignment, when running through
https://github.com/SciML/SBMLToolkit.jl/blob/4e7abda2bc4501f9cd63864f8a26c7b681a6ca4a/src/drafts.jl
The problem is that
model.events
is a vector ofPair{String, SBML.Event}
and then an elementev
invalues(model.events)
is aPair
, so the linecannot be executed and would need to be changed to
in order to grab the SBML.Event from the pair.
I am not sure whether this is something unique to my SBML model and I would need to change my import, or it is a bug in the code.
Any help is appreciated, thanks.
Vincent
The text was updated successfully, but these errors were encountered: