Semi-automated spike sorting for single channel electrophysiology. Designed for sorting extracellular signals on single channels with non-stationary units (waveforms changing over time).
Example of results after running automated clustering and manual cluster selection
Prepare your data into arrays of spike waveforms and spike arrival times. The sorting function takes three parameters
times
: 1-dimensional array of length N_spikes, each element is the arrival time of a spike in seconds
waveforms
: 2-dimensional array of shape (N_spikes, N_samples), each row is a spike waveform
Usage example:
import suss.io
from suss.sort import sort
# Load your own spike dataset
data = suss.io.read_pickle(...)
# Run the sorting algorithm
sort_result = sort(data.times, data.waveforms)
# Write the output of sorting
suss.io.save_pickle(..., sort_result)
The output of sort() returns 20 to 40 putative clusters in the dataset. We provide a gui tool to assist in the visual assessment of spike clusters and convenient merging and deletion of clusters.
Run the gui (from within your python environment) and load the pickle file saved from using suss.sort:
python -m suss.gui.app
Not implemented (yet?). Use your favorite spike thresholding / detection method.
This project requires Python3.5+ (I recommend using a virtualenv.)
(with pip)
pip install -e git+https://github.com/theunissenlab/[email protected]
# uninstall
pip uninstall suss
This should install the package as well as its depenencies
Separately, install python virtualenv and make sure you have python3 installed.
git clone https://github.com/theunissenlab/suss-sorter.git
cd suss-sorter
python -m venv env
source bin/activate
pip install -r requirements.txt
If you have issues with Qt (in Linux), set QT_DEBUG_PLUGINS to 1.
export QT_DEBUG_PLUGINS=1
If you have missing libraries, try commands like
sudo apt install libxcb-xinerama0 libxcb-cursor0
-
ffmpeg
for creating HTML5 animated plots in notebooks -
imagemagick
for generating animated plots in gif format
Dhawale AK, Poddar R, Wolff BE, Normand VA, Kopelowitz E, Olveczky BP. Automated long-term recording and analysis of neural activity in behaving animals. eLIFE, 2017
Hill DN, Mehta SB, Kleinfeld D. Quality Metrics to Accompany Spike Sorting of Extracellular Signals. JNeurosci, 2011