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

How to adjust parameters to improve sorting results? #706

Closed
StellaFFF opened this issue Jun 3, 2024 · 2 comments
Closed

How to adjust parameters to improve sorting results? #706

StellaFFF opened this issue Jun 3, 2024 · 2 comments
Assignees

Comments

@StellaFFF
Copy link

StellaFFF commented Jun 3, 2024

Describe the issue:

Hi there!

I am using Kilosort4 for spike sorting with 4 tetrodes (16 channels) on a 30-minute recording. After analysis, I encountered two issues:

  1. Similar to issue FEATURE: Correcting for misaligned spikes within units #664, I am experiencing misaligned spikes.
    902679b6492231215f7c158b644e090

  2. The same spike is being dispersed into different units.
    d0b64cdbd1917037a481caa41730edb

  3. There are five channels with spikes that look very similar. Is that proper that I merge them?
    image

  4. The template waveform and the mean waveform are very different:
    image
    image
    image

Could you please help me with adjusting the parameters to achieve better spike sorting results? Thank you!
image
image

@jacobpennington
Copy link
Collaborator

For 1: there are no settings to change for this problem, @marius10p is working on a fix.
For 2 and 3: I'll let @marius10p answer those.
For 4: Which version of Kilosort4 are you using? We changed the way template amplitudes are computed in 4.0.7, which should have fixed this problem.

@jacobpennington
Copy link
Collaborator

After discussing with Marius:

  1. Just clarifying, that does not suggest the same spike is being assigned to multiple units, just spikes with a similar waveform. Given that these are all from MUA units with low spike count, it's not that surprising and the "true" cluster for that waveform is probably showing up elsewhere. In fact, it looks like that's what you're seeing in 3).

  2. Broadly speaking, yes it looks like some of those can be merged. Specifically all of them except the unit colored blue, since that one does not have a clear refractory period for the CCGs (but the other 4 do).

There aren't any settings to tweak to "fix" this, there are always going to be cases where merging doesn't work well. For example, here it looks like something happened during the recording around t=1000 that caused a big change in amplitudes, which can mess up the clustering as well - especially for probes with low channel count like this, where drift correction is not feasible.

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

No branches or pull requests

3 participants