Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Werner Van Geit
@wvangeit
if min_spike_height is not set that feature will indeed return a NaN
and there is no function in the python api that enables you to set that variable
Werner Van Geit
@wvangeit
Ok, I've extended the API, so that a user can set these kind of variables
if you download/install the latest version of the eFEL, you should be able to do 'efel.setDoubleSetting("min_spike_height", 20.0)'
let me know if this helps.
otherwise it might be useful if you could share a small example that reproduces the problem, then I can debug further
@derekhoward, sorry, I forgot to mention your username in the previous messages. See above for my reply
Werner Van Geit
@wvangeit
for future reference: the issue above was in the end fixed using the 'Threshold' setting in Libv4:peak_indices instead of 'threshold'. A unit test was added for this specific case.
Russell Jarvis
@russelljjarvis
Hi,
I am wondering if it would be easy to modify the source code of eFEL such that the method
efel.getFeatureValues()
Returns a dictionary containing 0 dict values when the function is called with waveform features that don't exist (for example you call getFeatureValues with spikeCount, but the waveform contains no spikes)? Currently feel.getFeatureValues() returns a dictionary containing None type dict values if you call it with arguments pertaining to features that don't actually exist in waveforms. However the None dictionary values make the dictionary difficult to iterate over. Leading to code such as: result = efel.getFeatureValues(
traces, [
'voltage_base', 'Spikecount', 'min_voltage_between_spikes', 'AP_height', 'steady_state_voltage_stimend'])
assert (len(result)!=0)feature_list in result[0].items():
if feature_list is not None and len(feature_list) > 0:
feature_values[feature_name] = np.mean(feature_list)
I think eFEL would be easier to work with if SpikeCount returned zero instead of None, if the neuron doesn't spike. Which part of the source code should I modify?
Werner Van Geit
@wvangeit
@russelljjarvis I think there are slightly two different issues here. I agree that Spikecount should return 0 when there is no spike in the trace, and this is actually also the expect behavior. There is even a test in the eFEL that checks this feature on an empty trace, and makes sure 0 is returned. Could you share the trace you have problems with, so that I can see if I can fix Spikecount for that trace ?
@russelljjarvis however, I'm not in favour of returning 0 in general when a feature fails. '0' could have a specific meaning for a certain feature (which might be different from having the feature fail), the reason to return 'None' is distinguish these cases
Werner Van Geit
@wvangeit
@russelljjarvis btw, you maybe attach the trace by creating an issue for this
Russell Jarvis
@russelljjarvis
Hi Werner, I yes thats fine. I will get those traces for you and attach them to an issue in eFEL on github. I guess its also possible to have a dictionary that is full on None value items which is also easy to iterate over, thats probably your intention too. I will also send the error message when I attempt to iterate over the dict containing None items. Also unrelated is there an existing feature for removing spikes from a trace, and returning only a trace filled with subthreshold membrane potential deflections?
Werner Van Geit
@wvangeit
@russelljjarvis I don't think that the eFEL has features that return full traces. I think it might be possible, with possibly one issue. Normall the eFEL interpolates the traces before doing the feature extraction. So the resulting trace might have been interpolate. If you want such a feature, you can always create a request using a github issue. If you could provide a python 'pseudocode' implementation that would be great.
Russell Jarvis
@russelljjarvis
Hi Werner, I am also wondering what to do with the 'stim_start', and 'stim_end' dictionary keys if there is no stimulus in the period you are measuring spiking? For-instance I have a signal from an off type Retinal Ganglion cell which spikes spontaneously. A negative current injection has been applied to the signal, however the membrane potential recording has been broken down into 4 different time blocks, which are each analysed individually. The fourth time block has no stimulus, so how can I assign the keys 'stim_start', and 'stim_end' a zero value without causing an error?
Werner Van Geit
@wvangeit
hi @russelljjarvis, did you try to set the stim_start to 0, and stim_end to the max time in the trace ?
This should normally work, let me know if it generates errors for a certain feature
Russell Jarvis
@russelljjarvis
Okay sure. No I have not tried that yet.
Russell Jarvis
@russelljjarvis
I was just thinking that it would be cool if you were not forced to describe stim_on and stim_off keys if the recording is kind of stimulus agnostic.
Werner Van Geit
@wvangeit
would make sense indeed. if you want you create a github issue for it, otherwise I could also do it.
Russell Jarvis
@russelljjarvis
Yes, and sorry that I have not yet addressed the other issues I raised on github issues RE: testing eFEL outside of its directory. I am doing am finishing up an internship and my priorities have shifted recently. I will get back to it soon however.
Werner Van Geit
@wvangeit
np
Russell Jarvis
@russelljjarvis
This message was deleted
Sverre Grødem
@Sverreg
image.png
Not sure if this chat is alive, but I'm having an issue with incorrect peak indices (they are slightly off..). Can anyone help?
In the submitted example blue lines are peak_indices, red lines are AP_begind_indices and the green horizontal line is the peak voltage of the first spike.
Sverre Grødem
@Sverreg
(Fast-spiking cortical PV cell, ~360HZ firing)
Werner Van Geit
@wvangeit
yes, it is alive :-)
did you by chance already try to change the interpolation frequency of eFEL
eFEL has a fairly low default interpolation frequency, with fast spiking cells this could possibly generate problems
Sverre Grødem
@Sverreg
Great! No i did not, where do I change this?
Werner Van Geit
@wvangeit
you can call efel.setDoubleSetting('interp_step', 0.01) to e.g. change the step to .01 ms
(default is 0.1)
Sverre Grødem
@Sverreg
image.png
Great, seems to have fixed the peak indices. But strangely the begin_indices are now off on the 2nd and third spikes. Any clue?
Raising the derivative threshold some more (15 -> 18) took care of that!
Werner Van Geit
@wvangeit
ok, great :-)
yeah, the derivative threshold would be sensitive to the interpolation frequency
Sverre Grødem
@Sverreg
Thanks for the quick response, I was trying lots of silly things as I didn't find this interp_step anywhere. Is there a list of these double settings somewhere?
Werner Van Geit
@wvangeit
not sure it's in the documentation (it obviously should :-)). But the list is here: https://github.com/BlueBrain/eFEL/blob/master/efel/api.py#L74
Sverre Grødem
@Sverreg
I could not find it but that is no guarantee. Thanks for the link!
Sverre Grødem
@Sverreg
Hi again @wvangeit, when I stimulate these fast spikers repeatedly the amplitude of the spikes gets pretty small, and the peak of spike might be as low as 10-20mv. In these instances the feature ['Spikecount_stimint'] no longer gives the full number of spikes. Changing efel.setDoubleSetting("min_spike_height", 10) does not seem to do anything? Is there a different doublesetting for spikes that I can't find?
To avoid confusion: the amplitude of the spike would not be 10-20, but the peak of the spike is at +10-20 mV.
Werner Van Geit
@wvangeit
is it possible for you to trace such a trace ? (to upload it, you could create an issue in the github repo)
Sverre Grødem
@Sverreg
Sure :)
Sverre Grødem
@Sverreg
Hi again. Are anyone here aware of libraries for analyzing voltage clamp experiments? Such as EPSC detection? Or does EFEL have this and I can't find it?
Werner Van Geit
@wvangeit
Hi @Sverreg , eFEL is indeed not really made for detection of EPSCs. It 'might' work, if you put the spike detection really low (and if your voltage trace is fairly flat), but in general I think it's better to use some other code for that.
Sverre Grødem
@Sverreg
Yeah I figured, just wanted to check if anyone has developed that code before I get on it myself.
(In python)