Figures and data

Toothy analysis pipeline for detecting hippocampal population events from electrophysiological recordings.
(a) Schematic of a laminar probe recording local field potentials (LFP) across hippocampal subregions in the mouse brain, including the CA1 pyramidal layer (green) and dentate gyrus (DG) polymorphic layer or hilus (blue). The multi-channel LFP recording can be analyzed with Toothy to detect sharp wave-ripples (SPW-Rs) and dentate spikes (DSs). (b) The Toothy pipeline consists of three main steps: (1) Data ingestion: The user loads LFP data, specifies the associated probe configuration, and sets parameters for further processing. Toothy performs automated event detection across all channels in the recording. (2) Channel selection: For each event type (SPW-Rs and DSs), the user selects a representative channel based on the channel’s properties (selected channel marked by triangle and colored trace; green for SPW-R and blue for DS). Toothy provides interactive features for visualizing and comparing event properties across channels. (3) DS classification: For each DS, Toothy computes a current source density (CSD) profile, finds a 2D representation using PCA, then clusters events into DS1 and DS2. Toothy displays the mean waveforms and CSD profiles for each cluster for the user to use to refine the clustering before confirming the labels for DS1 and DS2. (c) Toothy output: Toothy returns a table of event times and properties as well as a comprehensive log of the parameters used for event detection and classification parameters. The event times enable peri-event analysis of other simultaneously-recorded variables of interest, including neural activity (e.g., spiking, photometry) and behavior (e.g. pupil size, whisker movement). The parameter log promotes comprehensive reporting of event detection methods, supporting reproducibility.

Toothy home screen and convenience windows.
(a) Home screen: Central access point for all Toothy modules. (b) Path setting window: Accessed from the “Set paths” button on the home screen, the path setting window allows the user to set default paths for folders and files to which Toothy will point at later stages in the workflow. (c) Parameter setting window: Accessed from the “Set parameters” button on the home screen, the parameter setting window allows the user to choose between using default parameters for signal processing and event detection (optimized to mouse hippocampal data) or using custom parameter files.

Data Ingestion Window.
(a) Step 1: Select a recording. Users begin data ingestion by selecting a recording. The user clicks on the folder icon to open a file explorer and select a recording file. Once a file is selected, the box with the file path turns green and the next sections of the window appear, shown in (b), alongside the “Map LFP channels to probe(s)” button. (b) Metadata from the selected recording. The properties of the recording (number of channels, number of samples, and sampling rate) and the associated timestamps (start time, end time, duration) are displayed. In this example, a NeuroNexus file with 128 channels sampled at 1000 Hz was loaded. (c) Step 2: Map the recording to probe file(s). A probe file can be loaded or created to map the channels in the file to specific probe(s) and shank(s). Here, a probe configuration corresponding to a NeuroNexus A3x43/42/43-Edge probe. Once all channels have been mapped to a probe, the “Set processing parameters” button is enabled.

Designing a probe object.
(a) The Build tool generates a probe object from descriptive parameters, including channel count, shank count, electrode configuration, and contact spacing. Channel mappings can be entered as table rows or comma-separated values to set the probe’s wiring configuration, otherwise the physical probe layout is assumed to match the logical data order. (b) The Paste method generates a probe object from arrays of electrode X and Y coordinates. Electrode shank IDs can be entered as a corresponding array, or they can be assigned to specific X-values through a dedicated interface (c) This method supports irregular or asymmetrical layouts that violate the assumptions of the “Build” tool. (d)The generated probe object is displayed with interactive labeling of contact indices, device indices, and shank IDs. Probe configurations are saved in JSON format for compatibility with the probeinterface package27.

Selecting event channels and curating DS and SPW-R datasets
(a) The Channel Selection Window displays raw LFP traces from the selected probe and shank, with the color-coded signals representing the current event channels for DSs (red), SPW-Rs (green), and maximal theta amplitude (blue). The red and green vertical lines mark the timepoints of detected DSs and SPW-Rs, respectively, and the CSD surrounding the first DS event (blue patch) is displayed behind the LFP traces. The Events tab in the sidebar contains tools for setting event channels and analyzing DS and SPW-R datasets, while the Recording tab (right) provides general utilities for navigating, cleaning, and documenting the data. (b) Example SPW-R LFPs in CA1, expanded from the upper dashed box in panel a. (c) Example DS LFPs and CSD in the hilus, expanded from the lower dashed box in panel a. (d) Normalized amplitude across channels for the theta, ripple, and slow and fast gamma frequency bands, with event channels marked by color-coded lines.

Event-specific analyses.
(a) Interface for comparing DS and SPW-R events. “Single” mode reviews the individual waveforms in a dataset, and “Average” mode compares the mean event waveforms across multiple channels. (b) Parameter distributions for SPW-R events, showing the event count, amplitude, and ripple-to-theta ratio across all channels. (c) Mean DS waveforms from five example channels distributed across the probe. The overlaid waveforms highlight laminar differences in polarity, latency, and waveform shape across the hippocampal circuit. (d) Individual waveforms from two example DSs with the highest and lowest peak amplitude. The peak detection threshold is indicated by the dashed line, and waveforms are annotated to show with their half-width (green) and half-prominence height (red). (e) Example SPW-R waveform and ripple envelope (orange) in the filtered LFP. Detection thresholds are displayed for minimum peak height and edge height (dashed lines) and minimum duration (purple shaded region), and the event duration is indicated by the green bar.

Classification of DS1 and DS2 using CSD estimation and event clustering.
(a) Interface for CSD-based classification. The interactive CSD window is used to define the range of channels for analysis, and the sidebar enables configuration of CSD calculation settings and clustering algorithm parameters. The “Calculate” button initiates the CSD estimation and PCA-based clustering, and the results are displayed in three additional visualizations accessible through the inputs above the plot. (b) Heatmaps of raw LFPs (top) and raw CSDs (bottom) for each DS event. Right, mean LFPs and CSD surrounding DSs. (c) Mean LFP waveforms and filtered CSDs for DS1 and DS2 events. (d) Two-dimensional PCA projection of the normalized filtered CSDs. Events are color-coded by cluster label (DS1 or DS2).