Skip to content

zhengyangwang/KS2.5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KS2.5

Custom KS2.5 for within-lab use.

Getting started

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.

CALL C:\Apps\Miniconda3\condabin\conda.bat activate phy2

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

Running the pipeline

  1. Create the following folders on a local SSD:Open Ephys, beh, KS_out and raw_LFP.
  2. Copy Open Ephys recording sessions (e.g. PIC100) into Open Ephys, and behavior MATLAB files (e.g. PIC100_1.mat) in to beh.
  3. In start_ks_pipeline.m: point daq_dir to the Open Ephys folder, beh_dir to the beh folder, ks_dir to the KS_out folder and raw_lfp_dir to the raw_LFP folder; specify subject_identifier as e.g., {'OLI', 'ROS'} and session_range as e.g., {90:100, 41:50}.
  4. Run start_ks_pipeline.m.
  5. Run the following in command line on each kilosort output folder to start a phy2 sessions:
    start_phy F:\Database\VanderbiltDAQ\KS_out\OLI\OLI136_2024-08-01_13-08-45\1\kilosort3
    
    For each sessions, Label any clusters that have unlikely waveforms as noise, and the rest as good. Save and exit the phy interface after all clusters are labeled.
  6. Edit gen_all_template.m to generate sparse and single unit files for ranges of subject and sessions intended.

About

Custom KS2.5 for in-lab release

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages