Brief spike sorting info

Figures/data from Merricks, EM (2016) or Merricks et al. (2015) unless otherwise noted

The main metrics for assessing the quality of single units comes from:

Daniel N. Hill, Samar B. Mehta, David Kleinfeld

Brief overview of major metrics:

Spike sorting metrics
Single unit metrics
A. Projection of clusters onto the Fisher linear discriminant, showing (i) two units from the same channel that are well isolated from one another, and (ii) a unit that has likely been incorrectly split into two clusters. B. A measure of the estimated number of false negatives from a given unit. Histograms of the voltage at the detected trough of each waveform in the cluster, divided by the threshold for detection, with a Gaussian curve fitted. C. Histogram of the Mahalanobis distance for each waveform principal component score from that unit's centroid in principal component space. For a normal distribution, the Mahalanobis distances form a chi-squared distribution (blue line), which can be used to detect outliers. D. Standard deviation through time (deep blue line, top) for all waveforms from a given unit (bottom). The standard deviation of the full signal during that epoch is shown (red, dashed line), along with the 95% confidence intervals derived from the chi-squared distribution, given the number of spikes within the unit (red shading). Scale bars are 20 μV and 0.2 ms throughout the figure.

What you're up against:

Drifting single unit over 48 hours
Ability to follow drifting clusters in principal component space over a prolonged period.
An example putative single unit that showed a large alteration in waveform over a 40 hour period, but could be traced through time as a cluster in principal component space. A. First principal component scores versus time, from 180 second epochs taken every hour, with background noise from distal cells in grey, and a well isolated single unit in blue. Highlighted (grey background) epochs are shown in more detail in B and C. B. First versus second principal component scores for epochs highlighted in A, showing the maintained separation throughout. C. All waveforms from highlighted epochs, showing change in extracellular action potential shape.

That said, stability is in there:

3 stable single units through time
Stability of single unit features over 24 hours
Tracking units by wave shape, PC score, and importantly, cell-intrinsic autocorrelation patterns.
Tracking units with 180 s epochs every 6 hours showed:
  • 76 single units identified total
  • 54 (71%) visible in each epoch
  • 1 visible in just a single epoch
  • 12 (16%) gained
  • 4 (5%) lost
  • 5 (6.5%) lost temporarily

Tracking unit identities:

Tracking unit IDs using PC drift and ISI distance
Single unit stability metrics
To check units are the same, we can assess the drift of their centroid in cluster space (A and B) and their ISI distance, which captures a cell-intrinsic feature and thus doesn't change as a function of physical movement (C and D).

To confirm these identities, we can build a "null" distribution by comparing across units from different electrodes (assuming electrodes are distal enough to be sure single neurons can only be captured on one at a time), and then compare values using a Mann-Whitney U test.

Watch out for:

Sudden shift in single neuron waveform
Sudden alteration in isolated single unit waveform
Stability in one metric doesn't require stability in the others!

Here we see two apparently very distinct clusters in A. PC space and B. waveform (red and blue), but checking C. autocorrelations, D. PC score through time, and E. firing rate, we can clearly see it's one unit with a sudden waveform alteration.

Unit subclassification

For a Matlab tool for simple(-ish) unit subclassification by cell type, check out my UnitSubclassify tool on GitHub, which also includes screenshots of an exemplary putative fast-spiking interneuron and regular spiking pyramidal cell.

It also touches on some caveats and references on why we should be careful subclassifying in neocortical data.

Toolboxes worth checking out

Three modern spike sorting toolboxes that I'm keen to try out after I publish current work: