ReactionNetworkImporters.jl
ReactionNetworkImporters.jl copied to clipboard
`functions` is not recognized
Hi, thanks for developing and maintaining the amazing tool!
Reproduce:
I am testing a simple Michaelis-Menten model provided in BioNetGen. I installed this file locally and renamed it "mm.net".
When running the following code,
using ReactionNetworkImporters
using Sundials
fname = "mm.net"
prnbng = loadrxnetwork(BNGNetwork(), fname);
rn = prnbng.rn;
tf = 1000.0
oprob = ODEProblem(rn, Float64[], (0.0, tf), Float64[])
sol = solve(oprob,CVODE_BDF(), saveat = tf / 1000.0)
Although michment
is defined at line 11 (begin functions ~ end functions section), I got the following message.
UndefVarError: michment not defined
I would like to know whether the functions
definition is supported in this package.
Version info
- Julia: v1.7
- ReactionNetworkImporters.jl: v0.14
I noticed this is already discussed #4. I am sorry..
Yeah, the main issue is I’ve never found documentation on how the function block is supposed to work. That would make it a lot easier to understand what is needed here.
Di you try importing via SBML using SBMLToolkit?
Hi @isaacsas, thank you for your reply.
Yes, and if I import the model via SBML using SBMLToolkit.jl
, it works fine.
However, it seems that SBMLToolkit.jl
dose not support enegy-based BioNetGen specification, e.g., https://github.com/himoto/rosa_webinar_20Jan2021/blob/main/toy_example_RAF_RAFi.sbml.
I found that I could import eBNG models via .net file using ReactionNetworkImporters.jl
and that's why I hope funcitons
is supported in this package.
Got it. Unfortunately, I have never found documentation for the net file function block, which makes understanding how it is supposed to work a bit difficult. I'd like to add support for this at some point, but I'm not sure I'll have time myself to work on it in the near term. If you'd like to give it a shot to add such support via a PR, the code for loading / parsing net files is relatively short:
https://github.com/SciML/ReactionNetworkImporters.jl/blob/master/src/parsing_routines_bngnetworkfiles.jl
Thank you very much @isaacsas, I will look into the net file function block.