Unsupervised pipeline for the identification of cortical excitatory and inhibitory neurons in high-density multielectrode arrays with ground-truth validation
Figures

Workflow diagram of the proposed method.
(A) Filtering of the data is achieved through bandpass filtering (300–5000 Hz). Spike detection is done on filtered voltages; however, raw voltages around each spike are used to avoid signal distortion. (B) Spike sorting on each electrode. (Bi) Events are detected using a threshold method (6 SD from the mean of the filtered signal). (Bii) PCA and k-means on individual waveforms (k=2). (C) Precise soma location on the array. (D) Excitatory and inhibitory sorting. (Di) Spike time constant kinetics are extracted at the full width at half maximum and peak to peak distances. (Dii) Interpolated voltage for increased resolution. (Diii) k-means to distinguish cell type based on their waveform kinetics.

Isolation of single-cell action potential for each electrode.
(A) Multielectrode array recording set up. (B) Extracellular voltage on a single electrode. (Bi) Spike detection on filtered voltage. (Bii) Raw voltage extraction around detected spike. (C) Firing rate per electrode depends on threshold selection. The inset shows firing rate values at the selected threshold (4 SD). (D) Threshold selection to part cellular activity from normally distributed noise. (E) Spike sorting on a single electrode. (F) Current sink signal from single neuron spans multiple electrodes (four different neurons are shown in different colors), (G) Histogram distribution of tenfold cross-validation with chance performance indicated in red for all electrodes in a single recording. (H) Voltage amplitude as a function of distance from highest electrode peak, inset shows the directions measured from the center electrode. (I) Center of mass location of all spikes for a single soma, mean is indicated in red.

Decrease in voltage relative to the distance from putative soma.
(A) Voltage amplitude as a function of distance from highest electrode peak. Putative somas with an increase in voltage away from electrode peak were excluded from this analysis. (B–C) Distribution of slopes and intercepts across all putative somas obtained from one recording (N=1950).

Analysis of signal-to-noise ratio for single channels.
(A) Distribution of signal-to-noise ratio (SNR) over all spike-sorted clusters of a single recording (N=8059). (B) Examples of mean voltages (black lines) and individual voltages (gray lines) around individual spikes.

Identification of putative excitatory and inhibitory units.
(A) Distinct waveform kinetics for E and I cells (B) Respective cell location (C) Raster plot of E and I activity. (D) Fano factor for putative E and I cells. The shaded area represents the SEM. The x-axis shows temporal bins of increasing durations employed to compute the Fano factor (E) Mean cross-correlation as a function of spatial distance between pairs of electrodes. Non-overlapping bins of 100ms were employed to compute correlations. The resulting values were averaged by spatial distance between all pairs of neurons.

Distribution of mean firing rates across a population of putative excitatory (A) (N=570) and inhibitory (B) (N=54) neurons.
(C) Mean firing rate across neurons. Vertical bars: SEM.

Light artefact in a recording from mouse prefrontal cortex showing that the application of a brief (1ms) pulse of light leads to saturation lasting about 5ms post-stimulation.

Validation of step-function opsin by whole-cell recordings.
(A) Visually identified PV neuron (B) Nearby pyramidal neuron receiving inhibitory currents following PV opto activation (C) IPSCs onto pyramidal cell with 20 s rest between trial (D) IPSCs onto pyramidal cell with 60 s rest between trial (E) IPSCs onto pyramidal cell with 120 s rest between trial.

Optogenetic targeting of inhibitory cells for spike sorting (A) Average firing rate for putative excitatory and inhibitory neurons.
The shaded area represents the SEM. (B) Quantification of change in firing rate following optogenetic stimulation. Average firing rates are taken over four recordings obtained from three mice. (C) Delta change in firing rate (on – drugs) (D) Opto-evoked change in firing rate.
Tables
lang.: Programming language, # elect.
: Maximum number of electrodes tested on, data preproc.: Data preprocessing (formatting, filtering, artefact removal) included, event/channel loc.: Localization of single events, waveform extrac.: Spike features (such as peak-to-peak distance and full-width half max) are extracted from waveforms, e/i sorting: excitatory and inhibitory cell sorting, validation: validation of cell-type sorting (+)=ground truth validation via intracellular recordings, but not e/i validation, experim. prot.: integrates an experimental protocol to allow for network manipulation, unsuper.: unsupervised, requiring no manual user intervention, source code available: entire code is open-source and available.
lang. | # elect. | data preproc. | event/ channel loc. | waveform extrac. | e/i sorting | validation | experim. prot. | unsuper. | source code available | |
---|---|---|---|---|---|---|---|---|---|---|
spikeMAP | Python and Matlab | 4096 | + | + | + | + | + | + | + | + |
Kilosort4 (Pachitariu et al., 2023) | Python | + | + | - | - | - | - | - | + | |
SpyKING CIRCUS (Yger et al., 2018; Yger et al., 2023) | Python | 4225 | - | + | + | - | (+) | - | + | + |
MountainSort (Chung et al., 2017) | Matlab and C++ | 16 | + | + | - | - | - | - | + | + |
Herding Spikes (Hilgen et al., 2017) | Python | 4096 | + | + | + | - | (+) | + | + | + |
YASS (Lee et al., 2017a; Lee et al., 2017b) | Python | 512 | - | + | - | - | - | - | + | + |
JRCLUST (Jun, 2017, Jun, 2017) | Matlab and CUDA | 120 (1000) | + | + | - | - | (+) | - | - | + |
Summary of SpikeMAP open-source data.
Datasets were obtained from four mice. The optogenetic stimulation protocol (see Materials and methods) was run once per dataset. Data is available from: https://doi.org/10.6084/m9.figshare.29416472.
File name | Animal # | Protocol # | # of E cells identified | # of I cells identified | Total recording time (min) |
---|---|---|---|---|---|
R20211221_Slice1_Vars3.mat | 1 | 1 | 3687 | 47 | 8 |
R20211213_Slice2_Vars3.mat | 2 | 1 | 2943 | 350 | 8 |
R20211209_Slice3_Vars3.mat | 3 | 1 | 1994 | 712 | 8 |
R20211219_Slice3_Vars3.mat | 4 | 2 | 1138 | 32 | 8 |