Skip to main content

Efficient spike detection and sorting for dense MEA

Project description

Herding Spikes 2 Lightning

Fast spike sorting for high density multielectrode arrays

PyPI version Build Status

Spikes


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.


Software for high density electrophysiology

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. 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.

Supported systems

  • any recording system supported by SpikeInterface
  • 3Brain BIOCAM and BIOCAM X (custom implementation only in versions 0.3.XXX), for Lightning use SpikeInterface to read raw data
  • this software was developed specifically for high density multielectrode arrays, for example the Neuropixels probe, the SinAPS probes, or high-density MEAs such as the BioCam or the MaxWell Biosystems HD-MEA
  • what herding spikes is not: performance is poor for recording systems with few recording channels and channels separated by more than 60 microns; for such recordings, use one of the many other sorters available in SpikeInterface](https://github.com/SpikeInterface/spikeinterface)

Installing Herdingspikes

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.

From source

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 .

Documentation

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.

Contributors, alphabetical

Contact

The herders are based at the School of Informatics, University of Edinburgh. Contact us here, we are happy to help.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

herdingspikes-0.4.3.tar.gz (549.2 kB view details)

Uploaded Source

File details

Details for the file herdingspikes-0.4.3.tar.gz.

File metadata

  • Download URL: herdingspikes-0.4.3.tar.gz
  • Upload date:
  • Size: 549.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for herdingspikes-0.4.3.tar.gz
Algorithm Hash digest
SHA256 4d1496aecf71c729437814bce984ca9eed400136839a5f7ab8670bfc3f126e90
MD5 204a6a824b9ecc621a5b8b79875f8e98
BLAKE2b-256 8f20424545191384bae01ed039bd80c72b385828eb9bab5d0e5e673cf58a4e15

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page