Kilosort2
Kilosort2 is available on Axon to perform spike sorting. It is installed globally and can be activated using an environment module.
Using Kilosort2
To use Kilosort2, you must first load the matlab/2018a
and cuda/9.0.176
modules. You may then load the kilosort2 module, which provides a convenience wrapper (the kilosort2 command) that allows you to easily run Kilosort2 within SLURM batch scripts. The usage for this command is described when you run kilosort -h:
(base) [jsp2205@axon ~]$ ml load matlab/2018a (base) [jsp2205@axon ~]$ ml load cuda/9.0.176 (base) [jsp2205@axon ~]$ ml load kilosort2 (base) [jsp2205@axon ~]$ kilosort2 -h Usage: kilosort2 -[dtcmnseh] ========================================================================= Description: Allows you to run Kilosort from GNU/Linux command line environment. ========================================================================= All of the following command line options, followed by an argument, are required: -d : The path to the directory that contains the raw data binary file. -t : The path to temporary scratch space (same size as data, should be on a fast SSD). -c : The path to your config file (.m format). -m : The path to the channel map file (.mat format). -n : The total number of channels in your recording. -s : Start time of the time range to sort. -e : End time of the time range to sort. -h : Print this help message. ========================================================================= Example usage: kilosort2 -d /data -t /tmp -c /home/jsp2205/configFile384.m -m /home/jsp2205/neuropixPhase3A_kilosortChanMap.mat -n 384 -s 0 -e Inf
Common Error Messages
If you do not load MATLAB 2018a and/or CUDA 9.0 first, you may receive the following error (or similar):
(base) [jsp2205@axon ~]$ ml load kilosort2 Lmod has detected the following error: Cannot load module "kilosort2". At least one of these module(s) must be loaded: matlab/2018a While processing the following module(s): Module fullname Module Filename --------------- --------------- kilosort2 /share/modulefiles/manual/kilosort2
This can be remedied by running ml load matlab/2018a and/or ml load cuda/9.0.176 before loading the kilosort2 module.