Skip to content

Post processing for neuropixels data using SpikeInterface, Kilosort 2.5, and Kilosort 3

Notifications You must be signed in to change notification settings

rebz444/spikeline

 
 

Repository files navigation

spikeline

Spike sorting pipeline for generating consensus units from neuropixel recordings.

About The Project

This is the postprocessing pipeline used by the Shuler lab to extract spike times from ephys recordings collected with Neuropixel Probes. It uses Spike Interface to run multiple sorting algorithms and find consensus units.

alt text

Installation

Requirements

Follow install and requirements instructions from the Spike Interface and Kilosort Readme files.

Clone the repo

git clone https://github.com/esutlie/spikeline.git

Change the directories to point to your installations of Kilosort 2.5 and Kilosort3

os.environ['KILOSORT3_PATH'] = os.path.join('PATH', 'TO', 'Kilosort3')
os.environ['KILOSORT2_5_PATH'] = os.path.join('PATH', 'TO', 'Kilosort2_5')

Change the path variables in file_paths.py to work for your directory structure.

def root_file_paths():
  """change root filepaths here to your own"""
  origin_path=os.path.join('D:\\', 'recordings')  # A directory containing only data folders generated by SpikeGLX.
  external_path=os.path.join('E:\\', 'neuropixel_data')  # A folder on an external hardrive or other accessbile storage location.
  phy_ready_path=os.path.join('C:\\', 'phy_ready')  # A temp folder that can hold sessions ready to be manually curated. Will take up a lot of space if multiple sessions are queued.
  phy_holding_path=os.path.join('E:\\', 'phy_holding')  # Depricated.
  pi_path=os.path.join('C:\\', 'behavior_code', 'data')  # Location of the associated raspberry pi files.
  processed_data=os.path.join('C:\\', 'processed_data')  # Final desination for processed data.

  file_paths = {
      'origin_path': origin_path,
      'external_path': external_path,
      'phy_ready_path': phy_ready_path,
      'phy_holding_path': phy_holding_path,
      'pi_path': pi_path,
      'processed_data': processed_data
  }
  return file_paths

Change the ks3_path and ks2_5_path variables in spikeline.py to your own.

ks3_path = os.path.join('C:\\', 'your_path', 'Kilosort3')
ks2_5_path = os.path.join('C:\\', 'your_path', 'Kilosort2_5')

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Elissa Sutlief - [email protected]

Project Link: https://github.com/esutlie/spikeline

Acknowledgments

(back to top)

About

Post processing for neuropixels data using SpikeInterface, Kilosort 2.5, and Kilosort 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%