Posts

End of GSoC 2.0

    My second innings of Google Summer of Code comes to an end. I have learned a lot of things. There is still some work left which I will complete after my exams. The link to my summer internship report is https://gist.github.com/debashish05/e1ec288a81d77e0fe61cbf336d147109 . I have learned a lot of things from my mentors and develop an inclination towards research. Works Done during this period: 1) RRPlugins have been integrated with Libroadrunner. So we don't require a separate build for rrplugins. Earlier this task was achieved in my last year project. But the problem is the change in roadrunner will force the plugins to need to rebuild, which is not the case now. 2) Build time will reduce since the plugins and roadrunner are not interdependent. Updated all the plugins (https://github.com/sys-bio/rrplugins/tree/master/plugins/released), in the current system. Earlier these plugins were not working due to outdated wrapper and some minor bugs. 3) Updated Python wrapper for rrplug

Monte Carlo Bootstrap

Image
 The main work of Monte Carlo is to " Get some confidence   estimates".   The Monte Carlo plugin is used to obtain estimates of the confidence limits for a model’s parameters. This is in the context where experimental data exists and a parameter minimization method, such as Levenberg-Marquardt or Nelder-Mead has already been used in order to find a parameter minimum. The Monte Carlo algorithm is used subsequently at this minimum and will give an estimate of parameter confidence limits corresponding to the variance in the original experimental data. The plugin has properties such as the size of the Monte Carlo population, minimization algorithm to use (e.g. Nelder-Mead or Levenberg-Marquardt), and on output, confidence limits for each involved parameter. With some past updates, Monte Carlo is not working mainly due to the modifications in rrplugins and change of python version from 2.x to 3.x. I have modified the wrapper to let it work. Majorly the problem was with the passing

Update old plugins to Work in the current system

Image
 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

Moved addNoise plugin to the new architecture

Image
 So finally I have moved on to the architecture system that I have developed. Where a change in the host doesn't need to rebuild plugins and change in the plugin didn't need to rebuild host. It is supposed to be the same but the earlier host consist of two different projects and one project has a dependency over others. Let's denote it by two projects A and B with plugin C. Now B is dependent on A and if the functionality of A is used by plugin and A gets changed then the whole system needs to rebuild. The main problem was to maintain backward compatibility and not to break anything.  We need to remove this dependency thing and made it simple between hosts and plugins. I also modified some plugins to work in the new architecture.  Now I looking to port old plugins to the new system. Around 3 weeks are left for the final submission and I am also left with the optimizer and moving old plugins to the new architecture.  One of the examples of plugin added to the new system.  &g

Adding addNoise plugin and provider roadrunner functionality to plugins

Image
In last week I mainly try to focus on three parts of my project: 1) Adding roadrunner support to the plugin, 2) Adding a simple plugin, and 3) Building wrapper. I am able to achieve the first two tasks but stuck with the last part. The wrapper already built is quite tricky. It is a CPython wrapper but the code is clearly understandable and most probably will finish with the wrapper part and submit a pull request including auto2000 plugin which is used for bifurcation analysis by the end of this month. The learning curve in Google's summer of code is pretty high. It is almost impossible that you learn every technology needed for the project. Will keep updating this blog about my further progress in the project. The final architecture will be as follows:

Adding RRPlugins (Loader) to LibRoadRunner

Finally, I finished removing 4412 bugs to 0 :D.   I add a large codebase in roadrunner and I know there will be a lot of conflicts between them as they may do share common variables and similar files. I first started with modifying CMake files and then modified the source files such that there will be no conflict. But when I started building it is giving some error in windows files of windows software development kit which is strange since I am not using any system-dependent files. Then I found out that accidentally many variables between two projects get interlinked due to error-prone cmake lists. It was a hard time finding the bug. And there are no debuggers available for the build process so I have to go manually line by line and find out the problem. I wonder how patient developers from the nineties since at that there are no such high tech IDK and developers have to manually do most of the things. Anyway, I resolved the issue and will start my work with the wrapper part Now

Provided all Libroadrunner functions to plugins using RoadRunner C API

We are completely driven by self-interest. In the last week, I realized that building everything from scratch will be reinventing the wheel and at some point in time we have to reuse someone else written code in our program. So, I thought to use rrplugins in my code and worked on how to remove the dependency of LibRoadRunner. As of now, I decided to provide plugins all roadrunner functions through a C API which is already built. Now the main problems lie in removing roadrunner dependency from the plugin loader. For which will discuss a solution with mentors tomorrow early morning. This week I understand some basic concepts which I missed in my class. The detailed difference between dynamic and static linking. A brief concept is in this link  https://www.geeksforgeeks.org/difference-between-static-and-shared-libraries/ .  Also in this Wuhan Corona Virus pandemic time due to my university will conduct my end semester exams. So I will be not be working on this project from 12th to