Custom KS2.5 for within-lab use.
This repository cloned Kilosort-2.5 under KS2.5/External/Kilosort-2.5. Check here for required MATLAB Toolboxes.
Install Anaconda/Miniconda.
Install the python package phy2 inside a conda environment following the instructions.
Edit the following line in start_phy.bat to the correct conda.bat
folder and environment name.
Line 2 in c8ea506
There are precompiled CUDA files under KS2.5/External/Kilosort-2.5/CUDA. In case of CUDA error, re-compile for your platform: When in root directory,
cd External/Kilosort-2.5/CUDA
mexGPUall.m
- Create the following folders on a local SSD:
Open Ephys
,beh
,KS_out
andraw_LFP
. - Copy Open Ephys recording sessions (e.g.
PIC100
) intoOpen Ephys
, and behavior MATLAB files (e.g.PIC100_1.mat
) in tobeh
. - In
start_ks_pipeline.m
: pointdaq_dir
to theOpen Ephys
folder,beh_dir
to thebeh
folder,ks_dir
to theKS_out
folder andraw_lfp_dir
to theraw_LFP
folder; specifysubject_identifier
as e.g.,{'OLI', 'ROS'}
andsession_range
as e.g.,{90:100, 41:50}
. - Run
start_ks_pipeline.m
. - Run the following in command line on each kilosort output folder to start a phy2 sessions:
For each sessions, Label any clusters that have unlikely waveforms as
start_phy F:\Database\VanderbiltDAQ\KS_out\OLI\OLI136_2024-08-01_13-08-45\1\kilosort3
noise
, and the rest asgood
. Save and exit the phy interface after all clusters are labeled. - Edit
gen_all_template.m
to generate sparse and single unit files for ranges of subject and sessions intended.