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

kilosort post-processing module for KS3 data #59

Closed
LaurenzMuessig opened this issue Mar 24, 2021 · 3 comments
Closed

kilosort post-processing module for KS3 data #59

LaurenzMuessig opened this issue Mar 24, 2021 · 3 comments

Comments

@LaurenzMuessig
Copy link

Hi,

It seems to me at the moment only the quality metric module is compatible with KS3 data. Will there be an update for the kilosort-postprocessing module at some point? Thanks for letting me know.

Cheers

Laurenz

@jsiegle
Copy link
Collaborator

jsiegle commented Mar 24, 2021

Hi Laurenz, I've used both the mean_waveforms and quality_metrics modules with Kilosort3. The noise_templates module shouldn't be necessary, as KS3 finds very few (if any) noise units. And I'd like to do more characterization of the KS3 outputs before applying the kilosort_postprocessing module, since I'm not sure if double-counted spikes are still an issue with the new algorithm.

Can you describe the bugs you've encountered? They should be straightforward to fix, since the KS3 outputs are quite similar to KS2 (with the exception of missing PCs, at least for now).

@LaurenzMuessig
Copy link
Author

LaurenzMuessig commented Mar 24, 2021

Hi Josh,

Thanks for quick response. You are right that getting the ks_postprocessing to run seems mainly putting in a few 'try..except..' to deal with the lack of the pc_features in KS3. I was just curious (and lazy) and wondered why you guys hadn't pushed that in the latest update. I'll make the edits myself and let you know if there is some bigger issue.
PS: I am def seeing the issue with double counted spikes quite a lot in my data and as far I understand the spike detection bits haven't changed much between KS2.5 and 3, but mainly the clustering algorithm (but I might be wrong).

Update:
Getting it to run was indeed mostly just taking care of the lack of pc_features. There was however one thing that took me ages to figure out as I am a Matlab guy. In remove_double_counted_spikes you also need change 'spikes_to_remove = np.zeros((0,)' to something like 'spikes_to_remove = np.zeros((0,dtype='i8')' in lines 69 and 92 to make sure the index doesn't become a float. This looks like the same issue described in #57

@jsiegle
Copy link
Collaborator

jsiegle commented Mar 25, 2021

Ok, those changes are now implemented in the master branch. Thanks for pointing this out!

@jsiegle jsiegle closed this as completed Mar 25, 2021
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

2 participants