BackgroundExtracellular recording represents a crucial electrophysiological technique in neuroscience for studying the activity of single neurons and neuronal populations. The electrodes capture voltage traces that, with the help of analytical tools, reveal action potentials (‘spikes’) as well as local field potentials. The process of spike sorting is used for the extraction of action potentials generated by individual neurons. Until recently, spike sorting was performed with manual techniques, which are laborious and unreliable due to inherent operator bias. As neuroscientists add multiple electrodes to their probes, the high-density devices are able to record hundreds to thousands of neurons simultaneously, making the manual spike sorting process increasingly difficult. The advent of automated spike sorting software has offered a compelling solution to this issue. The purpose of this study is to provide a simple-to-execute framework for using MountainSort, an automated spike sorting pipeline, in conjunction with MATLAB and the acquisition system (Cheetah, Neuralynx). We validate this automated framework with neural recordings from the hippocampus and prelimbic cortex. MethodsMultielectrode recordings of freely-moving mice are obtained from the CA1 region of the hippocampus as they navigate a linear track. Multielectrode recordings are also acquired from the prelimbic cortex, a region of the medial prefrontal cortex, while the mice are tested in a T maze. All animals are implanted with custom-designed, 3D-printed microdrives that carry 16 electrodes, which are bundled in a 4-tetrode geometry. ResultsWe provide an overview of a framework for analyzing single-unit data in which we have concatenated the acquisition system (Cheetah, Neuralynx) with analytical software (MATLAB) and an automated spike sorting pipeline (MountainSort). We give precise instructions on how to implement the different steps of the framework, as well as explanations of our design logic. We validate this framework by comparing manually-sorted spikes against automatically-sorted spikes, using neural recordings of the hippocampus and prelimbic cortex in freely-moving mice. ConclusionsAutomated spike sorting is a necessity for medium and large-scale extracellular neural recordings. Here, we have smoothly integrated MountainSort-based spike sorting into a framework for acquisition and analysis of multielectrode brain recordings in mice.