Software for high density electrophysiology
Fast spike sorting for high density multielectrode arrays
Update July 2024
This is a new version 0.4, which introduces new, fast and performant spike detection code.
The final legacy version is 0.3.104, which introduced compatibility with SpikeInterface. SpikeInterface wraps many spike sorters, can read almost any file format and contains other useful functionality into a single code base.
This new version still supports the old detection code and can be used to transition to the new code.
This software provides functionality for the detection, localisation and clustering of spike data from dense multielectrode arrays based on the methods described in the following papers:
J.-O. Muthmann, H. Amin, E. Sernagor, A. Maccione, D. Panas, L. Berdondini, U.S. Bhalla, M.H. Hennig MH (2015). Spike detection for large neural populations using high density multielectrode arrays. Front. Neuroinform. 9:28. doi: 10.3389/fninf.2015.00028.
G. Hilgen, M. Sorbaro, S. Pirmoradian, J.-O. Muthmann, I. Kepiro, S. Ullo, C. Juarez Ramirez, A. Puente Encinas, A. Maccione, L. Berdondini, V. Murino, D. Sona, F. Cella Zanacchi, E. Sernagor, M.H. Hennig (2016). Unsupervised spike sorting for large scale, high density multielectrode arrays.30236-X) Cell Reports 18, 2521–2532. bioRxiv: http://dx.doi.org/10.1101/048645.
This implementation is highly efficient, spike sorting runs in real time on recordings from 4,096 channels or more at 20+kHz on a desktop PC. Large recordings with millions of events can be sorted in minutes. No GPU is required, and the code is fully parallelised.
Since we believe publicly funded research code should be free and open, this code is released under GPL-3.0.
The code has been tested with Python version 3.12. We suggest you use Miniconda, Anaconda or Mamba to set up a working Python system. We also recommend installing the code in a virtual environment, e.g.:
conda create -n hs python cython numpy
conda activate hs
A pip distribution is available and can be installed as follows:
pip install numpy cython # if not already installed
pip install herdingspikes
Windows and Mac users follow the instructions here.
The module can automatically be installed, including all dependencies, by cloning this repository:
git clone https://github.com/mhhennig/HS2.git
Then run:
pip install numpy cython
pip install -e .
A quick start guide is available.
This document explains how to use Herdingspikes with SpikeInterface.
Example code is in the folder notebooks. These can be run without installing HS2 system-wide and requires to run python setup.py build_ext --inplace
in the HS2
directory. Next, run jupyter notebook
and navigate to the directory to try the code.
The herders are based at the School of Informatics, University of Edinburgh. Contact us here, we are happy to help.