Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate I-V plots for ion channels #20

Closed
VahidGh opened this issue Dec 29, 2014 · 12 comments
Closed

generate I-V plots for ion channels #20

VahidGh opened this issue Dec 29, 2014 · 12 comments

Comments

@VahidGh
Copy link
Member

VahidGh commented Dec 29, 2014

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, m_tau ,etc .dat files, which also lacks h_inf , h_tau .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.

@rayner
Copy link
Contributor

rayner commented Jan 2, 2015

I just updated the iv_analyse.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.

@VahidGh
Copy link
Member Author

VahidGh commented Jan 3, 2015

Thank you @rayner , but in the new version of the LEMS template, we have m_tau, m_inf, 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!):
i-v_curves_ca_k

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.

@slarson
Copy link
Member

slarson commented Jan 4, 2015

@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.

@VahidGh
Copy link
Member Author

VahidGh commented Jan 4, 2015

@slarson Yes, that's working.

@slarson
Copy link
Member

slarson commented Jan 6, 2015

@VahidGh great! Can we close this issue then?

@VahidGh
Copy link
Member Author

VahidGh commented Jan 6, 2015

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).

@VahidGh
Copy link
Member Author

VahidGh commented Jan 24, 2015

@slarson, With the help of @pgleeson's CompareToNeuroML2 script, added this script that generates the I-V plots of interest from our NeuroML2 files:
i-v_curves_ca_k_from_nml

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.

@rgerkin
Copy link
Member

rgerkin commented Jan 29, 2015

I left a comment in #30 about a small problem I am having in these simulations. It may be a function of my implementation.

@slarson
Copy link
Member

slarson commented Feb 2, 2015

@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.

@VahidGh
Copy link
Member Author

VahidGh commented Feb 3, 2015

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.

@VahidGh
Copy link
Member Author

VahidGh commented Feb 3, 2015

This is the digitized version of this plot:
ca_i-v_digitized

@travs travs added this to the Model Validation milestone May 7, 2015
@slarson
Copy link
Member

slarson commented Jun 13, 2015

There are now several ways to this; recommend way is here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants