Update old plugins to Work in the current system

 I have updated all the plugins (https://github.com/sys-bio/rrplugins/tree/master/plugins/released) working in the old system. Mostly they are not working because of the wrapper. When we pass a python string to C through CPython we need to it the format ctypes.c_char_p(String.encode('utf-8')) where String is the "string" we need to pass. Currently, the optimizer is not working if we need to fit the data by skipping any species. It is the first bad design I have seen in rrplugins. Now I am trying to port all the plugins from the old system to the new system. 

One of the optimization example where I have to fit rate K1 and K2 based on species S1, S2, and S3 is: 

Model: antimony_str = """

J1: S1 -> S2; k1*S1

J2: S2 -> S3; k2*S2   

S1 = 1; S2 = 0; S3 = 0; 

k1 = 0; k2 = 0;  """

The exact fitted value is k1 =0.45 and k2=0.15. 

My output comes out to be 

ChiSquare =  1.6501935363049038

Reduced ChiSquare =  0.017555250386222382
k1 = 0.38510152986871105  +/- 0.06085623193470731

k2 = 0.17874831118735468  +/- 0.020173064234737123.

It is not exact, but the optimization process is so fast. 

The graph of the experiment is 


Currently, I am looking forward to optimizing the parameter by skipping some species. 

Comments

Popular posts from this blog

End of GSoC 2.0

Monte Carlo Bootstrap

Provided all Libroadrunner functions to plugins using RoadRunner C API