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
BUG: Tetrode data is garbled in Kilosort4 but not Kilosort3 #668
Comments
Hello, Please try sorting this again after installing the latest version of Kilosort (v4.0.4), with the default batch size and |
This seems to have worked, Kilosort4 produced well-sorted units for the original and a second recording after updating, using the default batch size and |
I did also get this |
@afmcelroy The UserWarning you mentioned is not a problem as long as you're getting good sorting results. It's just there as a debugging tool in case other problems pop up (which typically cause the sorting to crash).
|
Describe the issue:
My lab has been using Kilosort3 for spike sorting tetrode data for some time, and recently advanced to Kilosort4. Unfortunately, data that was able to be sorted normally in Kilosort3 doesn't seem to have worked in Kilosort4.
Here is a screenshot of the Kilosort4 data from phy. Note the strange shape of the waveforms. Every cluster that can be viewed looks like this:
Trying to view certain clusters also yields an out-of-bounds error:
Here is the same data (same animal, same recording session) sorted in Kilosort3, looking completely normal:
This may be some error with setting up Kilosort4, but I'm not sure what. It could also be an error with phy. Attached is a zipped folder containing channel_map.mat for these data and the python script (main5-1.py) I use to launch Kilosort4. 'n_chan_bin' on line 18 is 48 rather than 64 to exclude broken channels - this was a bug fix that I tried and which didn't work. Another possible issue is 'batch_size' on line 21, which was revised down from its default value because our GPU was running out of memory - our copy of Kilosort3 runs on the department computing cluster, which is less limited, so this may make a difference. Let me know what other files could be needed for debugging.
kilosort4 debugging.zip
Reproduce the bug:
No response
Error message:
Version information:
OS: Linux Mint 20.3 Cinnamon version 5.2.7
Python: 3.9.18 (in the conda env for kilosort)
Kilosort: 4.0.2
Phy: 2.0b5
Context for the issue:
No response
Experiment information:
64-channel tetrode recording from primary motor cortex of mouse, using Whitematter wireless data logging system
The text was updated successfully, but these errors were encountered: