Closed VahidGh closed 9 years ago
I just updated the ivanalyse.py script so that it looks at all i*.lems.dat files in the current directory, instead of relying on a hard-coded list.
I've also added a "peak absolute value" output column and graph, to help with replicating the Ca channel I/V graph.
The plots produced by this seem to be inverted relative to the ones in Boyle & Cohen (2008), so I think our simulation must be recording the current on the opposite side of the membrane to theirs, or something along those lines.
Thank you @rayner , but in the new version of the LEMS template, we have m_tau, minf, etc .dat output files instead of i*.lems.dat (if we are going to use the new template) Also, I was working on your python version of the main matlab version then, and I could generate curves close to what we needed with parameters from the main input.csv file (if we use the same parameters here, we should have the same result!):
In general, for validation purposes, it would be great if we've had some general script to compare every ion channel model we use in the project, with the curves and parameters from literature.
@VahidGh following today's meeting; let me know if you are able to use the modified template under Rayner's fork of the BlueBrainShowcase to generate the I/V plots as he showed today. We'll be moving this into the OpenWorm organization soon.
@slarson Yes, that's working.
@VahidGh great! Can we close this issue then?
It depends on what do we expect from the output of these curves. If the aim is to compare every ion channel's I-V relationship from literature with our simulations, then we have to improve this one. But if we are going to be sure of the validity of our simulation of these 4 ion channels from Boyle & Cohen model, then with a negligible, we can close this issue (for example, by dividing the currents value of the inverted version of the Ca ion channel by the membrane conductance value (manually, because Cmem is not accessible from this script), it is comparable with the I-V curve from this paper).
@slarson, With the help of @pgleeson's CompareToNeuroML2 script, added this script that generates the I-V plots of interest from our NeuroML2 files:
One problem is with the inactivation expressions in calcium current, that surprisingly missing from the original Matlab version. it seems that the combination of values -5 for k_f and 25.2 for V_half_f, causing ineffectiveness of the inactivation expression for the whole Ca current. I'm working on this issue...
Another TO DO is to generalize this script for #30 that the script could get any channel NeuroML2 file (and some other parameters as input) and generate an I-V plot.
I left a comment in #30 about a small problem I am having in these simulations. It may be a function of my implementation.
@VahidGh Awesome progress! Question -- can we post the target values for these curves that come from digitising the figures directly from the papers? I'm envisioning a script that enables us to plot both the real and simulated data on top of each other and then quantifies how close the fit is in a manner that can be fed into a unit test.
Yes, As an example, I digitized the figure from #30, I can do the same here. FYI, Plotly also provides some great API which are very useful. I think we can do something about this plotting comparison issue via it's Github Python API.
Following discussions in this issue, in order to compare I-V plots for each ion channel with the corresponding plot from literature, we need some script. Here we have this one which is not compatible with the last updates (in the new version, something like
jnml LEMS_Test_k_fast.xml
generates m_inf, mtau ,etc .dat_ files, which also lacks h_inf , htau .dat_ files, in the case of Ca ion channel). Temporally, I wrote this script which in, the out-most generated curve is the needed one, but finally we need some code to generate the plots from LEMS file.