Closed rhclark closed 4 years ago
Here's a second iteration of the same problem. I'll also attach the .bngl file.
Hi Rob, I'm attaching a BioNetGen input file that illustrates RuleBender plotting bug. When the number of observables is less than the number of functions (and print_functions=>1), RuleBender doesn't plot the .gdat results. If the attached file is modified so that there is an extra observable (just uncomment out the "dummy3" line), then plotting is fine. I think I brought up this issue earlier but I don't recall if there was a resolution. I'm using a Mac with RuleBender-2.1.0.08-osx64. Help! --Bill
begin model
begin parameters L 0 N 6 K_R 0.5 K_B 0.5 K_a 3 K_i 18.2*0.001 m0 2 alpha 1.7 end parameters
begin molecule types m() end molecule types
begin seed species m() m0 end seed species
begin observables Molecules Methylation m() Molecules dummy1 m() Molecules dummy2 m()
end observables
begin functions f()=alpha(m0-Methylation) F()=f()-ln(1+(L/K_a))+ln(1+(L/K_i)) a()=1/(1+exp(NF())) end functions
begin reaction rules 0->m() K_R m()->0 ((K_R+K_B)/Methylation)*a() end reaction rules
end model
begin actions generate_network({overwrite=>1}) setParameter("L",1e-4) simulate({method=>"ode",t_start=>0,t_end=>5,n_steps=>50,print_functions=>1}) setParameter("L",1e-3) simulate({continue=>1,method=>"ode",t_start=>5,t_end=>15,n_steps=>100,print_functions=>1}) setParameter("L",0.01) simulate({continue=>1,method=>"ode",t_start=>15,t_end=>25,n_steps=>100,print_functions=>1}) setParameter("L",0.1) simulate({continue=>1,method=>"ode",t_start=>25,t_end=>35,n_steps=>100,print_functions=>1}) setParameter("L",1) simulate({continue=>1,method=>"ode",t_start=>35,t_end=>45,n_steps=>100,print_functions=>1}) setParameter("L",10) simulate({continue=>1,method=>"ode",t_start=>45,t_end=>55,n_steps=>100,print_functions=>1}) setParameter("L",100) simulate({continue=>1,method=>"ode",t_start=>55,t_end=>65,n_steps=>100,print_functions=>1}) end actions
Here's a second .bngl file that exhibits the same problem. There are comments in the file that explain how to modify it to cause the error.
For a clearer explanation of this problem, see Issue number 196. You will also find the data attached as a .txt file.
Bill was using RuleBender 2.1.0.8 when he reported this bug, so I guess we should wait for the release of RuleBender 2.2 before we try to close this one.
It looks like plotting doesn't work if the number of functions to print is greater than the number of defined observables.