Kilosort
Kilosort copied to clipboard
Channel map template construction
Hi, I'm using Kilosort with probes for which we don't have a channelmap. I was under the impression that Kilosort doesn't need an accurate channel map, and the channel map was only used by phy for visualization. I've been running Kilosort with a single linear array of my channels, and I have noticed that the templates that are being generated have similar waveforms across neighbouring channels in the faux map I've generated. Is this correct, or does it in fact need to know the relative positioning of the channels for clustering?
Thanks, Tom
Have you tried generating a map file with very large distances b/t xcoords and ycoords? The system might default to generate 1:NChannel arrays for these if you don't use them, and that may lead to the algorithm classifying units across channels.
I'm sorry, I don't fully understand what you mean. If the algorithm defaults to using 1:Nchannel arrays then I'd still be in the same situation as I'm in now.
I mean rather than using 1:NChannel for instance, use 1:NChannel * pitch. For me, rather than 1:16, I'm using 1:16 * 100.
Ah I see, but if I was to do that does it just act as 16 single channel spikesorters? E.g. will I be double counting some of my spikes? Unfortunately I know I'll have channels detecting spikes from the same unit, but I just can't say for sure there position relative to one another. I was wondering if Kilosort actually takes into account the positioning of the channels relative to one another when it does sorting? I had some impression that the templates are constructed using all channels and therefore the relative positioning of the channels doesn't matter.
I am under the same impression as you, but I imagine (though don't quote me) that the x y and z coordinates are factored into what constitutes a realistic cross channel spike and what doesn't. It seems like 2 identical wave forms on channels 50 um apart would be categorized as the same unit while the same events happening 1 mm apart would be categorized as distinct units. I myself lean towards providing as accurate information as possible and assuming the algorithm utilizes it in same way.
I think different versions of Kilosort treat geometry a bit differently. AFAIK, KS3 does actually use the geometry for drift correction. I'm not sure about 2.5, but I think 2.0 is somewhat invariant to probe geometry.
If you don't know your precise layout, I've had pretty good results using KS2.0 for tetrode data, I separate each tetrode by a fairly large distance in my channel map, and while I sometimes get waveforms on multiple tetrodes, these usually look like motion noise that I discard in Phy. That said, @aboharbf suggestion of putting at least some pitch between electrodes is a good idea even in KS2.0, which has an option for computing residual spike variance across channels, and it's default value is 30um (ops.sigmaMask = 30). (But see issue #156)