Package: herdingspikes
Herding Spikes 2Update: 22 Oct 2021This is the latest version 0.3.99, which introduces compatbility withSpikeInterfaceversion 0.90+ (note version 0.10 is no longer supported). SpikeInterface wraps many spike sorters, can read almost any file format and contains other useful functionality into a single code base. We will soon transition to a version of Herding Spikes that fully integrates with SpikeInterface. The example notebooks in this repository illustrate the main HS2 functionality, but do not run at the moment as the data links have become stale.Software for high density electrophysiologyThis 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 detection and localisation runs in real time on recordings from 4,096 channels at 7kHz on a desktop PC. Large recordings with millions of events can be sorted in minutes.Since we believe publicly funded research code should be free and open, all code is released under GPL-3.0.Supported systems3BrainBIOCAM and BIOCAM XNeuropixel arrayETH MEA1Kany data formast supported bySpikeInterfaceContributors, alphabeticalMatthias Hennig: Spike sortingJano Horvath: Parameter optimisationCole Hurwitz: Spike detection, localisation and sorting, C++ codeOliver Muthmann: Spike detection and localisationAlbert Puente Encinas: C++ implementation, optimisation and parallelisationMartino Sorbaro: Spike sorting, class structure and much of the python codeCesar Juarez Ramirez: VisualisationRaimon Wintzer: GUI and visualisationQuick startThe code has been tested with Python version 3.6. It is essentialnumpyis available before installing.
The other dependencies will be installed by the installer.If your system does not have Python pre-installed, theAnaconda distributionmay be used.All operative systems - Installation via pipWe suggest you use Anaconda if you don't have a favourite Python installed yet. We also recommend installing the code in a virtual environment (see below in the "from source" sections).A pip distribution is available and can be installed as follows:pip install numpy scipy
pip install herdingspikesNote:HerdingSpikes is tested on Python 3.5 and above. Itmaywork on Python 3.0-3.4.To install from source, clone this repository and follow the instructions below.Linux/Mac - from sourceWe suggest you install the code in a virtual environment. You can create one by runningpython3 -m venv --system-site-packages desired/location/HS2venv
source desired/location/HS2venv/bin/activateYou can omit--system-site-packagesif you don't want to use the local versions of common Python libraries. You will need toactivatewhenever you're using the module.The module can automatically be installed, including all dependencies, by runningpip install numpy scipy
python setup.py installWindows - from source1. Creating a Python virtual environmentOption 1: GUIOnceAnacondais installed, create and activate a virtual environment calledHS2env. This can be done with theAnaconda Navigatorper mouse click. To make surenumpyandCythonare available, typeconda install -n C:\Users\HS2env numpyOption 2: Command line (from source)Alternatively, open theAnaconda Promptand type:conda search "^python$"This will display a list of available python versions. Here we choose 3.6.5:conda create -n C:\Users\HS2env python=3.6.5 anacondaThis environment should be activated every time HS2 is used with the commandconda activate C:\Users\HS2envTo make surenumpyis available, typeconda install -n C:\Users\HS2env numpy2. Installing a C++ CompilerHS2 contains fast C++ code, which requires a compiler. If you don't have a C++ compiler installed, the easiest solution is to download and install the Microsoft Visual Studio Build Tools:https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017.3. Obtaining and installing HS2Getting the codeEitherdownload and uncompress:https://github.com/mhhennig/HS2/archive/master.zipOrinstallgitfromhttps://git-scm.com/download/win. Then open a command prompt and typegit clone https://github.com/mhhennig/HS2.gitThis will create a folderHS2in the current directory. Note that updates can now be simply retrieved by typinggit pull.InstallTo install, go to the HS2 directory, e.g.cd HS2and typepython setup.py installNow HS2 will be available in the current virtual environment.Example codeExample code for the different supported systems is in the foldernotebooks. These can be run without installing HS2 system-wide, but requires to runpython setup.py build_ext --inplacein theHS2directory. Next, runjupyter notebookand navigate to the directory to try the code. Each notebook will download a short segment of raw data.Goherefor documentation. A worked example for Biocam data ishere.ContactThe herders are based at the School of Informatics, University of Edinburgh. Contact ushere, we are happy to help.