Replicating hc2 spike sorting
Dear all,
I downloaded the data and I am trying to replicate the experiment.
That's what I have done so far:
Here I load the first channle:
[Data OrigIndex]= LoadBinary('./crcns/hc2/ec013.527/ec013.527.dat', 1:1, 31, 3, 'int16', 'int16', [0 1509; ]);
and here I load the first shank (channles 1-8)
Spk = LoadSpk('./crcns/hc2/ec013.527/ec013.527.spk.1');
As the described in the data description, I am high-filtering the data at 800Hz
I chose to do it like this as I haven't found more details about the type of filter, order, etc.
[b,a] = butter(10, 800/(20000/2), 'high');
Data_H = filter(b,a,Data(1,);
When I plot the first-channel of the first-Spike (that happens at 236 in frequency-sample time reference) I expect to see in the same signal
as in the Data_H(1,236:236+32), where 32 is the spike lenght.
Is the flow correct so far? As I cannot see the same signal, I am wondering if I did not loose some steps or details, or if I am using the data in a bad way.
Thank you very much and best regards,
Davide
Hi Davide,
if nChannels is correct (31 might be correct if there was a bad channel
that I removed), than one problem I see in your code is the spike waveshape alignment:
timestamps in Res file are not aligned to the beginning of the spike waveshape, but
sample 16 (see SpikeGroups/Peak sample field in the xml file). So the waveshape would be
Data_H(1,236-16:236+15)
best
Anton
Dear Anton,
thanks a lot for your quick answer. I really apprieciated that.
I have taken 31 from the xml file "<nChannels>31</nChannels>"
Also I tried as you suggested for the alignment but I still see such different signals.
Here
https://www.dropbox.com/s/wzdyqaj0n8268ol/Signals_bmp.tar?dl=0
you can find a tar archive with the orginal signal, the filtered signal and the filtered signal between 220 and 252 compared with the 1st spike in the 1st channel taken from the spk file.
If I understood correctly how the database is organized, it may be a problem of signal processing.
How did you generate the spike database? I guess they are portion of the pre-processed signal. The way the signal is pre-processed may be the main difference between results.
Do you have any code/script or detailed description that can help me? Thanks a lot, I wish you a great day,
Davide
Hi Davide,
at this point I cannot spend time looking at this. All I can say that it might be that for some datasets I made a mistake when extracting hippocampal data from a complete dataset that included entorhinal cortex and removing bad channels (to reduce size and make more homogeneous). Full dataset is later uploaded as hc-3. You should be able to find very same data without any reduction there.
Data processing was performed using NDmanager plugins and particular processing parameters should be in the original hc-3 xml files. If I am remembering right back then we didn't use median filter yet for high-pass filtering, and it was done using compiled matalb firfilter function (attached). Call would be
firfilter $base.dat $base.fil $nChannels $samplingRate $lowestFrequency $highestFrequency $filterOrder 1 $offset