-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag to drop units #166
Comments
That error looks like it is coming from SBML_jll via SBML.jl
😭 I'm just worried that supporting incorrect models (e.g. by having a discard_units flag) accelerates their proliferation. Imo, the model should be fixed. I cannot access the link tho. Can you send it over again? |
This file does load up fine with SBMLImporter.jl, so maybe it is something SBMLImporter supports but SBMLToolkit doesn't? |
Hi @oxinabox sorry for the delay, swamped with work. I think you need finer handling than the ODESystemImporter does. Can you try if the following produces the right simulation results? using SBML, SBMLToolkit, OrdinaryDiffEq
fn = "chassagnole2002.xml"
mdl = readSBML(fn, doc -> begin
set_level_and_version(3, 2, [], [])(doc)
convert_promotelocals_expandfuns(doc)
end)
rs = ReactionSystem(mdl)
odesys = convert(ODESystem, rs)
odesys = structural_simplify(odesys)
tspan = (0.0, 100.0)
prob = ODEProblem(odesys, [], tspan, [])
sol = solve(prob, Tsit5()) What this does is described here. It's kind of like the flag that you suggested, but a bit more general. If this solves your problem, I will update the README accordingly. |
I had to add Even once i change tspan to (0.800) Plot of that sol Plot from MEWpy (SBMLImporter near identical but not at fixed timesteps) |
Could you try plotting without |
Is your feature request related to a problem? Please describe.
I am trying to import a SMBL file.
In particular this one
When I do so i get an error:
Now I know that that file is internally consistent enough to be workable.
because it works with MEWpy's
load_ODEModel
.Which I suspect just discards unit information.
The file quiet likely is a bit messed up.
Most bio data is a mess after all
Describe the solution you’d like
I would like a flag to discard units.
readSBML(file, ODESystemImporter; discard_units=true)
Describe alternatives
We could instead have flag that controls if bad units gives an error, or warns and then falls back to no units, or silently falls back to no units.
The text was updated successfully, but these errors were encountered: