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

electrical/optical artifact crashes kilosort2 #154

Closed
markagrios opened this issue Dec 6, 2019 · 8 comments · Fixed by #595
Closed

electrical/optical artifact crashes kilosort2 #154

markagrios opened this issue Dec 6, 2019 · 8 comments · Fixed by #595

Comments

@markagrios
Copy link

hi! I'm trying to process a data set with kilosort2 where we optogenetically inactivated neurons we were recording with the neuropixel probe. Each laser pulse creates a large artifact that is not filtered out entirely by the whitening done before running the program. Kilosort2 can run through most of the steps but crashes during the first splits 1/2. From the documentation "The first pass is initialized with the top principal component of the cluster", does kilosort2 fail here because maybe the cluster associated with the artifact is so distance in PCA space that it throws everything else off? I'm wondering if I need to do a preprocessing step before running the data through kilosort2 or if there are setting I can change that will fix this. Thank you!!

badpoint
filtered_badpoint

@hjalitto
Copy link

hjalitto commented Dec 6, 2019 via email

@markagrios
Copy link
Author

markagrios commented Dec 7, 2019 via email

@marius10p
Copy link
Contributor

@markagrios Please post the entire command line output for the error. Unless you are doing stimulation every half second or more frequently, those events should be mostly assigned to their own cluster of outliers.

The PCA waveforms are stored in rez.ops.wPCA, so you could plot those and post here for us to check them.

@marius10p
Copy link
Contributor

I see now that this is a duplicate issue. Why do you think the artifact is crashing it? I see no a priori reason for it, nor did we encounter similar problems before.

@Idavr
Copy link

Idavr commented Oct 8, 2020

Hello @hjalitto!

This is an old thread, but I am combing through the forums looking for people that have experience with KiloSort2, phy2 and optogenetics. Are you guys still working on this or have found a solution? My KS2 does not crash, but there are some funky looking templates in phy2 and some results that don't make sense that I am trying to figure out. Any input/information would be highly appreciated!

@markagrios
Copy link
Author

markagrios commented Oct 8, 2020 via email

@Idavr
Copy link

Idavr commented Oct 8, 2020 via email

@marius10p
Copy link
Contributor

Closing this issue, since it is no longer about artifacts crashing kilosort2. If you want to continue the conversation, please open another issue about how to preprocess and fix artifacts before plugging the data file into Kilosort.

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

Successfully merging a pull request may close this issue.

4 participants