OSort - A spike sorting packageSpike sorting is the process of attributing each action potential (spike) recorded with an electrode to a particular neuron. This way, it is possible to extract the signals of single neurons even if (as is usual) spikes from multiple units are recorded. Spike sorting is essentially an unsupervised clustering problem. One of the major problem is that it is at priori not known how many clusters there are. There are many approaches in the literature that solve this problem. However, most of these are either supervised (manual) and are computationally very expensive. In addition, these algorithms are batch processing algorithms - that is, all data must be available before they can run. We have large amounts of data acquired from many channels in parallel. Manual sorting is thus not an option. Also, we would like to develop experiments that adapt themself to the neural response in realtime. Thus we needed an algorithm that can sort spikes as they are recorded - spike by spike. The clusters are built and adapted iteratively over the course of the recording. This page documents our implementation of our online spike sorting algorithm OSort. It can be used like any other spike sorting package to process data offline. In addition, it can also be used for online processing and closed-loop experimentation. Please see our package StimOMatic for this purpose, into which we are currently integrating OSort as a plugin.
Below you can find the implementation of our online spike sorting algorithm as well as various simulated and real datasets we used to evaluate the performance of our and other algorithms. A note of caution: spike sorting is a complicated process. While it is easy to just run this software on your data, it is important that you understand it's results and limits to avoid missinterpretation. Please consult the paper for details and make careful use of the statistical tests provided.
The algorithm is documented and carefully evaluated in our published work (see below), where we also compare its performance against other commonly used spike sorting algorithms.
Together with the algorithm, we provide a benchmark dataset of simulated extracellular traces at different levels of detection and sorting difficulty. The figure above shows example data sorted from the simulated data traces, with increasing difficulty from left to right. Also, we provide an example real recording (human single wire) to illustrate the sorting process. Our benchmark dataset has in the meantime been used by several other authors to compare and evaluate spike sorting algorithms. See, for example, this recent review article: Gibson et al. 2012, Spike Sorting: The First Step in Decoding the Brain: The first step in decoding the brain, IEEE Signal Processing Magazine.
DocumentationPlease see the readme.txt file included in the distribution for how to install OSort and read it carefully.
Currently, OSort can process Neuralynx Ncs files, text files and leadpoint binary files as-is. Adding other data formats (continous recordings) is fairly easy.
OSort requires Matlab and the following toolboxes: statistics, signal processing, and wavelets (only if wavelet spike detection is used). OSort is being used by users on all three major platforms - Linux, Windows, Mac OS X.
OSort comes in two version: 1) graphical user interface and 2) textmode interface (command line). The graphical user interface is useful to explore data and the features of OSort whereas the second allows using all features and automation. Most users end up using the textmode interface eventually.
DownloadsCurrent release: v3.0
[Download Source code] [Download example data] [Screenshot]
[Tutorial for v2]
Versions older than 3.00 are deprecated and no longer available or maintained.
ReferencesOnline detection and sorting of extracellularly recorded action potentials in human medial temporal lobe recordings, in vivo
U. Rutishauser, E. M. Schuman, A.N. Mamelak
Journal of Neuroscience Methods, 2006, 154:204-224, 2006 (pdf).
Please cite above paper if you use any part of this code or the example datasets provided.
For a general introduction to the problem of spike sorting, see the following review paper:
Lewicki, M. S. (1998). "A review of methods for spike sorting: the detection and classification of neural action potentials." Network 9(4): R53-78. (pubmed)
Authors and Contact InfoWe welcome your feedback, suggestions, improvements etc. Please email urut (-at-) caltech.edu with any queries.
OSort was initially written by Ueli Rutishauser, in collaboration with E.M. Schuman and A.N. Mamelak (all Caltech). The GUI was initially written by Matthew McKinley (MIT).
The code is currently actively maintained by Ueli Rutishauser.
Everything on this page is Copyright (c) 2004-2013 by the authors. This research has been funded by grants from the Gimbel Discovery Fund and the Howard Hughes Medical Institute (2005-2010) and the Cedars-Sinai Medical Center (2012-present).