A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo

  1. Pierre Yger
  2. Giulia LB Spampinato
  3. Elric Esposito
  4. Baptiste Lefebvre
  5. Stéphane Deny
  6. Christophe Gardella
  7. Marcel Stimberg
  8. Florian Jetter
  9. Guenther Zeck
  10. Serge Picaud
  11. Jens Duebel
  12. Olivier Marre  Is a corresponding author
  1. Institut de la Vision, INSERM UMRS 968, UPMC UM 80, France
  2. Laboratoire de Physique Statistique, CNRS, ENS, UPMC, 75005, France
  3. NMI, Neurophysics Group, Germany
4 figures, 1 table and 1 additional file

Figures

Figure 1 with 1 supplement
Main steps of the spike sorting algorithm.

(A) Five randomly chosen electrodes, each of them with its own detection threshold (dash dotted line). Detected spikes, as threshold crossings, are indicated with red markers (B) Example of a spike …

https://doi.org/10.7554/eLife.34518.002
Figure 1—figure supplement 1
Schematic of the parallel clustering of the spikes, in a toy example with two electrodes.

(A) Pre-clustering step. The different snippets are sorted according to the electrode where they peak. This divides a set of snippets in Nelec groups. Each of these groups is then processed …

https://doi.org/10.7554/eLife.34518.003
Performance of the algorithm on ground truth datasets.

(A) Top: Schematic of the experimental protocol in vitro. A neuron close to the multielectrode array (MEA) recording is recorded in loose patch. Bottom: Image of the patch electrode on top of a 252 …

https://doi.org/10.7554/eLife.34518.004
Scaling to thousands of electrodes.

(A) Execution time as function of the number of processors for a 90 min dataset in vitro with 252 electrodes, expressed as a real-time ratio, that is the number of hours necessary to process one …

https://doi.org/10.7554/eLife.34518.005
Automated merging.

(A) Dip estimation (y-axis) compared to the geometrical mean of the firing rate (x-axis) for all pairs of units and artificially generated and split spike trains (see Materials and methods). Blue: …

https://doi.org/10.7554/eLife.34518.006

Tables

Table 1
Table of all the variables and notations found in the algorithm.
https://doi.org/10.7554/eLife.34518.007
VariableExplanationDefault value
Generic notations

Nelec

Number of electrodes

pk

Physical position of electrode k [μm]

Gk

Ensemble of nearby electrodes for electrode k [μm]

Nneighk

Cardinal of Gk

θk

Spike detection threshold for electrode k [μV]

s(t)

Raw data [μV]

wj(t)

First component of the template for neuron j [μV]

vj(t)

Second component of the template for neuron j [μV]

frate

Sampling frequency of the signal [Hz]
Preprocessing of the data

fcut

Cutoff frequency for butterworth filtering100 Hz

Nt

Temporal width for the templates5 ms

rmax

Spatial radius for the templates250 μm

λ

Gain for threshold detection for channel k (θk)6

Np

Number of waveforms collected per electrode10000

NPCA

Number PCA features kept to describe a waveform5
Clustering and template estimation

x1,..lk

l spikes peaking on electrode k and projected after PCA

ρlk

Density around xlk

δlk

Minimal distance from xlk to spikes with higher densities

Nspikes

Number of spikes collected per electrode for clustering10000

NPCA2

Number of PCA features kept to describe a spike5

S

Number of neighbors for density estimation100

Nmaxclusters

Maximal number of clusters per electrode10

ζ

Normalized distance between pairs of clusters

σsimilar

Threshold for merging clusters on the same electrode3

αm

Centroid of the cluster m

γm

Dispersion around the centroid αm

η

Minimal size of a cluster (in percent of Nspikes)0.005

[amin,amax]

Amplitudes allowed during fitting for a given template
Dictionary cleaning

CCmax(m,n)

Max over time for the Cross-correlation between wm and wn

ccsimilar

Threshold above which templates are considered as similar0.975
Template matching

aij

Product between s(t) and wj (normalized) at time ti

bij

Same as aij but for the second component vj

nfailures

Number of fitting attempts for a given spike time3
Automated merging

ccmerge

Similarity threshold to consider neurons as a putative pair0.8

rm,n(t)

Cross correlogram between spikes of unit m and n

ϕ(m,n)

Geometrical mean of the firing rates for units m and n [Hz2]

ϕmerge

Maximal value for the dip in the cross correlogram at time 00.1 [Hz2]

Additional files

Download links