-
Notifications
You must be signed in to change notification settings - Fork 222
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
Data integrity when concatenating artifact corrected sessions #246
Comments
Hi, it is normal to get a blocky matrix if the distribution of active neurons changes. If a unit is completely silent for 30 minutes, that will probably cause problems. If it goes from 10 Hz to 1 Hz, that should still work fine. The only way to know is to examine the results in Phy. Since we just released Kilosort 2.5, I would especially recommend it for this scenario. |
Hi. Alright, thank you. There are some... Interesting... Visualizations in phy that I am investigating, but will try Kilosort 2.5 and see if there is a difference! I just now cloned into KS2.5, but when trying to select the probe layout in the GUI I see three Phase3B1 (staggered) choices, and regardless of which I choose I get this error message in MATLAB: Error using unique (line 117) Error in ksGUI/updateProbeView (line 1195) Error in ksGUI>@( Error while evaluating UIControl Callback. Also, when running the eMouse_drift (just to check that everything works), the function "clusterSingleBatches" is not found and is not in any folder of Kilosort. |
I fixed the layouts and I am now working on an update the eMouse simulation. |
Thank you, layouts working now! However, more peculiarities have popped up when trying to run it on my data now: When using main_kilosort I was able to run one recording without any problems, but when trying to another recording I get this error: Error using gpuArray/nan Error in median (line 71) Error in learnTemplates (line 248) Error in learnAndSolve8b (line 35) Error in main_kilosort (line 45) When trying to run it through the GUI this error occurs: "Error preprocessing! Not enough input arguments." |
I am not sure what your first error is from, restart Matlab and try again. The second error was a bug, I fixed it now. |
Thanks for helping trouble shooting this quickly. The initial experience so far and the visualization of the drift in KS2.5 is very good. The same error regarding the gpuArray/nan is still persisting even after restarting Matlab, and happens at the stage of optimizing templates. It is now also in the GUI, in the form of this error: "Error running kilosort! An unexpected error occurred trying to launch a kernel. The CUDA error was: invalid configuration argument" and then it tries to save the data but throws the "Error saving data for phy! Reference to non-existent field "Wphy"." error. Might it be due to some channels without any spikes? |
Let's ignore the GUI for now. Am I right that this error happens on the very first batch during the optimization pass? I think it could only happen if there are no spike at all in the first batch (2 sec by default), and then |
It does appear that way. This is the entire output of Kilosort running this file:
Error in median (line 71) Error in learnTemplates (line 248) Error in learnAndSolve8b (line 35) Error in main_kilosort (line 45) |
Based on that output, it looks like the first batch does have spikes, so I am not sure what the error is. You can do a few things:
|
I am testing the debugging but this is my first time debugging Matlab (or anything, for that matter) so it might take me some doing. However, I did try your second suggestion. There was no trouble running Kilosort in the time range of 0 to 600 sec, but when doing 500 to 2000 sec, I got the same error in the GUI as mentioned above: "Error running kilosort! An unexpected error occurred trying to launch a kernel. The CUDA error was: invalid configuration argument" and then it tries to save the data but throws the "Error saving data for phy! Reference to non-existent field "Wphy"." Edit: Another peculiarity: I tried running the same file - only artifact corrected - and it was kilosorted without any issues. |
Hi there!
I usually do analysis on straight-forward single recordings, but recently I ran an inactivation experiment with optogenetics while recording with Neuropixels and am trying to look at cell identities across two sessions (done immediately after each other, just 10 min break and animal was connected the entire time). Due to light artifacts I have artifact corrected both sessions with CatGT and then concatenated them and just now finished running kilosort2 on the entire file. I was wondering if the interpretation of the matrix from the batch sorting should change, as the files (both before and after concatenation) creates a matrix with harder lines than in single non-optogenetic sessions. I am assuming that the "jumps"/"drifts" KS2 visualizes are due to the periods of inhibition as well as some shifts at the point of concatenation (end of first/start of second session) instead of degraded data integrity, but would this be a correct interpretation? Also, how well does KS2 keep track of the unit identities across longer periods of silencing? Shorter periods of silence would be natural as all neurons do not fire all the time, but I am experimenting with 30 minute inactivations, and was wondering whether that would be too long of a silent period for KS2 to identify the same unit from the start of the recording and then the same one again at the end?
Thank you very much for your time on this.
The text was updated successfully, but these errors were encountered: