Welcome to HDBSCAN spike sorter’s documentation!
Spike sorting is the act of discriminating action potential from different sources (i.e from different neurons) in one’s data. The data can be one dimensional or multi-dimensional, for example when multi-electrode arrays are being used. This spike sorter has been designed to handle one dimensional data.
This spike sorter was developed by David Tadres while working in Matthieu Louis’ laboratory at UCSB to analzye electrophysiology data for the manuscript titled “Depolarization block in olfactory sensory neurons expands the dimensionality of odor encoding.”
The spike sorter works reasonably well for data where spike waveform does not change for the neuron of interest during the experiment. As depolarization block is usually preceded by a change in spike waveform, such as strongly decreased spike amplitude, this spike sorter performs less well during those recordings.
First, the data (Figure 1A/B) is filtered using median absolute deviation followed by a FIR bandpass filter (Figure 1C/D). Next, all datapoints above a user selected threshold are extracted (Figure 1E/F).
For all consecutive datapoints the peak is defined and 3 milliseconds before and after are defined to be a single waveform (Figure 2A). Individual features are extracted from each waveform, such as the amplitude peak (Figure 2B) and a summary vector is constructed for each waveform (Figure 2C).
These summary vectors are first dimensionality reduced using UAMP and then clustered using the HDBSCAN clustering algorithm (Figure 2D). It is possible to influence cluster size with the ‘epsilon’ parameter. To allow the user to visually identify the clusters of interest, they are plotted on the electrophysiology trace (Figure 2E/F). In this example, the spikes of interest have a pink peak amplitude preceded by a cyan ‘minipeak’. Selecting the pink group is sufficient to catch the spikes of interest.
Finally, it is possible to correct any mistakes the spike sorter might have made using a graphical user interface (GUI) (Figure 3A). The GUI allows one to quickly zoom into a region of interest and compare spikes from distant regions of the recording. It is also possible to compare a spike of interest to the mean spike waveform of all currently defined spikes of interest. The final output of the spike sorter is shown in Figure 3B, where the spikes of interest are plotted as a raster plot. In this example, every time the odor stimulus increases (yellow trace, bottom plot) more spikes are observed whereas less spikes are observed if the odor stimulus decreases as has been described before (Schulze et al., 2015).
The spike sorter is available here.