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 get the PC_features.npy for all spikes by kilosort3? #540

Closed
PathwayinGithub opened this issue May 8, 2023 · 3 comments · Fixed by #595
Closed

How to get the PC_features.npy for all spikes by kilosort3? #540

PathwayinGithub opened this issue May 8, 2023 · 3 comments · Fixed by #595

Comments

@PathwayinGithub
Copy link

Hi!
I want to know how to get a PC_features.npy file(number of spikes x number of pcs x number of channels). I want to use the data file to run
ecephys_spike_sorting from AllenInstitute(https://github.com/AllenInstitute/ecephys_spike_sorting)
which needs the pc features. But my kilosort3 didn't give me that data?

@Andrea3v
Copy link

Hi. Maybe someone who actually dev the code can provide a better answer later on, but in the meantime, I'll share what I know since I faced the same problem not long ago:
I suppose you want to visualize the PC from KS3 output in Phy? if so, I believe there's some sort of discrepancy between KS3 and Phy with waveforms and PCs (hopefully the dev can fix this at some point).
To circumvent this issue you can type in the prompt cmd:
Phy extract-waveforms ‘/path-to-params-file/params.py’
that will grab the waveforms from the data using KS3 output and calc/display their PCs.
Then simply run Phy with the command Phy template-gui params.py
and in the GUI activate the feature view (if doesn't show up as default).
hope that helps.
Andrea

@PathwayinGithub
Copy link
Author

@Andrea3v Thanks for your help. But I can run Phy normally and it will create three new npy files named _phy...... which contains parts of PC features. But these files only contain the PC features of a subset of clusters, not for the whole data. And I have known that the kilosort3 can not output the PC_features.npy directly.

@bjslater13
Copy link

@Andrea3v I did the extraction via phy as you mentioned but still can't visualize the feature view. It would be nice to still be able to do the PC curation as I have a number of units that have ISI violations I'd like to cull.

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.

3 participants