Skip to main content
PLOS One logoLink to PLOS One
. 2025 Sep 26;20(9):e0329537. doi: 10.1371/journal.pone.0329537

Supervised spike sorting feasibility of noisy single-electrode extracellular recordings: Systematic study of human C-nociceptors recorded via microneurography

Alina Troglio 1,2,3,*, Peter Konradi 4, Andrea Fiebig 1,2, Ariadna Pérez Garriga 4, Rainer Röhrig 4, James Dunham 5, Ekaterina Kutafina 6,7,, Barbara Namer 1,3,
Editor: Nicholas V Swindale8
PMCID: PMC12469167  PMID: 41004469

Abstract

Sorting spikes from noisy single-channel in-vivo extracellular recordings is challenging, particularly due to the lack of ground truth data. Microneurography, an electrophysiological technique for studying peripheral sensory systems, employs experimental protocols that time-lock a subset of spikes. Stable propagation speed of nerve signals enables reliable sorting of these spikes. Leveraging this property, we established ground truth labels for data collected in two European laboratories and designed a proof-of-concept open-source pipeline to process data across diverse hardware and software systems. Using the labels derived from the time-locked spikes, we employed a supervised approach instead of the unsupervised methods typically used in spike sorting. We evaluated multiple low-dimensional representations of spikes and found that raw signal features outperformed more complex approaches, which are effective in brain recordings. However, the choice of the optimal features remained dataset-specific, influenced by the similarity of average spike shapes and the number of fibers contributing to the signal. Based on our findings, we recommend tailoring lightweight algorithms to individual recordings and assessing the “sortability feasibility” based on achieved accuracy and the research question before proceeding with sorting of non-time-locked spikes in future projects.

Introduction

Electrophysiological extracellular nerve recordings allow researchers to gain insight into the peripheral and central nervous system activity. In the peripheral nervous system, these recordings can capture crucial sensory information, such as object texture perception, motor action guidance, and warnings of potential tissue-damaging conditions [13]. The recorded signals often originate from multiple neurons, which are referred to as units. Accurate spike sorting is critical for analyzing the functionality of individual units. In some experimental setups, particularly for multi-channel in-vitro recordings, the sorting task can be efficiently handled due to the high quality of the recorded data and supplementary spatial resolution [4,5]. However, other essential techniques, such as single-electrode in-vivo microneurography experiments, present significant difficulties, including low signal-to-noise ratios, activity of the subject, and lack of spatial resolution via multielectrode arrays, which would provide more reliability through simultaneous recordings of spikes from multiple adjacent sites [6]. On the computational side, the lack of benchmark datasets with ground truth and variability in the experimental setups across internationally distributed labs restrict methodological development.

Nevertheless, a variety of methods have been proposed to address spike sorting in both single- and multi-channel contexts. Traditionally, features are extracted using principal component analysis (PCA) and then used for clustering [7,8]. In addition to this conventional approach, other methods include template matching in phase space [911], unsupervised Bayesian clustering algorithms [12,13], consensus-based clustering [14], support vector machine (SVM) approaches [15], and neural networks [16,17]. While these methods differ in their assumptions for the experimental setup and implementation, for example, some are suitable only for multi-electrode recordings or hardware-embedded, they all address the core problem of classifying spikes under noisy and spike overlapping conditions. Additionally, several software frameworks and toolkits have been designed to support spike sorting across a range of experimental settings to complement these algorithmic advancements. For instance, Spike2 (Cambridge Electronic Design Limited) offers comprehensive data acquisition and analysis solutions and SpikeInterface [18] provides an extensive spike sorting pipeline with several sorting algorithms, but an important point frequently omitted in experimental studies is the validation of sorting accuracy using ground truth data. While the algorithms perform well in experiments with clean recording conditions and excellent signal-to-noise ratios, applying them to the important use case of noisy in-vivo microneurography recordings can lead to unreliable results and false conclusions about neurophysiological processes [19]. Achieving the required recording quality during microneurography experiments with human chronic pain patients is highly time-consuming and yields a very low number of recorded nerve fibers, for example, typically only one fiber can be recorded during six hours of the patient remaining completely still. However, reliability is essential for analyzing single-neuron level discharge patterns to understand the sensory input and processes, such as synaptic transmission and signal encoding [20].

In the context of pain and itch research, these discharge patterns have been particularly underexplored. The simplistic paradigm “more spikes with higher frequency result in more pain sensation” is still the only one in active use [21]. To verify the hypothesis that different discharge patterns encode itch versus pain sensation within the same nerve fiber and to gain a deeper understanding of the underlying mechanisms of chronic pain and itch, it is essential to analyze and quantify these discharge patterns comprehensively, which requires spike sorting.

The electrophysiological technique of microneurography enables extracellular recordings from the small diameter unmyelinated nerve fibers that are crucial for signaling itch and pain. By obtaining these recordings in humans, including patients, it is possible to correlate neural responses with individual perceptions [2224]. Microneurography captures single action potentials (spikes) from single peripheral nerve fibers. Previous studies, for example, have established a link between spontaneous activity in C-fibers and neuropathic pain in humans [25]. However, the single-contact electrode used in microneurography typically captures spikes from multiple nerve fibers within a single recording session, as C-fibers are anatomically clustered together in Remak-bundles. In addition, signal analysis is a challenge as the spikes from unmyelinated nerve fibers are small in comparison to the electrical noise.

This leads to simultaneous spike recordings from multiple nerve fibers along with noise from the subject’s background physiological activity, such as spikes in sympathetic or highly temperature-sensitive nerve fibers. This combination of noise and multiple nerve fibers presents a significant challenge for spike sorting methods and, subsequently, for extracting meaningful discharge patterns.

Given the complexity of multi-fiber recordings and background noise, Forster and Handwerker have already attempted to solve these problems by introducing a spike sorting approach specifically for microneurography [26]. Their method relies on thresholding to detect spikes and works well when the signal-to-noise ratio is high. The algorithm generates “templates” of spike waveforms, which serve as references, in two phases: initially, templates are created based on detected spikes, and subsequently, it compares all spikes to these templates for sorting. While this method allows for clear visual association of spikes and removal of artifacts, it requires manual parameter adjustment and is very sensitive to signal quality. Despite the partial automatization of this approach introduced by Turnquist et al. [6], spike sorting in microneurography remains unreliable due to the complexity of spike morphologies, as spikes from different nerve fibers often have similar shapes, leading to misclassification. This issue is further complicated by variations in spike waveforms originating from a single nerve fiber caused by noise or changes in recording conditions [6].

To ensure robust microneurography studies, the “marking method” [27] was developed. It is a special stimulation protocol that time-locks a subset of spikes via electrical stimulation. It allows the experimenter to collect information about the number of fibers in the recording and to identify single-neuron firing patterns linked to electrical stimulation, providing insights into peripheral neural activity.

Specifically, the marking method leverages the consistent conduction velocity of unmyelinated nerve fibers when electrically stimulated at a low frequency, for example, 0.25 Hz (see Materials and Methods). In this manuscript, we refer to this type of stimulation as background stimulation. Spike detection and sorting are based on the latency of response relative to the background stimulus. We refer to a sequence of spikes resulting from a single fiber response to the background stimulus as track. These tracks are the equivalent of units in traditional spike sorting terminology. Typically, multiple tracks are visible when latency responses are displayed sequentially. We refer to this data representation as waterfall plots (see Materials and Methods). This facilitates the identification of C-fiber subtypes and the automatic sorting of spikes from different tracks. When additional spikes are evoked by additional stimuli applied between two background stimuli, the conduction speed of the nerve fiber slows down, and the latencies of subsequent spikes increase. This phenomenon is known as activity-dependent slowing (ADS) [28]. The magnitude of the slowing of speed correlates roughly with the number of previously elicited spikes. The sudden increase in response latency is called a “marking” by the additional stimuli on the background stimulus. Despite ADS, the tracks remain visible, and the spikes from the tracks can be reliably classified, allowing the study of the fiber behavior under various electrical stimulation protocols. However, to study the responses to other significant stimulus types, for example, chemical and mechanical, as well as for a quantitative assessment of spontaneous activity observed in patients with peripheral neuropathies, an approach to classify all spikes accurately remains important.

In this work, we use the marking method to create ground truth datasets with reliable track labels to present a proof-of-concept computational pipeline for supervised spike sorting, focused on analyzing various feature sets and validation via experimentally available ground truth. We consider different data representations from simple (amplitude and width), through more sophisticated (spike sorting based on shape, phase, and distribution features (SS-SPDF) methods, as presented by Caro-Martín et al. [11]), to the raw waveform [2931] and apply support vector machine (SVM) classification method to the per-subject classification task. When using the raw waveform, we deliberately avoid interpreting extracellularly recorded action potentials in terms of their canonical physiological phases (for example, threshold depolarization, rapid upstroke, or repolarization). Instead, we treat each waveform as a series of quantitative samples, abstracted and analyzed as data points, analogous to pixel intensities in automated image analysis algorithms. By analyzing spike morphologies and their impact on sorting accuracy, we aim to overcome the limitations of current unsupervised methods and develop strategies for improving spike sorting in microneurography that may be applicable to other neural data.

To assess generalization, we collected recordings from two laboratories employing different hardware and software configurations for microneurography. Due to the fact that the marking method is routinely used in microneurography, partial ground truth (i.e., background spikes) will be available for almost all experiments. We introduce, to the best of our knowledge, the first exploration of a supervised approach for microneurography data. While this analysis is limited to labeled (tracked) spikes, this work lays the foundation for extending supervised classification to untracked spikes, such as mechanically or chemically evoked activity. However, this future application will require robust detection strategies and validation techniques, which we identify as key next steps and ongoing work. Nevertheless, by assessing the classifier’s accuracy on the tracked background spikes, we can estimate its ability to reliably sort the untracked spikes despite having ground truth only for the tracked data.

To support this analysis, we developed a data infrastructure, built for harmonizing and analyzing microneurography data, including a metadata standard [32] tailored for microneurography experiments employing odML and odML-tables [33,34], a Python library to export data from a data acquisition system [35], and openMNGlab [36], an open-source analytical framework (in development). This infrastructure allowed us to utilize 26 recordings from microneurography laboratories in Aachen, Germany (datasets labeled with A) and Bristol, United Kingdom (datasets labeled with B).

Our pipeline is the first step to efficiently and reliably analyze rare and valuable patient-derived recordings to better understand and treat chronic pain and itch. Further, it can serve as a “guideline” for testing and adapting spike sorting methods based on spike feature sets in diverse neuro-electrophysiological datasets. Additionally, the marking method provides a practical example of how to generate ground truth data with minimal human effort. By systematically analyzing microneurography recordings, we were able to characterize the morphological variability of spike shapes, providing important insights into the expected limitations and performance of spike sorting approaches in this context.

Results

Open-source spike sorting pipeline for microneurography data

We designed and evaluated a pipeline for the automated and systematic evaluation of spike sorting in microneurographic recordings [37]. This pipeline enables subsequent comparison of various feature extraction methods, as inputs for supervised machine learning models for microneurography data. To ensure the reproducibility and scalability of our analysis, we implemented the entire processing pipeline using Snakemake [38], a workflow management system designed for robust and automated data analysis. This framework allows us to define each step, from raw data reading and preprocessing to feature set extraction and classification, as modular, trackable processes. By leveraging Snakemake, we were able to process data from multiple sources efficiently and maintain a consistent computational environment across experiments.

We pre-analyze microneurography recordings using a ‘waterfall’ representation, which facilitates visualization of spike time alignment to tracks during low-frequency stimulation (Fig 1). This vertical alignment occurs because C-nociceptors have a consistent conduction velocity when stimulated electrically at a fixed low frequency. The alignment enables the identification and labeling of spike events by individual nerve fibers with a track number. In Fig 1, two tracks, Track1 (purple) and Track2 (orange), are identified from a nerve fascicle. Spikes are extracted within a 3 ms window from the signal, and the raw signal, spike and stimulation onsets, and track labels are combined into a harmonized NIX file [39]. Data harmonization is essential because different data acquisition systems are used across the two labs. We extract various feature sets from the spike waveforms. These feature sets (in short: simple, SPDF, W), which are summarized in the table within Fig 1 and further detailed in the Materials and Methods section, allow us to investigate which feature set works best for sorting.

Fig 1. Overview of the pipeline designed to sort spikes in microneurographic recordings.

Fig 1

Data is collected from laboratories in Aachen and Bristol and pre-analyzed using a ‘waterfall’ representation to align spikes based on C-fiber conduction speed. Two example tracks (purple and orange) are shown. The raw signal and extracted spike waveforms are harmonized, and multiple feature sets are computed (see Table) to assess their suitability for sorting. A Support Vector Machine (SVM) classifier with a radial basis function (RBF) kernel was applied to classify spikes, using 5-fold cross-validation and standard evaluation metrics (accuracy, precision, recall, and F1-score).

To assess the sorting accuracy on the tracked spikes, we employ a 5-fold cross-validation approach, splitting the labeled spike data into 80% training and 20% testing sets. Evaluation metrics are averaged across all folds to provide a more general performance score.

A Support Vector Machine (SVM) with a radial basis function (RBF) kernel is used as the classifier for its transparency, computational efficiency, and low number of hyperparameters. We calculate key performance metrics for sorting evaluation, including accuracy, precision, recall, and the macro-averaged F1-score (data in Supporting Information, S1S4 Files).

Raw spike waveform (𝐖𝐫𝐚𝐰) is the best input feature set for sorting spikes in microneurography recordings

We computed the averaged accuracy across all five cross-validation folds and tested it on six feature sets (Fig 2A). As feature sets, we included amplitude and width (simple), two feature sets derived from the SS-SPDF method (SPDFFV3 and SPDFraw), and three feature sets derived from the raw waveform (W2PCA, W3PCA, and Wraw). Details of the feature set computations are provided in the Materials and Methods section. The Wraw feature set has the highest mean accuracy, while the simple feature set has the lowest mean. The mean accuracy of the simple feature set is 0.59, compared to 0.73 for Wraw with the other feature sets falling in between. To further explore and substantiate these findings, we conducted a statistical analysis. The Wilcoxon signed-rank test with Bonferroni correction for multiple comparisons revealed no significant differences between the accuracies of most feature sets (Bonferroni-adjusted threshold αadj=0.01/n0.00067, where n = 15 pairwise comparisons). Nevertheless, Wraw performs significantly better than all other feature sets (Table 1).

Fig 2. Accuracy results for all datasets grouped by feature set.

Fig 2

(A) Individual results for each dataset. Darker shades represent lower scores, while lighter shades indicate higher scores. For Wraw, the mean accuracy is the highest, with 0.73. (B) Distribution of accuracies for each feature set. Boxes are drawn from the first quartile (median of the lower half of the score distribution) to the third quartile (median of the upper half of the score distribution). The line in the box marks the median of the scores. The lower and upper whiskers are bounded by the 1.5 interquartile range (IQR), which is the distance between the first and third quartiles. Scores outside of the 1.5 IQR bound are plotted as outliers. The dots mark the scores for individual datasets. Each color represents a different feature set group, with lighter, more transparent shades indicating the subset of the SS-SPDF feature vector or PCA in two and three components of the raw signal shown in the brighter color. Green stands for the simple feature set, blue for the feature sets of the SPDF method, and red for the raw waveform feature sets.

Table 1. Results of the Wilcoxon signed-rank test comparing accuracy differences across all feature sets. Each row represents a pairwise comparison between one feature set and the others, displaying the statistical significance based on the Bonferroni-corrected alpha level (αadj=0.01/15 0.00067). Red: not significant; green: p < αadj.

Simple SPDFFV3 SPDFraw W2-PCA W3-PCA Wraw
Simple
SPDFFV3 0.0356
SPDFraw 0.0890 0.6269
W2-PCA 0.0043 0.6349 0.0346
W3-PCA 0.0004 0.1963 0.0097 0.0126
Wraw 2.667×105 2.808×105 1.907×105 3.01×105 2.171×105

Although Wraw has the highest accuracy mean and median across all feature sets (Figs 2A, B), certain datasets exhibit superior performance with other feature sets, for example, dataset A1 performs best with the SPDFFV3 feature vector as input. Therefore, evaluating the optimal feature set for each specific dataset is essential.

Template morphological similarity and fiber count as indicators of sorting success

In Fig 3, we present exemplary plots for datasets A1 and A6, showing all tracked spikes and a corresponding template for each fiber in the recording, generated by averaging all spikes within each track. Spike templates for all recordings are provided in the Supporting Information (S5 File). To quantify the impact of similar spike shapes on sorting accuracy we used three distance metrics (see Materials and Methods), including root mean square error (RMSE), to evaluate the relationship between the visual similarity of templates and its impact on sorting accuracy (Fig 4A). For instance, the RMSE between templates in dataset A1 is 1.20 (max accuracy 0.97), while in dataset A6 the RMSE is significantly lower at 0.21 (accuracy 0.75) indicating higher similarity between templates and, consequently, lower sorting accuracy. This analysis demonstrates that lower distance scores often correspond to poorer sorting results due to template overlap, suggesting that template similarity is a key factor in assessing sorting quality. Additionally, distance metrics may serve as pre-sorting indicators to identify recordings that may not meet the requirements for good sorting outcomes.

Fig 3. Spike waveforms and corresponding templates for datasets A1 and A6 were created by averaging all detected spikes.

Fig 3

(A) Waveforms for both tracks in recording A1 show the blue track with a higher amplitude than the green track. (B) Waveforms for both tracks in recording A6, where waveforms visually overlap except for a few outliers. (C) Templates for both tracks in recording A1 are visually distinct. (D) Templates for both tracks in recording A6 show near-complete overlap and similar amplitude, indicating high template similarity.

Fig 4. Indicators of sorting success.

Fig 4

(A) Relationship between template distance and best-achieved sorting accuracy. The distance metrics used are the mean squared error (MSE), the mean absolute error (MAE), and the root mean squared error (RMSE). A smaller distance reflects a higher similarity between the two templates, corresponding to lower sorting accuracy. Smaller distances indicate higher similarity between spike templates and are generally associated with lower classification accuracy. To illustrate this relationship clearly, datasets with only two fibers are shown as primary data points. Additionally, for completeness and transparency, datasets with more than two fibers are included using a workaround: we selected the pair with the highest template similarity and marked these as grey crosses. While this allows all datasets to be visualized, it does not always reflect a fair comparison and may yield contradictory results, as seen in dataset B3, which exhibits very low error scores (e.g., MSE 0.004), but a high maximum classification accuracy (0.92). (B) Mean accuracy of each feature set (x-axis) across recordings, with accuracy values shown on the y-axis. The color of each marker represents the number of fibers tracked in the recording. The markers positioned above the horizontal line indicate that the classifier performs better than the random chance for the corresponding number of fibers.

Fig 4B shows the mean classification accuracy across all feature sets with different marker colors representing the number of fibers or tracks (2–6) in each recording. As expected, recordings with fewer fibers (e.g., two fibers) consistently achieve higher classification accuracy. In contrast, the classification accuracy tends to decrease as the number of fibers increases, indicating the challenge of differentiating between more similar spikes. Beyond fiber count, the feature set choice also impacts classification performance and aligns with the previously presented results.

Additionally, random chance accuracies (dashed lines) for each fiber count provide a reference for judging sorting quality. Recordings with mean accuracies close to or below these thresholds indicate poor separation of fiber classes or high template similarity. This baseline comparison allows us to identify recordings that are inherently challenging to classify accurately, even with optimal feature sets.

Limitations of unsupervised clustering with PCA features for microneurography data

As mentioned in the Introduction, the traditional spike sorting pipeline after spike detection often involves extracting principal component (PCA) features and evaluating cluster separability to differentiate fiber classes [8,40]. This approach assumes that unsupervised clustering can effectively differentiate between classes by relying on the natural separation of clusters in the PCA feature space. However, our findings suggest that this approach is most of the time unsuitable for microneurography data.

For example, when analyzing A1, we observe a high classification accuracy (0.97), yet no clear cluster separation when visualized in either two-dimensional (Fig 5A) or three-dimensional PCA space (Fig 5B). This discrepancy highlights a key limitation: visual inspection of PCA projections may incorrectly suggest a single track when multiple tracks are present. To further test this, we applied k-means clustering and evaluated performance using ground-truth labels.

Fig 5. Comparison of unsupervised clustering challenges for datasets A1 and A3.

Fig 5

Each panel visualizes spikes in different feature set spaces, color labels are applied based on the ground truth labels obtained via the marking method. Panels (A-C) show results from dataset A1. (A) PCA projection in two components (B) PCA projection in three components (C) three-dimensional feature set SPDFFV3. Panels (D–F) correspond to dataset A3. (D) PCA projection in two components (E) PCA projection in three components (F) three-dimensional feature set SPDFFV3. These visualizations highlight the difficulty of distinguishing clusters using low-dimensional PCA representations, as well as in the SPDFFV3 feature space for dataset A3. Clear separation between clusters is observed only in the SPDFFV3 representation for dataset A1 (panel C), while the other views show substantial overlap.

While PCA is typically limited to the first 2–3 components in practice, we extended the analysis to include up to eight components to ensure we did not overlook higher-dimensional separability. Nonetheless, clustering performance metrics, including Adjusted Rand Index (ARI), Normalized Mutual Information (NMI), and V-measure (defined and implemented in the scikit-learn library [41]), remained low and stable across all component counts (Table 2). For example, even with five components capturing 82% of the variance (cumulative explained variance for A1 and A3 is visualized in S6 File), the V-measure peaked at only 0.62, indicating that clustering performance remained poor despite higher-dimensional feature representations.

Table 2. Clustering performance across increasing numbers of PCA components for A1. To assess whether additional components improved separability, PCA was extended up to eight components beyond the commonly used first two or three. Clustering performance was evaluated using Adjusted Rand Index (ARI), Normalized Mutual Information (NMI), and V-measure.

Number of PCA components ARI NMI V-measure
2 0.70 0.59 0.59
3 0.70 0.59 0.59
4 0.71 0.61 0.61
5 0.73 0.62 0.62
6 0.73 0.62 0.62
7 0.73 0.62 0.62
8 0.73 0.62 0.62

All clustering results using k-means with the presented feature sets are reported in the Supporting Information (S7S9 Files). Interestingly, when analyzing the SPDF-derived feature set (SPDFFV3), it revealed two clearly separated clusters (Fig 5C) for A1, which aligned with the known tracks and coincided with a high ARI score (S7, 0.88). However, it is important to note that the number of clusters (k) was fixed to match the known number of tracks, which introduces a bias that artificially inflates clustering performance. Thus, the reported metrics should be interpreted with caution.

In contrast, for dataset A3, despite high classification scores for the Wraw feature set (0.93), no visually distinct clusters were observed in any of the feature sets (Fig 5DF). This further shows the disconnect between classification accuracy and the visibility of separable clusters in feature space, especially under unsupervised assumptions.

Considering these findings, we note that both PCA- and SPDF-based feature sets perform well in terms of supervised classification accuracy. Additionally, SPDF features can provide more robust clustering behavior and better reflect underlying track separations, particularly in cases like A1.

However, these results underscore the need for caution among microneurography researchers, as relying solely on unsupervised methods like k-means clustering applied to PCA feature sets may yield unreliable results in this context. We advocate supervised methods that can leverage prior knowledge to improve classification accuracy when group boundaries are not inherently clear as unsupervised methods may suggest more or fewer classes than exist.

Limitations of unsupervised spike sorting algorithm applying SpikeInterface

To further evaluate the limitations of unsupervised spike sorting pipelines for microneurography data, we applied the SpikeInterface framework [18] to A1 and A5, using the NIX format for seamless integration, as they had the best classification performance. We tested both SpyKING Circus 2 [4] and MountainSort5 [42] with detection thresholds based on the smaller template (−3.0 for A1 and −2.5 for A5). While both algorithms detected only a fraction of our tracked spikes, they struggled to separate distinct tracks and merge dissimilar spikes into a single unit (Table 3). These outcomes propose that full unsupervised pipelines are not suited for microneurography data and support our presented approach of explicitly separating detection and supervised sorting, which allows for greater control and better sorting results. We applied both sorters with only minimal parameter adjustments to reflect a straightforward use case, acknowledging that further tuning may improve the performance, but the core issue of the lack of separation between fibers remains.

Table 3. Performance of sorting algorithms within the SpikeInterface framework for datasets A1 and A5. SpyKING Circus 2 and MountainSort5 were applied to two microneurography recordings (datasets A1 and A5). While both algorithms detected varying numbers of units and identified only a subset of the ground truth spikes, the primary issue was the failure to distinguish between fibers: spikes from both fibers were consistently merged into a single unit.

Dataset Sorting algorithm Number of tracks Total number of true spikes Detected units True positive detected spikes Correct fiber assignment
A1 SpyKING Circus 2 2 256 3 46 (Track1: 20, Track2: 26) No, both fibers merged to single unit
Mountain Sort5 5 12 (Track1: 8, Track2: 12) No, both fibers merged to single unit
A5 SpyKING Circus 2 2 340 2 99 (Track2:50, Track3: 49) No, both fibers merged to single unit
Mountain Sort5 4 34 (Track2:16, Track3: 18) No, both fibers merged to single unit

Discussion

To the best of our knowledge, this work is the first systematic approach analyzing spike sorting of microneurography recordings. It stands out by harmonizing microneurography data from two geographically distant locations and independent work groups with different recording hardware and software [43]. We incorporated 26 datasets, which capture the typical broad spectrum of variability inherent to microneurography recordings. The dataset diversity was carefully curated to include a wide range of recording durations and number of tracks in multi-track recordings, but excluded recordings where spikes overlapped, as these instances could cause even more challenges for sorting. Spikes recorded via microneurography are highly sensitive to different factors, such as electrode movement or environmental electrical noise and spikes from different nerve fibers can be remarkably similar in shape. Our analysis aimed to address these complexities while providing a transparent and well-documented open-source pipeline, which can be adjusted to other types of neuro-electrophysiological data.

When regarding the mean of all tested recordings, the raw signal feature set (Wraw) revealed the highest potential for sorting, slightly outperforming the features from the SS-SPDF method. The raw waveform (Wraw) yielded the best performance in 17 out of 26 datasets when employing SVM classifiers with RBF kernels, with the best accuracy of 0.99 on 2 classes and the worst 0.19 on a recording with 6 classes. However, when comparing the sorting potential of different feature sets for individual recordings, our findings emphasize that the choice of the optimal feature set depends heavily on the specifics of individual recordings, which may exhibit significant variability. A more detailed discussion of related work in the field is provided below.

The transparency of the computational pipeline allowed us to trace the relationships between the spike waveform similarities and the resulting sorting difficulties. Our work represents an important first step towards automatized spike sorting in microneurography. We demonstrated that a classifier trained on a subset of tracked spikes achieves promising results when applied to other tracked spikes, and hence, has high potential to sort untracked spikes correctly as well. Importantly, the sorting accuracy on tracked spikes will further allow us to estimate the “sortability” of a recorded file providing us with important knowledge on the reliability of sorting unlabeled data (untracked spikes). In the case of microneurography, with the standard presence of baseline electrical stimulation every 4 seconds, we can obtain 80–100 labeled spikes after 320–400 seconds of stimulation, which is typically sufficient for training of low-parameter classifiers (such as SVM) and making our approach practical for many microneurography labs.

In contrast to our approach, applying full spike sorting pipelines, such as those offered through SpikeInterface with multiple state-of-the-art sorters, resulted in poor performance when used on example microneurography data. Even high-quality recordings had low detection rates for our previously tracked spikes and produced unreliable sorting results using SpyKING Circus 2 and MountainSort5, which are based on clustering combined with template matching [4] and ISO-SPLIT clustering [42], respectively. Although the comparison was done on a limited subset of the available data and without extensive parameter tuning, these findings highlight the limitations of unsupervised end-to-end methods for microneurography data, where single recording electrode, low signal-to-noise ratios, and similarity of spike shapes of different nerve fibers complicate fiber differentiation.

Feature set extraction methods showed substantial variation in performance across datasets. Although Wraw generally outperformed other feature sets, it was not consistently optimal, underscoring the need for dataset-specific approaches. For comparison, we also evaluated all feature sets using a random forest classifier. Notably, this approach yielded higher accuracy for SPDFraw (mean accuracy 0.64 for random forest, 0.62 for SVM), while the remaining feature sets showed comparable performance to the SVM classifier. This suggests potential advantages of specific classifier-feature set combinations in certain cases. Full performance metrics for the random forest classifier are provided in the Supporting Information (S10S13 Files). Phase space representation originated from the works of Aksenova et al. [9] and Chivirova et al. [10], and was implemented in our work following the SPDF features introduced by Caro-Martín et al. [11], remains a powerful alternative and also showed good performance in our work. By shifting the time-component into the curve-parametrization parameter role, we consider the phase space representation to be a strong candidate for the development of the computational pipeline trained on multiple recordings. Template matching approaches in phase space should also be tested as computationally efficient and transparent alternatives.

Machine learning, such as automatic feature extraction [44] and multi-task transfer learning [45] could offer an effective strategy for combining multiple recordings into a unified model despite the observed sensitivity to feature set selection. These approaches can make the use of more advanced models increasingly feasible, for example, preliminary tests with Variable Projection Networks (VPNets) [46,47] indicated promising generalization potential in multi-record spike sorting.

An additional point, not addressed in our work, remains the challenge of overlapping spikes. When targeting the analysis of spontaneous activity in microneurography recordings, the issue of overlapping spikes becomes unavoidable and poses a significant challenge for spike sorting, which is also mentioned by Aksenova et al. [9]. In our current setup, this issue is mitigated using evoked activity and different stimulation protocols. Even when two fibers produce spikes with identical latencies, superimposed spikes can still be differentiated due to varying amounts of activity-dependent conduction velocity slowing over time [48]. This effect is clearly visible in the waterfall representation and allows us to distinguish between fibers based on how their conduction velocity changes in response to different types of stimulation.

However, as we move toward the task of sorting spontaneous activity, where stimulation-derived timing information is unavailable, overlapping spikes become an issue. In such cases, relying solely on the time domain representation of spike waveforms may no longer be sufficient. Small distortions in waveform shape due to overlapping spikes or intrinsic variability can lead to misclassification. Incorporating phase space-based features, potentially in combination with fiber conduction velocity information, available in microneurography, could be efficient for extending our supervised spike sorting framework to reliably detect and classify overlapping spikes during spontaneous bursts.

While no direct result comparison to the literature is possible, we would like to link our findings regarding the methodological choices.

Several other works report SVMs as a strong tool to assess classification performance from ground truth or tracked spikes. Fournier et al. take the unsupervised approach by relying on consensus clustering without making statistical assumptions about spike shapes [14]. Their method builds robust clusters through repeated k-means runs and then leverages template matching based on these clusters. Interestingly, they use SVMs to compute an upper bound for sorting accuracy, similar to our use of classifiers on subsets of tracked spikes to estimate performance for future analysis of untracked spikes. However, their reliance on PCA for feature extraction may not be optimal for our data, where alternative features provide better separation.

Vogelstein et al. explore the use of GiniSVMs for both spike detection and classification, using 1.25 ms waveform segments as input features [15]. Their two-stage approach first distinguishes spikes from noise and then classifies the spike waveform into templates. Compared to conventional template matching, the SVM consistently outperforms across varying signal-to-noise ratios, which aligns with our own observations when investigating template-based methods in the time domain. The use of GiniSVM specifically allows for probabilistic outputs, which adds robustness in uncertain conditions and offers a valuable confidence measure during classification. Given these advantages, it could be worthwhile to test GiniSVM in our pipeline, particularly for scenarios requiring confidence-weighted decisions or where we only have labeled data for a subset of spikes.

While our approach relies on supervised learning, unsupervised Bayesian algorithms showed promising results for noisy neural recordings. Takekawa et al. proposed a spike sorting method using wavelet-transformed features and robust variational Bayes (RVB) clustering based on Student’s t-mixture models [12]. Takekawa et al. later introduced an enhanced framework combining multimodality-weighted PCA (mPCA) with an explicit variational Bayes implementation [13]. This approach improves feature selection by emphasizing multimodal components and achieves robust clustering even for bursting and sparse-firing neurons, which we would like to test in the future, as it might have the potential for improving spike sorting for bursting activity from spontaneously active nerve fibers.

While our findings provide important insights into spike sorting for microneurography recordings, the main limitations must be acknowledged. First, although numerous spike sorting algorithms and feature extraction methods exist, our work focused on a narrow selection employing a supervised approach using support vector machines based on our prior experience with unsupervised tools, such as SpikeInterface or k-means clustering with PCA-based features.

Second, our analysis was limited to 26 microneurography recordings. Given the high variability inherent in peripheral nerve recordings, both between participants and across experimental sessions, our findings may not generalize across all microneurography recordings. The features and sorting strategies that proved effective in this data collection may not perform equally well in recordings with different noise characteristics or human conditions.

Third, while we incorporated both raw waveform features and phase-based features, it is important to note that the raw waveform features and their PCA components lack direct physiological interpretability. We acknowledge this limitation, and in comparison, SPDF features might be a more suitable choice, particularly for handling spontaneously evoked spikes that may overlap in time.

The main limitation of our study is the challenge of reliable testing on the unlabeled data, for example, untracked spikes of spontaneous fiber activity. In this work, we report the sorting results on tracked spikes, provided by “ground truth” data. Using 5-fold cross-validation with an 80/20 training and testing split allows us to provide a robust and reliable estimate for classifier performance by reducing potential biases of a single train/test division. While this approach helps assess generalization on labeled data, it does not guarantee comparable performance when applied to untracked spikes. The results presented here should therefore be interpreted as proof-of-concept, demonstrating the feasibility of using labeled spikes as a training set to evaluate the potential of a recording for sorting and training of a supervised classifier. In a real-world application, all available labeled spikes would be used for training for the classifier and then applied to sort the remaining unlabeled spikes detected post hoc. Currently, we are working on the creation of another data set, specifically focused on non-tracked spikes. This can be achieved by combining experimental protocols simulating spontaneous activity (for example, chemical stimulation) with manual data labeling.

Another drawback of our approach is that the performance of the SVM classifier significantly decreases as the number of fibers in a recording increases (Fig 4B), which aligns with the documented issue in central nervous system recordings [49]. One potential approach to mitigate this challenge is a one-vs-all strategy, where only spikes from a single nerve fiber with a high signal-to-noise ratio are prioritized for sorting. However, some recordings may be too complex or noisy to allow for effective spike sorting, making them unsortable. It is, therefore, crucial to raise awareness among experimenters about the importance of minimizing the number of fibers in recordings when reliable spike sorting is essential. Prioritizing recordings with fewer fibers can help ensure more accurate and consistent spike sorting results.

Conclusions and outlook

We conducted the first systematic investigation of spike sorting perspectives and challenges in extracellular single nerve fiber recordings from peripheral nerves. By harmonizing data between two microneurography labs and using an electrical stimulation protocol based on the marking method, we created a diverse ground-truth data collection. We designed an open-source computational pipeline to test various sorting approaches. Due to the high variance between datasets, we used individually trained models. The performance on each dataset largely depended on the number of neural fibers contributing to the single-channel signal and the morphological differences between spikes from different fibers.

Our results show promising performance of the supervised approach to spike sorting in microneurography, with the SVM algorithm applied to the raw spike waveform features slightly outperforming other tested combinations in comparison to other extracted feature sets. Due to the high variance between datasets, we used individually trained models. The performance on each dataset largely depended on the number of neural fibers contributing to the single-channel signal and the morphological differences between spikes from different fibers.

Moving forward, our next goal is to extend the pipeline by incorporating spike detection for untracked spikes. The critical bottleneck in advancing this work is designing experiments where ground truth can be confidently established for all spikes. As a practical solution, we will initially focus on purely electrically evoked activity, where stimulation allows for controlled spike timing. Once validated, we plan to gradually expand to more stimuli, mechanical, thermal, and chemical, that more closely mimic spontaneous activity.

To work toward the goal of sorting untracked spikes, the next step will be to apply our trained classifier to detected spikes that are not aligned on the tracks. While the present study serves as a proof-of-concept, demonstrating the feasibility of using labeled spikes for training, a fully operational pipeline requires robust and reliable spike detection from raw microneurography recordings. This remains a key limiting factor, as accurate detection is especially challenging, as high noise levels and low signal-to-noise ratios make many spikes small and undetectable using standard detection methods without the aid of the marking method. Addressing this issue is a priority in our ongoing work, as resolving it will be crucial to ensuring accurate comparisons and improving the overall reliability of microneurography data analysis.

In future work, we will explore the performance impact of testing combinations of all feature sets, moving beyond the distinct feature sets analyzed here to gain deeper insights into their contributions to model performance. We plan to benchmark our approach against existing spike sorting frameworks, such as Spike2, in a more extensive and detailed manner, to evaluate their performance and suitability for different aspects of microneurography data, starting from spike detection, which is an important challenge for untracked spikes. This comparison will provide critical insights into standard pipelines’ effectiveness and their adaptability to this recording method.

Further, we will explore deep-learning methods and fine-tuning in order to include multi-recording data in one model rather than retraining models for each dataset individually. Additionally, ADS-related parameters, which reflect the number and timing of previous fiber activity [27], could be used to enhance the model’s performance via an additional probabilistic layer in the decision process.

The knowledge gained from this work also allows an immediate step towards sorting and analyzing pain and itch-linked peripheral activity, which was not evoked by electrical stimulation. This can be achieved by setting high accuracy thresholds and only analyzing recordings with a satisfactory level of reliability. Furthermore, spike train features should be selected with consideration of their sensitivity to potential misclassifications. For good research practice, the information about the sorting accuracy of the time-locked spiked should be stored together with the spiking activity analysis as one of the assessments of the results’ reliability.

Our approach is transferable to other neuro-electrophysiological recordings, particularly when regular stimulation that evokes single spikes can be employed to gain time-locked responses. This enables the generation of a reliable ground truth dataset for method validation. While this study focuses on C-fiber recordings, the same framework could be applied to other peripheral recording types, including Aδ- and Aβ-fibers, as well as sympathetic efferents, broadening its relevance beyond nociception. It could support the development of intelligent prosthetic devices as accurate feedback from the peripheral nervous system is crucial for closed-loop motor control and effective human-machine interaction. For transferring out method to spinal or central recordings, a practicable method for producing time-fixed spikes serving as ground truth data and training set could be developed.

Materials and methods

Microneurography

Participants in Aachen were recruited from 01/11/2019–31/03/2023 and participants in Bristol from 04/08/2017–30/11/2022. Twenty-six recordings from healthy volunteers were included in this work. The studies involving human participants were reviewed and approved by the Ethics Board of the University Hospital RWTH Aachen with numbers Vo-Nr. EK141−19 and Vo-Nr. EK143−21 and from the Faculty of Biomedical Sciences Research Ethics Committee at the University of Bristol (reference number: 51882). The participants provided their written informed consent, and the study was conducted according to the Declaration of Helsinki.

In both laboratories, a microelectrode (Frederick-Haer, Bowdoinham, ME, USA) is inserted into the superficial peroneal nerve (Fig 6A) while the volunteer or patient is awake and responsive. In Aachen, the signal is amplified and filtered with a Neuro Amp EX (ADInstruments) amplifier, an additional bandpass filter with 500–1000 Hz, and a 50 Hz notch filter. The recordings were acquired at 10 kHz with an analog-digital converter from National Instruments and a customized software Dapsys (www.dapsys.net) from Brian Turnquist [6,50]. In the laboratory in Bristol, a custom-made recording system and software were used based on electronics and software from Open Ephys [51], APTrack [52], and SpikeSpy [53]. The data was provided in an HDF5 format [54]. This system acquires at 30 kHz, and the signal is digitally filtered (300–6000 Hz). The acquisition board was electrically isolated from the system using a 5kV optoisolator (Intona, Germany). In both laboratories, the receptive field of C-fibers is determined through transcutaneous electrical stimulation utilizing a Digitimer DS7 constant current stimulator. Once the receptive field is identified, C-fibers are repetitively stimulated at a low frequency (e.g., 0.25 Hz), which enables the marking method to be used. A more detailed description of microneurography can be found here [55].

Fig 6. Details on microneurography experiments.

Fig 6

(A) Set up of microneurography experiments. One microelectrode is inserted into a fascicle of the nerve and another as a reference electrode in the skin nearby. In the receptive field in the skin, C-fibers are activated by electrical stimulation. (B) Schematic waterfall plot of two C-fiber tracks. The waterfall provides a visual representation of the marking method with two active fibers (green and red spikes) represented as track. The onset of the electrical stimulation is indicated by the blue rectangle. Each line, referred to as a trace, begins with the low-frequency stimulus. When extra stimulation is applied (line 6, red and green spikes) or spontaneous activity occurs (line 11, orange spikes), ADS is observed in both fibers [56]. (C) An example spike with a low signal-to-noise ratio. The screenshot of a recording in Dapsys, in which the red line indicates the exemplary spike of interest with an amplitude similar to the background noise level. We could only identify the spike by the marking method.

In this work, spikes were elicited through electrical stimuli. We recorded 22 datasets in the microneurography laboratory in Aachen (A1-A22), and four files were acquired at the lab in Bristol (B1-B4). Details are listed in Table 4. These datasets have different recording conditions, including varying noise levels, signal complexity, and the number of tracks. Each dataset presents distinct challenges, for example, spikes from different tracks have the same amplitude or there are more than two tracks in a single dataset. This diverse collection provided a comprehensive set for evaluating the sorting results.

Table 4. Overview of the data collection, including the number of active tracks, the class distributions, and the number of total spikes. Additionally, we included the spike numbers for each feature set. The classes are mostly equally distributed. Datasets labeled with A are from the lab in Aachen and datasets labeled with B are from Bristol.

Dataset Number of tracks Track labels and distribution Total spikes Spikes (Simple) Spikes (SPDF) Spikes (W)
A1 2 Track1: 129
Track3: 129
258 258 258 258
A2 2 Track3: 268
Track4: 268
536 536 536 536
A3 2 Track1: 173
Track2: 173
346 346 346 346
A4 3 Track1: 647
Track2: 632 Track4: 687
1966 1916 1916 1966
A5 2 Track2: 170
Track3: 170
340 339 339 340
A6 2 Track2: 103
Track4: 103
206 206 206 206
A7 3 Track2: 86 Track4: 86
Track6: 86
258 258 258 258
A8 3 Track3: 102 Track4: 97
Track7: 101
300 298 298 300
A9 2 Track1: 115
Track2: 115
230 229 229 230
A10 3 Track2: 152
Track4: 153 Track5: 114
419 419 419 419
A11 5 Track3: 93 Track4: 93
Track13: 93 Track15: 93
Track22: 93
465 455 455 465
A12 6 Track3: 348 Track7: 350
Track8: 350 Track11: 349
Track13: 344 Track15: 348
2089 2056 2056 2089
A13 4 Track1: 124 Track5: 124
Track11: 129 Track20: 128
505 499 499 505
A14 2 Track1: 155
Track2: 155
310 308 308 310
A15 2 Track2: 137
Track7: 145
282 279 279 282
A16 5 Track1: 159 Track3: 159
Track5: 160 Track7: 157
Track8: 160
795 785 785 795
A17 5 Track1: 205 Track2: 152
Track3: 205 Track4: 203
Track6: 198
963 952 952 963
A18 5 Track1: 209 Track2: 208
Track3: 209 Track4: 206
Track6: 204
1036 1020 1020 1036
A19 4 Track1: 205 Track3: 205
Track4: 204 Track7: 202
816 809 809 816
A20 3 Track1: 122 Track2: 112
Track4: 108
342 337 337 342
A21 2 Track3: 218
Track4: 308
526 525 525 526
A22 2 Track3: 144
Track4: 144
288 286 286 288
B1 3 Track1: 277 Track2: 499
Track3: 306
1082 979 979 1082
B2 5 Track1: 252 Track2: 254
Track3: 232 Track6: 243
981 866 866 981
B3 3 Track1: 189 Track2: 183
Track3: 141
513 420 420 513
B4 2 Track1: 184
Track2: 182
366 332 332 366

Table 4 provides a summary of the key characteristics of each dataset, including the number of tracked fibers and the total spike count. The spike count per recording ranges from 206 to 2089, representing the data points that will be split into training and test sets. The number of tracks varies from two up to six, reflecting the complexity of each dataset. The final columns contain the spike numbers for all extracted feature sets.

Marking method

In microneurography, experimenters employ the marking method [27], a type of stimulation protocol, to observe nerve fiber responses in the form of spikes. The technique utilizes the characteristic that C-fibers have an almost constant conduction velocity in response to repetitive low-frequency stimulation (e.g., 0.125–0.25 Hz), described here as background stimulation. This allows time-locking a subset of spikes. When raw signal segments are plotted sequentially and vertically in a waterfall representation, where each segment starts at the onset of the background stimulus, the spike responses evoked by the background stimulation are vertically aligned (red and green spikes in Fig 6B). This alignment enhances the visibility of spikes, even when the signal-to-noise ratio is poor (Fig 6C for an exemplary spike).

Different C-fibers show distinctive conduction velocities, facilitating the differentiation of multiple fibers within a single recording [6]. When applying further stimulation in the form of extra electrical pulses or natural stimuli, there is a slowing in the conduction velocity of the signal transmission and an increase in latency to the subsequent background stimulus. This phenomenon is known as activity-depending slowing (ADS) [28] and “marks” the fiber. ADS is useful not only to distinguish fibers but also for their classification as different physiological classes of C-fiber exhibit differing degrees of slowing to low and high-frequency electrical stimulation, such as mechanosensitive (CM) or mechanoinsensitive (CMi) C-fibers [55]. In Fig 6B, a representative “waterfall” plot is presented, illustrating the trajectories of two tracked fibers. In this manuscript, we call them tracks. When the stimulation remains constant (indicated by blue rectangles), the responses align vertically (lines 1–5). However, after stimulating the fibers with two extra pulses (as seen in line 6), we can observe ADS in both fibers. Through subsequent repetitive low frequency stimulation, latencies recover to their initial values. The remaining issues and challenges in accurately sorting spontaneous firing or chemically induced activity when the spikes have a similar shape persist if in more than one fiber ADS is observed (see line 11). The red and green spikes, representing responses to extra stimuli in line 6, and the orange-marked spontaneous activity in line 11, cannot be reliably sorted as they are not on the tracks.

Tracking algorithms

When the marking method is applied during the experiments, spike tracks can be efficiently extracted and analyzed post hoc. The tracks are visualized using the waterfall presentation, which makes the nerve fiber responses clearly identifiable. Both laboratories use their respective preferred tracking software and built-in functionality to label spikes along the track. Screenshots of both software can be found in Supporting Information (S15 File).

Although automatic tracking provides a rapid and convenient initial result, it typically requires manual verification and correction to ensure accurate spike identification. Vertical alignment in the presentation facilitates this step, as it indicates the expected location of spikes, even those with low amplitude, making them easier to detect and mark precisely. This manual refinement is critical to ensure each spike has a track label.

In Namer’s lab, we used the proprietary software Dapsys, also employed for data acquisition, based on algorithms developed by Brian Turnquist [50]. In Bristol, we developed our own open-source tracking software, SpikeSpy [53], which supports the HDF5/NIX data format. After manual curation, the finalized spike track data can be exported containing the spike time annotations and track labels.

While reliability naturally depends on the researcher performing the curation, the process is generally manageable and tends to involve more routine than complex decision-making.

Pre-processing for feature extraction

To ensure data harmonization, we agreed on utilizing the NIX [39] format, a well-established standard in the field of electrophysiology in combination with Neo [57]. A general overview of the preprocessing workflow is shown in Fig 7, while the detailed processing steps are described below.

Fig 7. Details on pre-processing.

Fig 7

The recording (either raw Dapsys file or HDF55 file) is first read in and converted into pandas data frames containing spike times, stimulus times, and raw signals. The data from Dapsys and HDF5 are saved as NIX files via the creation of a Neo block. Spikes are then extracted using a window function around each spike timestamp from the raw signal. The first and second derivatives of the signal are computed to enable alignment based on the most negative peak of the first derivative. Finally, spike templates are computed for each track by averaging all aligned spike waveforms.

To handle the datasets generated by Dapsys, we used our Python package PyDapsys [35]. This package enables us free access to electrophysiological recordings stored in Dapsys’ proprietary data format. For analyzing an individual recording, we retrieved the raw signal with timestamps and voltages, the timestamps of all tracked spikes with their corresponding track label to ensure ground truth data, as well as the onset timestamps of stimulation events. However, during acquisition, the Dapsys system occasionally introduces short breaks in the recorded signal, resulting in gaps in the raw data. Since Neo [57] expects a continuous time series, these discontinuities cause misalignments between the spike train timestamps and the corresponding signal. To prevent this, we pad the raw signal before writing it to NIX, ensuring a consistent time base. While we can correct the discontinuities after reading the original Dapsys file, the initial step in our workflow still depends on the unmodified raw recording.

Of the four datasets recorded in Bristol, three were provided in HDF5 (.h5) [54] format, which could be easily converted to the NIX format as NIX is based on HDF5. One raw signal recording was available only in MATLAB format, in contrast to the others. To maintain consistency across data handling, this file was read into a data frame and incorporated into the unified NIX structure. However, due to its format and status as a single outlier in the preprocessing workflow, it was excluded from the figure. Additionally, due to differences in the recording setup at Bristol, the voltage polarity of the signals was inverted compared to the Aachen datasets. To correct this, we negated the raw signal before applying a rolling mean filter, smoothing the data for subsequent analysis. The data was processed in pandas data frames containing the raw data, stimulation times, and spike times.

Our next step involved extracting the spike waveforms from the raw signal. As illustrated in Fig 6C, the red line represents the reference point in time, which is typically located near the center of the waveform. Considering an extracellular C-fiber spike width of approximately 3 ms and a sampling frequency of 10,000 Hz for Dapsys files, it is necessary to encompass 30 datapoints from the raw signal to adequately capture the spike. For instance, a spike occurring at timestamp t would lie within the data slice window [t – 15, t + 15]. For Bristol files with a sampling frequency of 30,000 Hz, we consider 60 datapoints as suitable, thereby expanding the window range to [t – 30, t + 30].

To ensure the correct alignment of all spikes, we computed the first derivative and aligned the spikes by the maximum negative peak of the first derivative following Caro-Martín et al. [11]. The derivatives are also required for the feature set computation. Furthermore, to enhance the precision of the derivative computations, we resampled the spikes originally recorded with Dapsys from 30 to 60 datapoints with SciPy’s [58] resample function.

To gain deeper insights into spike morphology differences obtained via microneurography, as the last step, we computed a “template” by averaging all individual spikes associated with a specific track. This averaging process resulted in a representative waveform that effectively shows the tracks’ distinctiveness or similarity in shape. The templates from two exemplary recordings are shown in Fig 4, while templates from all recordings are provided in the Supporting Information (S5 File). After the pre-processing, we continued with the extraction of feature sets for each spike.

Feature set extraction

In our analysis, we explored various feature extraction techniques aimed at quantifying the characteristics of spike waveforms (Table 5). We compared the disparities between simpler and more sophisticated feature sets. These extracted feature sets served as inputs for classification methods, and we evaluated their effectiveness in characterizing and discriminating spikes from multiple tracks.

Table 5. Different feature sets are extracted through domain-agnostic dimension reduction as well as through spike approaches, using the raw waveform and computed features on the waveforms. The feature sets include methodologies, such as principal component analysis (PCA) and the features from the spike sorting approach based on shape, phase, and distribution features (SS-SPDF) by Caro-Martín et al. [11].

Feature Set Description Number of features
Simple Amplitude and width 2
SPDFFV3 Subset of SS-SPDF features (F14, F18, F19) 3
SPDFraw Raw SS-SPDF features 23
W2-PCA PCA of raw waveform features (2-comp) 2
W3-PCA PCA of raw waveform features (3-comp) 3
Wraw Raw waveform features 30/60

Amplitude and width – “Simple”

We refer to simple features when taking the most fundamental characteristics of a waveform. Here, we examined two specific features: amplitude a and full-width half maximum (FWHM) w. Amplitude is defined as the positive peak voltage value of a spike, while the spike width is defined as the distance between the two nearest points where the signal falls below half of the spike’s amplitude. Consequently, each spike can be described by a two-dimensional feature vector. Formally, the feature vector for a spike S is denoted as:

S=[a, w]

Shape-, phase- and distribution-based features – SPDFFV3 and SPDFraw

In 2018, Caro-Martín et al. developed a comprehensive spike sorting pipeline for extracellular recordings that outperforms contemporary methods used in neurophysiology [11]. They tested their algorithm on two synthetic datasets as well as on real extracellular recordings of neural activity within the rostral-medial prefrontal cortex from rabbits. Within their methods, they extracted 24 distinct features from each spike on shape-, phase-, and distribution-based characteristics. Shape features describe the waveform of the first derivative in the time domain, while phase features relate the amplitudes of the first and the second derivative to points in the phase space. Additionally, distribution features take into account the amplitude distributions of both the first and second derivatives of each spike.

Caro-Martín et al. employed a modified k-means clustering algorithm that finds the optimal number of clusters and clustering results. This algorithm also addresses the issue of overlapping spikes and evolving waveforms over time. They introduced their own validity score and error index to evaluate their method and compare it with alternative spike sorting methods. Furthermore, the authors emphasize the method’s computational efficiency and highlight the enhanced physiological interpretability of their feature-based approach compared to algorithms relying on dimensionality reduction techniques.

In this work, we implemented these features in Python. They represent the more sophisticated approach. In our implementation, we primarily followed the definitions in the paper. However, we had to make certain necessary adjustments.

First, we compute both the first and second derivatives for each spike. Six fundamental points characterize a spike, forming the base for the feature computations. In some of our detected instances, the first fundamental point (the first zero-crossing of the first derivative) was undefined. Consequently, we automatically excluded these spikes from our data. The final numbers are listed in Table 4.

For the final implementation, we had to modify two feature definitions. In the case of Feature 4, it was unclear how the reference waveform was computed. Therefore, we decided to exclude Feature 4 from our final vector.

For Feature 8, the original description referred to it as the “root-mean-square of the amplitudes before the FD event of the action potential” [11]. However, after closer examination of the mathematical formula, it became apparent that the values were not squared, and the authors did not define the variable m. We redefined Feature 8 as f8=i=sP1aFDi2P1s, where s is the beginning of the window.

The final feature vector of spike S is denoted as follows:

S=[f1,f2,f3,f5,,f24]

In addition to the full feature vector, Caro-Martín et al. also evaluated a reduced subset of three features (FV3), specifically F14 (positive peak of the spike’s first derivative), F18 (positive peak of the second derivative), and F19 (negative peak of the second derivative), originally proposed by Paraskevopoulou et al. [29,59]. To explore the impact of lower-dimensional input on classification performance, we included this subset as another feature set in our analysis. The final subset feature vector of spike S is denoted as:

S=[f14,f18,f19]

Raw waveform feature sets – Wraw

The next feature set is the raw signal itself, namely Wraw. We did not process the signal segments further and, instead, directly employed the 30 and 60 voltage values, respectively, as input for each spike waveform compared to [2931]. As a result, for a given spike denoted as S, the feature vector is denoted as follows with s describing the voltage at position x:

SAachen=[w1,w2,, w30]
SBristol=[w1,w2,, w60]

PCA features of raw waveform – W2-PCA and W3-PCA

Due to the discrepancy in the dimensionalities of the initially presented feature set vectors, we employed principal component analysis (PCA) on the raw waveform. We conducted PCA with both two and three components to reduce the feature vector from its original 30, or 60 dimensions, respectively. As a result, we generated two additional feature vectors for each spike (W2-PCA and W3-PCA) all of which serve as input for the spike sorting process. The definitions of these feature vectors for the spike are denoted as follows:

S2 components=[PC1, PC2]
S3 components=[PC1, PC2, PC3]

Classification

As a classification method, we applied support vector machines (SVMs) motivated by their efficiency and low number of hyperparameters [60]. The models aim to identify a line or hyperplane within the feature space to distinguish between different classes. To assess the accuracy and generalizability of our models, we employed 5-fold cross-validation, which repeatedly partitions the data into training and test sets. We adhered to the default parameters as provided in the sci-kit learn implementation [41].

Accuracy

To assess our spike sorting results and compare the performance of various feature sets and methodologies, we used evaluation methods tailored to each approach. Accuracy is a metric for evaluating classification results and describes the fraction of correct predictions [61]. We employed accuracy as it is most meaningful when class sizes are relatively balanced. Higher accuracy indicates a better-performing classification model. It is usually expressed as a percentage and is defined as the ratio of correctly predicted instances to the total instances:

Accuracy= Number of correct predictionsTotal number of predictions (1)

Statistical analysis

To evaluate whether there were statistically significant differences between the accuracies of the feature sets, we employed the Wilcoxon signed-rank test, a non-parametric test used for comparing two matched samples [62]. This test was selected because it does not assume a normal distribution of the data and is appropriate for comparing paired observations, such as accuracy scores obtained from different feature sets on the same datasets. The statistical analysis was performed with SciPy [41] v1.10.1.

The accuracies for each feature set were compared in a pairwise manner with each pair representing the performance of two feature sets on the same recordings. The test was used to determine whether the distribution of the accuracy differences between the feature sets was statistically significant.

Given that multiple pairwise comparisons were performed, the risk of false positive errors increases. To address this, we applied the Bonferroni correction to adjust the alpha level [63]. Specifically, the initial alpha level (α = 0.01 was divided by the number of comparisons to control the error rate (αadj=0.01/n, where n is the number of comparisons). The corrected alpha level was used to determine whether the differences between the feature sets were statistically significant after adjustment for multiple comparisons.

Measurement of template similarity

To assess the similarity between spike templates, we used several distance metrics to quantify the differences between two spike templates. These templates are the average waveform of spikes associated with individual fibers.

The motivation for using these distance metrics came from the need to investigate whether the similarity between spike templates correlates with the classification accuracy of the feature sets derived from these waveforms. Specifically, we hypothesized that feature sets generated from more similar spike templates would yield lower classification accuracies, while feature sets generated from more distinct templates would lead to higher accuracies.

We compared the distance metrics between spike templates with the best classification accuracies to test this hypothesis. By evaluating the relationship between the template similarities, we aimed to determine whether lower similarity between spike templates predicts better classification performance.

We considered several distance metrics in this analysis, including mean squared error (MSE) [64], mean absolute error (MAE) [65], and root mean squared error (RMSE) [66]. Here, n represents the length of each template. T=[t1, , tn]  and T^=[t^1,, t^n] denote the waveform templates being compared.

Mean squared error

The mean squared error (MSE) is used to quantify the average squared difference between two waveform templates. Smaller MSE values indicate higher similarity and larger values denote greater distinguishability between templates. For this analysis, MSE was selected as it effectively highlights differences in waveform shape.

  MSE=1ni=1n(tit^i)2 (2)

Mean absolute error

The mean absolute error (MAE), on the other hand, measures the average absolute difference between templates, offering a straightforward interpretation of the average error without squaring the values.

MAE=i=1n|tit^i|n (3)

Root mean squared error

The root mean squared error (RMSE) provides a distance measure in the same units as the original data, making it easier to interpret in practical terms.

RMSE=i=1n(tit^i)2n (4)

Supporting information

S1 File. SVM classification accuracy scores.

Accuracy values for SVM classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s001.csv (988B, csv)
S2 File. SVM classification macro-averaged F1-scores.

Macro-averaged F1-scores values for SVM classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s002.csv (921B, csv)
S3 File. SVM classification precision scores.

Precision values for SVM classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s003.csv (915B, csv)
S4 File. SVM classification recall scores.

Recall values for SVM classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s004.csv (916B, csv)
S5 File. Spike templates for all datasets.

The spike templates were computed by averaging all tracked spikes after aligning them to the time point of their maximum negative peak. These templates represent characteristic waveforms for each identified track across recordings and give insights into morphological differences.

(PDF)

pone.0329537.s005.pdf (1.3MB, pdf)
S6 File. Cumulative explained variance ratio.

The cumulative explained variance ratio for principal component counts ranging from 2 to 8, visualized separately for datasets A1 (S6.1) and A3 (S6.2). The plots illustrate how the proportion of total variance captured increases with the number of PCA components, providing insight into the dimensionality required to represent the spike waveform effectively.

(PDF)

pone.0329537.s006.pdf (122.4KB, pdf)
S7 File. K-means clustering ARI scores.

Adjusted Rand Index (ARI) values for k-means clustering, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s007.csv (912B, csv)
S8 File. K-means clustering NMI scores.

Normalized Mutual Information Score (NMI) values for k-means clustering, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s008.csv (908B, csv)
S9 File. K-means clustering V-measure scores.

V-measure values for k-means clustering, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s009.csv (908B, csv)
S10 File. Random Forest classification accuracy scores.

Accuracy values for Random Forest classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s010.csv (913B, csv)
S11 File. Random Forest classification macro-averaged F1-scores.

Macro-averaged F1-scores values for Random Forest classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s011.csv (918B, csv)
S12 File. Random Forest classification precision scores.

Precision values for Random Forest classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s012.csv (914B, csv)
S13 File. Random Forest classification recall scores.

Recall values for Random Forest classification, provided as a CSV file with comma-separated values.

(CSV)

pone.0329537.s013.csv (911B, csv)
S14 File. Error values with max accuracy.

Computed error metrics for all datasets, along with the maximum achieved accuracy for SVM classification. These metrics were used to investigate how template similarity affects sorting quality.

(CSV)

pone.0329537.s014.csv (660B, csv)
S15 File. Screenshots of Dapsys and SpikeSpy.

To illustrate the tracking process, this file includes two screenshots, one from Dapsys and one from SpikeSpy. Both software tools implement similar tracking mechanisms to extract vertically aligned spike waveforms during microneurography recordings, providing experimental ground truth for subsequent analysis.

(PDF)

pone.0329537.s015.pdf (1.6MB, pdf)
S16 ZIP Folder. Feature set data for datasets A1, A3, and A6.

This archive includes the raw extracted feature sets for A1, A3, and A6, as well as SPDFFV3 features for A1 and A3. It also contains waveform data used for plotting and template computation in Fig 3, along with the data used for PCA and clustering analyses presented in Fig 5.

(ZIP)

pone.0329537.s016.zip (145KB, zip)

Acknowledgments

We acknowledge Aidan Nickerson and Danxia Bao for their technical support. We would also like to acknowledge the three Reviewers for providing feedback on many aspects of our work. Thanks to this feedback, we were able to improve the quality and reproducibility of our code, as well as improve the methodology of our spike alignment.

Data Availability

The data sharing is restricted by the terms of the participant consent, which explicitly limits usage to to the scope of this research project. Therefore, these recordings are available only upon reasonable request from the corresponding author. All data used for plotting and statistical analyses are included within the Supporting information files. The computational pipeline code, visualization scripts, and a test data recording are available on GitHub https://github.com/Digital-C-Fiber/SpikeSortingPipeline. We have also used Zenodo to assign a DOI to the repository: 10.5281/zenodo.14552210.

Funding Statement

This project was supported by a grant from the Interdisciplinary Center for Clinical Research within the faculty of Medicine at the RWTH Aachen University (NA2018-2024). BN is supported by the DFG (NA 970 6-2; NA 970 7-1; NA 970 9-2). The other authors received no specific funding for this work.

References

  • 1.Ackerley R, Watkins RH. Microneurography as a tool to study the function of individual C-fiber afferents in humans: responses from nociceptors, thermoreceptors, and mechanoreceptors. J Neurophysiol. 2018;120(6):2834–46. doi: 10.1152/jn.00109.2018 [DOI] [PubMed] [Google Scholar]
  • 2.Wei Y, Marshall AG, McGlone FP, Makdani A, Zhu Y, Yan L, et al. Human tactile sensing and sensorimotor mechanism: from afferent tactile signals to efferent motor control. Nat Commun. 2024;15(1):6857. doi: 10.1038/s41467-024-50616-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Namer B, Lampert A. Functional signatures of human somatosensory C fibers by microneurography. Pain. 2025. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Yger P, Spampinato GL, Esposito E, Lefebvre B, Deny S, Gardella C. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. eLife. 7:e34518. doi: 10.7554/eLife.34518 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Horváth C, Tóth LF, Ulbert I, Fiáth R. Dataset of cortical activity recorded with high spatial resolution from anesthetized rats. Sci Data. 2021;8(1):180. doi: 10.1038/s41597-021-00970-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Turnquist B, RichardWebster B, Namer B. Automated detection of latency tracks in microneurography recordings using track correlation. J Neurosci Methods. 2016;262. [DOI] [PubMed] [Google Scholar]
  • 7.Gibson S, Judy JW, Markovic D. Spike sorting: the first step in decoding the brain: the first step in decoding the brain. IEEE Signal Process Mag. 2012;29(1):124–43. doi: 10.1109/msp.2011.941880 [DOI] [Google Scholar]
  • 8.Adamos DA, Kosmidis EK, Theophilidis G. Performance evaluation of PCA-based spike sorting algorithms. Comput Methods Programs Biomed. 2008;91(3):232–44. doi: 10.1016/j.cmpb.2008.04.011 [DOI] [PubMed] [Google Scholar]
  • 9.Aksenova TI, Chibirova OK, Dryga OA, Tetko IV, Benabid A-L, Villa AEP. An unsupervised automatic method for sorting neuronal spike waveforms in awake and freely moving animals. Methods. 2003;30(2):178–87. doi: 10.1016/s1046-2023(03)00079-3 [DOI] [PubMed] [Google Scholar]
  • 10.Chibirova OK, Aksenova TI, Benabid A-L, Chabardes S, Larouche S, Rouat J, et al. Unsupervised Spike Sorting of extracellular electrophysiological recording in subthalamic nucleus of Parkinsonian patients. Biosystems. 2005;79(1–3):159–71. doi: 10.1016/j.biosystems.2004.09.028 [DOI] [PubMed] [Google Scholar]
  • 11.Caro-Martín CR, Delgado-García JM, Gruart A, Sánchez-Campusano R. Spike sorting based on shape, phase, and distribution features, and K-TOPS clustering with validity and error indices. Sci Rep. 2018;8(1):17796. doi: 10.1038/s41598-018-35491-4 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Takekawa T, Isomura Y, Fukai T. Accurate spike sorting for multi-unit recordings. Eur J Neurosci. 2010;31(2):263–72. doi: 10.1111/j.1460-9568.2009.07068.x [DOI] [PubMed] [Google Scholar]
  • 13.Takekawa T, Isomura Y, Fukai T. Spike sorting of heterogeneous neuron types by multimodality-weighted PCA and explicit robust variational Bayes. Front Neuroinform. 2012;6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Fournier J, Mueller CM, Shein-Idelson M, Hemberger M, Laurent G. Consensus-Based Sorting of Neuronal Spike Waveforms. PLoS One. 2016;11(8):e0160494. doi: 10.1371/journal.pone.0160494 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Jacob Vogelstein R, Murari K, Thakur PH, Diehl C, Chakrabartty S, Cauwenberghs G. Spike sorting with support vector machines. Conf Proc IEEE Eng Med Biol Soc. 2004;2006:546–9. doi: 10.1109/IEMBS.2004.1403215 [DOI] [PubMed] [Google Scholar]
  • 16.Werner T, Vianello E, Bichler O, Garbin D, Cattaert D, Yvert B. Spiking neural networks based on OxRAM synapses for real-time unsupervised spike sorting. Front Neurosci. 2016;10. doi: 10.3389/fnins.2016.00400 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Hermle T, Bogdan M, Schwarz C, Rosenstiel W. ANN-based system for sorting spike waveforms employing refractory periods. In: Duch W, Kacprzyk J, Oja E, Zadrożny S, eds. Artificial neural networks: biological inspirations – ICANN 2005. Berlin, Heidelberg: Springer; 2005. [Google Scholar]
  • 18.Buccino AP, Hurwitz CL, Garcia S, Magland J, Siegle JH, Hurwitz R, et al. SpikeInterface, a unified framework for spike sorting. Elife. 2020;9:e61834. doi: 10.7554/eLife.61834 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Harris KD, Quiroga RQ, Freeman J, Smith SL. Improving data quality in neuronal population recordings. Nat Neurosci. 2016;19(9):1165–74. doi: 10.1038/nn.4365 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Krahe R, Gabbiani F. Burst firing in sensory systems. Nat Rev Neurosci. 2004;5(1):13–23. doi: 10.1038/nrn1296 [DOI] [PubMed] [Google Scholar]
  • 21.Torebjörk E. Nociceptor activation and pain. Philos Trans R Soc Lond B Biol Sci. 1985;308(1136):227–34. [DOI] [PubMed] [Google Scholar]
  • 22.Torebjörk HE, Hallin RG. Responses in human A and C fibres to repeated electrical intradermal stimulation. J Neurol Neurosurg Psychiatry. 1974;37(6):653–64. doi: 10.1136/jnnp.37.6.653 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Vallbo AB, Hagbarth KE. Activity from skin mechanoreceptors recorded percutaneously in awake human subjects. Exp Neurol. 1968;21(3):270–89. doi: 10.1016/0014-4886(68)90041-1 [DOI] [PubMed] [Google Scholar]
  • 24.Kutafina E, Becker S, Namer B. Measuring pain and nociception: through the glasses of a computational scientist. Transdisciplinary overview of methods. Front Network Physiol. 2023; 3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Kleggetveit IP, Namer B, Schmidt R, Helås T, Rückel M, Ørstavik K, et al. High spontaneous activity of C-nociceptors in painful polyneuropathy. Pain. 2012;153(10):2040–7. doi: 10.1016/j.pain.2012.05.017 [DOI] [PubMed] [Google Scholar]
  • 26.Forster C, Handwerker HO. Automatic classification and analysis of microneurographic spike data using a PC/AT. J Neurosci Methods. 1990;31(2):109–18. doi: 10.1016/0165-0270(90)90155-9 [DOI] [PubMed] [Google Scholar]
  • 27.Schmelz M, Forster C, Schmidt R, Ringkamp M, Handwerker HO, Torebjörk HE. Delayed responses to electrical stimuli reflect C-fiber responsiveness in human microneurography. Exp Brain Res. 1995;104(2):331–6. doi: 10.1007/BF00242018 [DOI] [PubMed] [Google Scholar]
  • 28.Serra J, Campero M, Ochoa J, Bostock H. Activity-dependent slowing of conduction differentiates functional subtypes of C fibres innervating human skin. J Physiol. 1999;515(Pt 3):799–811. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Paraskevopoulou SE, Barsakcioglu DY, Saberi MR, Eftekhar A, Constandinou TG. Feature extraction using first and second derivative extrema (FSDE) for real-time and hardware-efficient spike sorting. J Neurosci Methods. 2013;215(1):29–37. doi: 10.1016/j.jneumeth.2013.01.012 [DOI] [PubMed] [Google Scholar]
  • 30.Mitra A, Pathak A, Majumdar K. Comparison of feature extraction and dimensionality reduction methods for single channel extracellular spike sorting. arXiv. 2016. [Google Scholar]
  • 31.Zamani M, Demosthenous A. Feature extraction using extrema sampling of discrete derivatives for spike sorting in implantable upper-limb neural prostheses. IEEE Trans Neural Syst Rehabil Eng. 2014;22(4):716–26. doi: 10.1109/TNSRE.2014.2309678 [DOI] [PubMed] [Google Scholar]
  • 32.Troglio A, Nickerson A, Schlebusch F, Röhrig R, Dunham J, Namer B. odML-Tables as a metadata standard in microneurography. Stud Health Technol Inform. 2023;307:3–11. [DOI] [PubMed] [Google Scholar]
  • 33.Grewe J, Wachtler T, Benda J. A bottom-up approach to data annotation in neurophysiology. Front Neuroinform. 2011;5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Sprenger J, Zehl L, Pick J, Sonntag M, Grewe J, Wachtler T, et al. odMLtables: a user-friendly approach for managing metadata of neurophysiological experiments. Front Neuroinform. 2019;13. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Konradi P, Troglio A, Pérez Garriga A, Pérez Martín A, Röhrig R, Namer B. PyDapsys: an open-source library for accessing electrophysiology data recorded with DAPSYS. Front Neuroinform. 2023;17. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Schlebusch F, Kehrein F, Röhrig R, Namer B, Kutafina E. openMNGlab: data analysis framework for microneurography - A technical report. Stud Health Technol Inform. 2021;283:165–71. [DOI] [PubMed] [Google Scholar]
  • 37.Troglio A, Kutafina E, Namer B. SpikeSortingPipeline. https://github.com/Digital-C-Fiber/SpikeSortingPipeline
  • 38.Mölder F, Jablonski KP, Letcher B, Hall MB, Tomkins-Tinch CH, Sochat V, et al. Sustainable data analysis with Snakemake. F1000Res. 2021;10:33. doi: 10.12688/f1000research.29032.2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Adrian S, Kellner C, Jan B, Thomas W, Grewe J. File format and library for neuroscience data and metadata. Front Neuroinform. 2014;8. [Google Scholar]
  • 40.Rey HG, Pedreira C, Quian Quiroga R. Past, present and future of spike sorting techniques. Brain Res Bull. 2015;119:106–17. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O. Scikit-learn: machine learning in Python. 2018. https://arxiv.org/abs/1201.0490 [Google Scholar]
  • 42.Chung JE, Magland JF, Barnett AH, Tolosa VM, Tooker AC, Lee KY, et al. A fully automated approach to spike sorting. Neuron. 2017;95(6):1381-1394.e6. doi: 10.1016/j.neuron.2017.07.025 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Villa S, Aasvang EK, Attal N, Baron R, Bourinet E, Calvo M, et al. Harmonizing neuropathic pain research: outcomes of the London consensus meeting on peripheral tissue studies. Pain. 2025;166(5):994–1001. doi: 10.1097/j.pain.0000000000003445 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Dara S, Tumma P. Feature extraction by using deep learning: a survey. In: 2018 Second International Conference on Electronics, Communication and Aerospace Technology (ICECA). 2018: 1795–801. [Google Scholar]
  • 45.Zhang Y, Yang Q. An overview of multi-task learning. National Sci Rev. 2018;5(1):30–43. [Google Scholar]
  • 46.Kovács P, Bognár G, Huber C, Huemer M. VPNet: variable projection networks. Int J Neur Syst. 2022;32(01):2150054. [DOI] [PubMed] [Google Scholar]
  • 47.Troglio A, Fiebig A, Kovács P, Kutafina E, Namer B. Advanced spike sorting on microneurography data: proof-of-concept of VPNet as a universal approach. German Med Sci GMS Publishing House. 2024: 575. [Google Scholar]
  • 48.Weidner C, Schmelz M, Schmidt R, Hansson B, Handwerker HO, Torebjörk HE. Functional attributes discriminating mechano-insensitive and mechano-responsive C nociceptors in human skin. J Neurosci. 1999;19(22):10184–90. doi: 10.1523/JNEUROSCI.19-22-10184.1999 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Pedreira C, Martinez J, Ison MJ, Quian Quiroga R. How many neurons can we see with current spike sorting algorithms? J Neurosci Methods. 2012;211(1):58–65. doi: 10.1016/j.jneumeth.2012.07.010 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Turnquist B. DAPSYS (Data Acquisition Processor System). http://dapsys.net/
  • 51.Siegle JH, López AC, Patel YA, Abramov K, Ohayon S, Voigts J. Open Ephys: an open-source, plugin-based platform for multichannel electrophysiology. J Neural Eng. 2017;14(4):045003. doi: 10.1088/1741-2552/aa5eea [DOI] [PubMed] [Google Scholar]
  • 52.Nickerson AP, Newton GWT, O’Sullivan JH, Martinez-Perez M, Sales AC, Williams G. Open-source real-time closed-loop electrical threshold tracking for translational pain research. J Vis Exp. 2023;2023(194). [DOI] [PubMed] [Google Scholar]
  • 53.Dunham J, Nickerson A. SpikeSpy. https://github.com/Microneurography/SpikeSpy
  • 54.Fortner B. HDF: The hierarchical data format. J Software Tools Prof Program. 1998. [Google Scholar]
  • 55.Fiebig A, Leibl V, Oostendorf D, Lukaschek S, Frömbgen J, Masoudi M, et al. Peripheral signaling pathways contributing to non-histaminergic itch in humans. J Transl Med. 2023;21(1):908. doi: 10.1186/s12967-023-04698-z [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Kutafina E, Troglio A, de Col R, Röhrig R, Rossmanith P, Namer B. Decoding neuropathic pain: can we predict fluctuations of propagation speed in stimulated peripheral nerve? Front Comput Neurosci. 2022;16. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Garcia S, Guarino D, Jaillet F, Jennings T, Pröpper R, Rautenberg PL, et al. Neo: an object model for handling electrophysiology data in multiple formats. Front Neuroinform. 2014;8:10. doi: 10.3389/fninf.2014.00010 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58.Virtanen P, Gommers R, Oliphant TE, Haberland M, Reddy T, Cournapeau D, et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods. 2020;17(3):261–72. doi: 10.1038/s41592-019-0686-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Paraskevopoulou SE, Wu D, Eftekhar A, Constandinou TG. Hierarchical Adaptive Means (HAM) clustering for hardware-efficient, unsupervised and real-time spike sorting. J Neurosci Methods. 2014;235:145–56. [DOI] [PubMed] [Google Scholar]
  • 60.Cortes C, Vapnik V. Support-vector networks. Mach Learn. 1995;20(3):273–97. [Google Scholar]
  • 61.Opitz J. A closer look at classification evaluation metrics and a critical reflection of common evaluation practice. Trans Assoc Comput Linguist. 2024;12:820–36. [Google Scholar]
  • 62.Wilcoxon F. Individual comparisons by ranking methods. Biometrics Bull. 1945;1(6):80. doi: 10.2307/3001968 [DOI] [Google Scholar]
  • 63.Weisstein EW. Bonferroni correction. https://mathworld.wolfram.com/BonferroniCorrection.html
  • 64.Bickel PJ, Doksum KA. Mathematical statistics: basic ideas and selected topics, volumes i-ii package. New York: Chapman and Hall/CRC; 2015. [Google Scholar]
  • 65.Willmott C, Matsuura K. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim Res. 2005;30:79–82. doi: 10.3354/cr030079 [DOI] [Google Scholar]
  • 66.Hyndman RJ, Koehler AB. Another look at measures of forecast accuracy. Int J Forecast. 2006;22(4):679–88. doi: 10.1016/j.ijforecast.2006.03.001 [DOI] [Google Scholar]
PLoS One. 2025 Sep 26;20(9):e0329537. doi: 10.1371/journal.pone.0329537.r001

Author response to Decision Letter 0


Transfer Alert

This paper was transferred from another journal. As a result, its full editorial history (including decision letters, peer reviews and author responses) may not be present.

17 Feb 2025

Decision Letter 0

Nicholas Swindale

3 Apr 2025

PONE-D-25-04960Supervised Spike Sorting Feasibility of Noisy Single-Electrode Extracellular Recordings: Systematic Study of Human C-Nociceptors recorded via MicroneurographyPLOS ONE

Dear Dr. Troglio,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised by the reviewers.

 Please submit your revised manuscript by May 18 2025 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at plosone@plos.org . When you're ready to submit your revision, log on to https://www.editorialmanager.com/pone/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

  • A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

  • A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

  • An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: https://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols . Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols .

We look forward to receiving your revised manuscript.

Kind regards,

Nicholas V Swindale

Academic Editor

PLOS ONE

Journal Requirements:

1. When submitting your revision, we need you to address these additional requirements.

Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at

https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

2.Thank you for stating the following in the Competing Interests section: [BN received consulting fees from Vertex. The other authors declare no competing interests.]

Please confirm that this does not alter your adherence to all PLOS ONE policies on sharing data and materials, by including the following statement: ""This does not alter our adherence to  PLOS ONE policies on sharing data and materials.” (as detailed online in our guide for authors http://journals.plos.org/plosone/s/competing-interests).  If there are restrictions on sharing of data and/or materials, please state these. Please note that we cannot proceed with consideration of your article until this information has been declared.

Please include your updated Competing Interests statement in your cover letter; we will change the online submission form on your behalf.

3. We noted in your submission details that a portion of your manuscript may have been presented or published elsewhere. [Figure 6B has been adapted from our previously published manuscript under a Creative Commons license. The original work has been properly cited and referenced in the manuscript, ensuring compliance with publication guidelines.] Please clarify whether this [conference proceeding or publication] was peer-reviewed and formally published. If this work was previously peer-reviewed and published, in the cover letter please provide the reason that this work does not constitute dual publication and should be included in the current manuscript.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Partly

Reviewer #3: Partly

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: No

Reviewer #2: Yes

Reviewer #3: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: The manuscript presents a supervised pipeline for spike sorting targeting recordings with microneurography that employ a marking method.

In order to overcome the challenges related to extracellular recordings from microneurography, such as very low SNR and spatial resolution (single electrode), the authors suggest a supervised approach that uses the spikes from pre-identified units with the marking method as ground truth to build an SVM classifier that can be applied to spontaneous spikes. Several feature extraction methods are compared, showing a general better performance using the entire waveform data. However, given the substantial inter-subject/experiment variability, the authors also suggest that the proposed method could be used to assess the overall "sortability" and to find the best set of features of a specific recording.

I found the manuscript well structured and well written and I have some a few points and suggestions.

1. When discussing the limitations of the PCA methods in Figure 5, the authors claim that dataset A1 would not yield good results with an unsupervised approach because the clusters overlap. I think that this would be strobgly dependent on i) the number of PC used, and ii) the explained variance of the chosen number of PC. Could the authors show how the clusters look using 3 PCs? What about more PCs? Would a clustering method correctly find the two units if, for example, 5 dimensions were used?

In the same figure, I found panels C-D quite puzzling. The blue and green sub-clusters that the authors state are from the same unit will likely have very different waveforms/templates? How do the authors explain this? Is this something commonly observed in spikes from C-Nociceptors? Could it be that two different fibers are elicited from the same stimulus and have the same latency?

2. In cases where the waveforms/templates are very similar (e.g., Figure 3B-D), is it possible that an individual stimulus results in a fiber firing twice, in sequence? With the marking methods, these two spikes would be classified as separate units, and as the authors suggest, it would be virtually impossible to spike sort them accurately. On the other hand, isn't it unlikely, given the geometry of the fibers and the relative position to the electrode, that the spikes come indeed from the same fiber?

3. Figure 4A. the authors restrict this similarity analysis to datasets with 2 tracks. I think that the number of data points could be extended also to multi-track dataset by considering, for each unit, a second unit with the lowest similaroty (worst case scenario).

4. Since the authors suggest that the method could be applied to spontaneous spikes as well, it would be nice to see that in action. How many spontaneous spikes could be classified on the used datasets?

Minor points:

1. L142: SS-SPDF: first time this acronym is used. May be worth spelling it out

2. L352: why do the authors state that the study is about "spike morphology"? I would classify it as spike sorting analysis only

3. L376-378: what other applications could it be transfered to?

4. Table2: I would rename the Track*, R/S/T, Unit* consistently. The different naming makes it more confusing. You could just use Track1/2/3 or Unit1/2/3

5. L481: Panda's -> pandas

6. Table 3: since most of steps are the same, a diagram/flowchart would be easier to understand. The differences are minor and could be explained in the text/captipn

7. L518-519: this width is usually referred to as FWHM (full-width half maximum)

8. L558: What is W2? I guess that Wraw is the entire waveform (30-90 points), but W2 is not specified

9. L569: where does the 23 come from? Aren't the new features 2 (S2/S3) instead of 4?

Reviewer #2: In this manuscript, the authors describe and evaluate the feasibility of a novel approach to sort spikes in electrophysiological recordings from nociceptive C-fibers in the peripheral nervous system, obtained using microneurography. The approach involves using SVM for the supervised classification of previously labeled spike data, opposed to existing unsupervised methods. The labelling of spikes is performed by employing the marking method, which leverages the difference in conduction velocities between fibers recorded simultaneously by an electrode and the activity-dependent slowing phenomenon in C-fibers. In the marking method, action potentials belonging to a single C-fiber are time-locked to a background low-frequency stimulus. By visualizing the recordings after several stimulation pulses in parallel, spikes originating from the same fiber will apear aligned in time (named a “track”), allowing to assign each spike to an individual fiber, and to extract the spike waveforms from the raw data. From the spike waveform data, the authors extract distinct feature sets (simple features, SS-SPDF features, and raw waveform features), which are the inputs to the SVM classifier. The SVM training/testing is performed for each recorded dataset (26 in total, from two different labs) using 5-fold cross validation, allowing to evaluate the sorting peformance of each feature set on a per-dataset basis, which could be used to guide the selection of the best features for sorting in a given dataset. In the end, the authors analyze and discuss the classification performance of each feature set according to general data features, such as number of individual fibers recorded and similarity of spike waveforms across the fibers in a single recording. They also highglight how the supervised method can be more efficient to sort spikes from different fibers compared to methods based on PCA followed by unsupervised clustering.

The manuscript is relevant for research involving microneurography and may advance the analysis of data from recordings of C-fibers. Moreover, the authors aimed to make the software code to apply the proposed method available, and describe efforts to make the analysis pipeline usable with different proprietary input file formats (leveraging open standards for data and metadata such as odML and NIX). However, there are points that need improvement and clarification in the manuscript.

1. The whole analysis rely on labeled data for ground truth using the marking method, but the manuscript does not detail how the spike tracks were actually obtained. Although the authors took their time to explain the rationale of the method, with helpful illustrative figures, the section in the methods (lines 448-472) does not detail how the actual procedure is executed with the raw data obtained in a recording from Aachen or Bristol. In the main text, the authors just describe this as a pre-analysis (line 165). In addition, there is no code in the GitHub repository for obtaining that track information (assumed to be stored in a NIX file after initial curation; Table 3). Therefore, the manuscript must present a more detailed description on how the marking method is performed as one part of the whole pipeline to obtain the starting spike data for the classification (e.g., software tools, manual curation steps, detailed signal preprocessing steps and parameters). The code should also be shared or properly referred (if in another repository) to allow full reproducibility of the proposed pipeline.

2. Considering the SVM approach, it is also not clear how much labeling as pre-analysis (line 165) is needed assuming a new analysis is performed. In the results presented, each CV-fold uses 80% of the labeled data for training, and the remaining 20% for testing. In a practical scenario, this would imply that, for an analysis starting from scratch, one would need to label 80% of the spikes (by using the marking method) before trying to classify the others. As the exact procedures are not described, it is very difficult to understand how laborious this pre-analysis is. The authors could also explore how the SVM classifier performance varies using different train/test split ratios. Finally, what is considered “sufficient amount of labeled data per recording” (line 312)?

3. Although this work is also introducing an open-access pipeline to preprocess and standardize the data and metadata for the sorting method, the actual code in the https://github.com/Digital-C-Fiber/SpikeSortingPipeline repository consists only of Jupyter notebooks that apparently do not contain all the steps described in the Methods (Table 3). There is only a notebook for one of the proprietary formats (Dapsys), and apparently there is no code for the generation of the NIX files.

4. The use of the provided code is not straightforward. The README file describes only how to create the Python environment, and not how to setup the analysis using an input file in Dapsys or OpenEphys formats. Although the notebook provided for Dapsys provides extensive text descriptions throughout the steps, the cells are composed of many function declarations embedded within the calls to the actual pipeline steps. It is not clear how to adjust or set parameters. Therefore, the code could be reorganized using more robust approaches for such analysis pipelines (see, for example, Cobrawap: https://cobrawap.readthedocs.io).

5. Why is the Dapsys file still needed to run the pipeline after creating the NIX file (Table 3)? The NIX format allows storing continuous time series and would be more convenient to have a common structure that would serve analyzing data from both recording formats (see, again, the approach in Cobrawap). In Table 3, from line 4 the steps are overlapping, with only a few changes of parameters depending on the sampling frequency of the data. Those could be easily selectable as pipeline parameters passed to the code.

6. Although authors mention in their data availability statement that the patient data in the proprietary formats cannot be shared because they might contain sensitive information, the manuscript suggests that those primary data are converted to the NIX format at the beginning (Table 3). One could design the conversion step to remove any sensitive information. Would it be possible to share the source data as anonymized NIX files? If not, this aspect and reasons should also be clarified in the availability statement. The shared data in the supplement contains only the performance metrics of the trained classifiers, which allows reproducing the presented figures, but not the actual analyses.

7. There are contradictions in the presented results. In Figure 4A, the authors state that only datasets with 2 detected tracks are shown. The figure shows only 10 datasets from Aachen, but the data description in Table 2 shows that dataset B1 from Bristol also has 2 tracks only. In addition, Table 2 presents only the total number of spikes in a dataset, while examining the tables in the supplementary files, it is clear that many were excluded for the actual analysis. Table 2 should also state the final number of spikes (total and per track), and the Methods must describe the preprocessing steps and reasoning to exclude spikes before the analysis.

8. Authors explored distinct feature sets (from simple features such as amplitude and width to the complex parameters of the SS-SPDF method), and the classification using the raw waveform features provided the best classification in the majority of the datasets (as assessed in the statistical evaluation in Table 1). In some datasets, the performance of other feature sets could be marginally better (Figure 2). With that, the selection of the feature set for a given dataset could be tailored to provide the best sorting performance. Moreover, in their discussion, the authors suggest that the accuracy could be used to assess the “sortability” of a dataset (lines 302-306), and that the approach could “significantly enhance the realiability in sorting spikes that are not time-locked to their response latency” (lines 319-321). It is difficult to assess those practical implications beyond this validation study. Moreover, in those speculative statements on how to use the approach to improve sorting, the authors mainly state that the supervised method was better than PCA + unsupervised clustering. Assuming that performing the SVM classification and obtaining a dataset-specific accuracy score requires pre-sorting all the spikes in all tracks, why would sorting with the SVM still be needed? If the results are supposed to illustrate that, once trained, the classifier can correctly identify the spikes from different fibers in non-tracked spikes, the result showing that the “sortability” performance decreases as the similarity of the templates increases (Figure 4A) would also not solve the primary problem of sorting spikes outside the tracks (lines 136-139). First, non-tracked spikes might still be difficult to discern if the waveform shapes are too similar. Second, the spike waveforms can often overlap in spontaneous firing (e.g., line 11 in Figure 6B), and the classifier would still fail. Therefore, it is important that the authors detail their reasoning when discussing the implication of their results outside the scope of the study.

9. One of the main arguments in the manuscript is how the supervised method is more adequate to identify the spikes from each track compared to dimensionality reduction with PCA followed by clustering (Figure 5). However, this “traditional” approach was largely improved over the years, and this may not be a fair comparison. An algorithm that also involves template matching would be closer to the proposed approach and might perform as well in cases where the spike waveforms are different, and could perform well in case of spontaneous activity with overlapping spikes (e.g., line 11 in Figure 6B). Therefore, the strength of the findings would be increased if authors applied some state-of-the art sorters that aimed to improve clustering and the precision of the detection in unsupervised settings (e.g., Kilosort 3 and 4, SpyKING Circus, MountainSort). As data is structured in the NIX format, it would be straightforward to use SpikeInterface to apply those sorters in parallel. As the ground truth data is available from the marking method, this would also be descriptive of any limitation of existing sorters in microneurography data.

10. Have the authors consider investigating spike sorters that leverage the temporal alignment of spikes in multichannel recordings? The “waterfall approach” resembles recordings with n-trodes or high-density probes, where multiple electrodes capture spikes originating from a single source. The sorter algorithm takes the electrode distribution and the temporal alignment of spikes into consideration. Therefore, one could speculate that epochs 1-5 in Figure 6 could be structured as if they were obtained by a 5-trode probe and such sorting might be as good as peforming the supervised classification, assuming waveforms are different. This would identify the different templates shown in either green or red in the traces in Figure 6B. Once those templates are known, the templates could be used to match any other spike in the recording using template matching.

11. The goal of spike sorting is to obtain the assignment of each spike that appears in the raw signal to the relevant unknown unit (or fiber, represented by a track in this study). However, with this perspective, it is unclear how the proposed method can be effectively used for spike sorting in a new dataset and how much of improvement it brings to the field. Overall, the manuscript can be confusing regarding the specific goals of the study regarding spike sorting. For example, in the introduction, the authors mention that a primary challenge is to sort the untracked spikes (lines 136-139), and also highlight this when describing the marking method (lines 468-472). However, there is no demonstration on how the method solves this problem. One would expect that the supervised classification method would then help identifying spikes arising from spontaneous activity (e.g., the yellow waveform in Figure 6B, line 11). But all the analyses presented involve tracked spikes only. From the title and abstract, and considering the results, it seems that the main intention of this study is to evaluate and validate the classification of spike data assuming that they can be “tracked” (i.e., a very specific subset of data in a microneurography recording executed together with a specific stimulation protocol). In this case, the text should be revised so that it is more assertive towards that goal, and the implications/challenges that are known but still not addressed are described and discussed in detail only in the Discussion section. And in the discussion, the authors need to be less shallow, and effectively provide insights on how their classifier would be helpful to improve spike sorting in microneurography.

Reviewer #3: COMMENTS TO THE AUTHORS:

Comments to the authors of the manuscript entitled "Supervised Spike Sorting Feasibility of Noisy Single-Electrode Extracellular Recordings: Systematic Study of Human C-Nociceptors recorded via Microneurography" by Alina Troglio, Peter Konradi, Andrea Fiebig, Ariadna Pérez Garriga, Rainer Röhrig, James Dunham, Ekaterina Kutafina, Barbara Namer, to be considered for publication in PLoS ONE (ref. PONE-D-25-04960).

GENERAL COMMENTS:

This study is of relevance for the neuroscience community, especially for researchers interested in improving the spike sorting performance for raw microneurography data (i.e., human multi-unit electrophysiological extracellular nerve recordings). In my opinion, the proposed approach could be interesting for many clinical neurophysiologists for its practical uses for studying peripherical sensory systems beyond the mere spike classification approaches offered by other sophisticated and often opaque spike-sorting methods/algorithms.

According to what the authors stated, the main contribution of this study is the adaptation of lightweight feature extraction methods to individual C-nociceptor microneurography recordings and assessing the classification feasibility based on achieved accuracy and the research question before proceeding with sorting of non-time-locked spikes. The proposed approach is interesting, the manuscript is well written and appropriately illustrated and the authors conducted an acceptable literature review. However, despite what has been highlighted above, I have major concerns with the manuscript in its current version and there are some key aspects that need to be clarified by the authors. Therefore, this paper would deserve publication in PLoS ONE journal once the following points are addressed.

MAJOR POINTS:

P1. First of all, I’m not quite sure how the microneurography recordings are pre-processed and the spikes are aligned. In the sections “Pre-processing for feature extraction”, authors should clarify all the details because the precision in all steps of the spike-sorting procedure critically affects the accuracy of all subsequent analyses.

REGARDING THE ALIGNMENT OF THE SPIKES: when the authors are saying (lines 490-494) “As each spike is identified by a timestamp, we extracted the corresponding index, which we consider to be the center of the spike in the raw signal. This index was then used to determine the voltage values of the spike with the 3 ms window. To ensure the correct alignment of all spikes, we established that this center point index is two positions before the voltage maximum of the spike, which should occur in the rising phase of the spike”; what does this means? Note that, in the SS-SPDF method proposed by Caro-Martín et al. (2018) all extracted spike events (spike first-derivative) were aligned (see Fig. 2d, Left) based on their negative peak positions —a step that improves the classification process. In this way, the phase-space portraits of all the aligned spikes were reconstructed and then twenty-four physiological features (Tables 2 and 3 in Caro-Martín et al., 2018) were extracted from each spike for further spike-sorting processing. If the authors of this manuscript have not correctly aligned the spikes in the first-derivative space with respect to the maximum negative peak, then they have failed in the extraction of all features from SPDF method and, therefore, they have not been successful in all subsequent steps of the spike-sorting analysis.

REGARDING THE FEATURE EXTRACTION: I have serious doubts about the proper extraction of the raw SS-SPDF features. Note that, from a mathematical point of view, the SPDF features proposed by Caro-Martín et al. (2018), or any optimal subset of them, are principal components in an orthogonal space of representation. The independent features (F1–F24) proposed in that article ensure that the feature vector in a 24D-space (R24) does not hold redundant information and thereby remove the need to further reduce the dimensionality following the standard way of the principal component analyses. All the above makes senseless the dimensionality reduction proposed by the authors in this manuscript for the SPDF set of features (what they call SPDF2 and SPDF3). The authors can force a dimensionality reduction but that is redundant and worthless from a physiological point of view. Another crucial aspect that indicates a significant failure in the execution of the feature extraction procedure is the selection of the feature set Wraw (raw waveform features with 30/90 voltage values). The authors say (lines 559-564) “The next feature set is the raw signal itself. We did not process the signal segments further and, instead, directly employ the 30 and 90 voltage values, respectively, as input for each spike waveform. As a result, for a given spike denoted as S, the feature vector is denoted as follows with s describing the voltage at position x”. This proposal is not at all original and directly violates the biophysical and physiological foundations of the generation of action potentials with waveforms discretized in time, whether neuronal or nerve fibers. The key question here is why don't the rest of the authors who systematically work on spike-sorting method/algorithm do this same thing for conforming the spike feature vector? Selecting a feature vector made up of only the sample values of the spike amplitude is substantially incorrect for several reasons: (1) Wraw feature matrix presupposes that all spikes have plausibility in their absolute refractory periods, i.e., the interval between the beginning of the depolarization phase and the end of the hyperpolarization phase. (2) Wraw feature matrix completely ignores the temporal relationships that characterize neural events (with phases of depolarization, repolarization and hyperpolarization that determine a quasi-closed trajectory in the phase-space of a spike) and that differentiate them from other parasitic (non-physiological) waveforms that also make up the recorded spike. (3) Wraw feature matrix assigns the same weight (always equal to 1) to all its features (whether 30 or 90 valtage values) a deficiency that does not allow to evaluate the trade-off between the optimal number of features and the optimal number of electrodes in an array. (4) Finally, it should be added that the alignment of the spikes with respect to the negative peak of the first derivative of the spike also guarantees alignment with respect to the zero-crossing of the second derivative of the spike, a procedure followed in the SS-SPDF method that substantially improves spike clustering and classification, but that was not applied properly in this manuscript.

P2. The spike sorting workflow described here (block diagram in Fig. 1) will suffer from the same limitations as all workflows based on clustering/matching templates techniques in the time domain of the neuronal spikes: the overlapping spikes, in spikes, will be discarded. Because mixtures of overlapping waveforms will be an outlier in the clustering space, they will be discarded, and this is problematic. This is why recent spike sorting algorithms [Caro-Martín et al., 2018] are going into the template-matching directions but in the phase space of the neuronal spikes (see also these key articles [Aksenova et al., 2003; Chivirova et al. 2005] for review). Most of the template-matching based algorithms [Bankman et al. (1993); Lefebvre et al. (2016); Yger et al. (2016); Pachitariu et al. (2016)] construct the templates, compare segments of the signal with all available templates in time domain and then selecting the best matching template. The main drawback of these template matching algorithms on the spike time-domain is that spike waveforms could be slightly distorted not only in amplitude, but also along the time axis. Consequently, classes of spikes may not form clusters in the feature space related to time domain and the distributions inside the classes may not be Gaussian. Supervision by a human expert is required for a correct classification. I would really encourage the authors to include in the Introduction and Discussion sections, analytical and interpretative comments on these three studies [Aksenova et al. (2003); Chivirova et al. (2005); Caro-Martín et al. (2018)] that used Template Matching algorithm, K-means clustering and/or appropriate combinations of them (K-TOPS clustering algorithm) for spike sorting in phase space, for sorting both single-unit spikes and overlapping waveforms. In addition, these authors [Aksenova et al. (2003); Chivirova et al. (2005); and also Caro-Martín et al. (2018)] argue that making template matching on the spike phase-space is more efficient (in terms of execution time and computational complexity) than doing it on spike time-domain. The authors of this manuscript could discuss the possible advantages/disadvantages of implementing template matching method in the spike phase-space on this mixed approach of supervised spike-sorting with machine-learning models for C-nociceptor microneurography data for sorting both single-unit spikes and overlapping waveforms. For this it is essential to consider that the features vector for each spike should also be based on latencies (not solely in 30/90 spike amplitudes) that are the other main features of the spike waveform.

P3. The comparison with other approaches for spike sorting such as Template Matching in spike phase-space [Aksenova et al. (2003); Chivirova et al. (2005], Neural Networks [Werner et al. (2016); Hermle et al. (2005); Kim & Kim (2000)], Support Vector Machines [SVM; Fournier et al. (2016); Jacob-Vogelstein et al. (2004)] or Bayesian Algorithms [Lewicki (1998); Takekawa et al. (2010); Takekawa et al. (2012)] is not done or is done very lightly without going into details. I would advise the authors to elaborate a bit more on the discussion about the practical and methodological advantages/differences of their supervised spike sorting for C-nociceptor microneurography approach with respect to those.

NEW RECOMMENDED REFERENCES:

Aksenova TI, et al. An unsupervised automatic method for sorting neuronal spike waveforms in awake and freely moving animals. Methods, 2003; 30:178–187.

Chibirova OK, et al. Unsupervised Spike Sorting of extracellular electrophysiological recording in subthalamic nucleus of Parkinsonian patients. Biosystems 2005; 79:159–171.

Werner T, et al. Spiking Neural Networks Based on OxRAM Synapses for Real-Time Unsupervised Spike Sorting. Front. Neurosci. 2016; 10:474.

Hermle T, et al. ANN-based system for sorting spike waveforms employing refractory periods.In ICANN 2005 LNCS (Eds Duch, W., Kacprzyk, J., Oja, E. & Zadrożny, S.) 3696:121–126 (Springer, Berlin, Heidelberg, 2005).

Fournier J, et al. Consensus-Based Sorting of Neuronal Spike Waveforms. PLoS One 2016; 11:e0160494.

Jacob-Vogelstein R, et al. Spike sorting with support vector machines. Conf. Proc. IEEE Eng. Med. Biol. Soc. 2004; 1:546–549.

Takekawa T, et al. Accurate spike sorting for multi-unit recordings. Eur. J. Neurosci. 2010; 31:263–272.

Takekawa T, et al. Spike sorting of heterogeneous neuron types by multimodality-weighted PCA and explicit robust variational Bayes. Front. Neuroinform. 2012; 6:5.

MINOR POINTS:

(i) When the authors are saying (lines 37-38) “Our approach provides the foundation for further development of spike sorting algorithms in noisy extracellular recordings of neural activity”; What does this means? I don’t see how this approach provides the foundation for further development of spike sorting algorithms.

(ii) In Fig 4A, part of the legend is cut off, please fix this.

Personally, I encourage the authors to adequately address all these concerns in the manuscript, so that it includes all the necessary details, because I consider this type of mixed approach that integrating supervised spike-sorting with machine-learning models for C-nociceptor microneurography data very interesting and this is irrefutably necessary in clinical neurophysiology.

**********

6. PLOS authors have the option to publish the peer review history of their article (what does this mean? ). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy .

Reviewer #1: No

Reviewer #2: No

Reviewer #3: No

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/ . PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org . Please note that Supporting Information files do not need this step.

PLoS One. 2025 Sep 26;20(9):e0329537. doi: 10.1371/journal.pone.0329537.r003

Author response to Decision Letter 1


30 May 2025

Reviewer #1: The manuscript presents a supervised pipeline for spike sorting targeting recordings with microneurography that employ a marking method.

In order to overcome the challenges related to extracellular recordings from microneurography, such as very low SNR and spatial resolution (single electrode), the authors suggest a supervised approach that uses the spikes from pre-identified units with the marking method as ground truth to build an SVM classifier that can be applied to spontaneous spikes. Several feature extraction methods are compared, showing a general better performance using the entire waveform data. However, given the substantial inter-subject/experiment variability, the authors also suggest that the proposed method could be used to assess the overall "sortability" and to find the best set of features of a specific recording.

I found the manuscript well structured and well written and I have some a few points and suggestions.

We would like to thank the reviewer for their valuable and positive feedback, as well as their insightful suggestions, which helped to improve the quality of our manuscript. Particularly, spotting the false separation within the same cluster on Figure 5 allowed us to identify a computational bug, which we previously overlooked.

1. When discussing the limitations of the PCA methods in Figure 5, the authors claim that dataset A1 would not yield good results with an unsupervised approach because the clusters overlap. I think that this would be strobgly dependent on i) the number of PC used, and ii) the explained variance of the chosen number of PC. Could the authors show how the clusters look using 3 PCs? What about more PCs? Would a clustering method correctly find the two units if, for example, 5 dimensions were used?

We thank the reviewer for this valuable suggestion. In response, we have conducted additional analyses to address these questions:

1. We had previously performed k-means clustering (using the known number of tracks/fibers) across all feature sets and datasets, evaluating clustering performance using V-measure, Adjusted Rand Index (ARI), and Normalized Mutual Information (NMI). In the revised manuscript, we have now included these results in the Supporting Information (Files S7-S9), allowing a comprehensive comparison across datasets and feature sets.

2. Exemplary for datasets A1 and A3, we have extended the manuscript as follows:

a. We present 2D and 3D scatter plots based on the first 2 and 3 principal components, respectively, to visually assess the cluster overlap (see Figures 5A-B, 5D-E).

b. For A1, we performed k-means clustering using 2-8 principal components and computed V-measure, ARI, and NMI scores at each dimensionality. These results are summarized in a new table (see Table 2).

c. The results show that increasing the number of PCs from 2 to 8 unfortunately does not substantially improve clustering performance with low scores (V-measures 0.59-0.62). This suggests that even with more PCs, unsupervised methods struggle to separate the overlapping units.

3. Regarding the explained variance, we computed the cumulative explained variance for the chosen number of PCs (2-8) for datasets A1 and A3 (Supporting Information S6). Despite capturing a large fraction of the variance, the cluster separability remains poor, reinforcing our original claim that overlapping feature distributions limit the effectiveness of unsupervised approaches in the frequently used PCA feature space.

In the same figure, I found panels C-D quite puzzling. The blue and green sub-clusters that the authors state are from the same unit will likely have very different waveforms/templates? How do the authors explain this? Is this something commonly observed in spikes from C-Nociceptors? Could it be that two different fibers are elicited from the same stimulus and have the same latency?

We appreciate the reviewer bringing this issue to our attention. Upon closer inspection of panels C and D, we identified an alignment error that artificially separated the green sub-cluster. We sincerely apologize for this mistake. In the revised manuscript, we have removed panels C and D from the figure. We have recomputed all results and carefully checked the spike alignment in all datasets.

We would additionally like to address the problem of the potential spike overlap, as it is a well-known challenge in the spike sorting field. In theory, two different fibers could indeed be activated by the same stimulus and have identical conduction latencies, potentially leading to superimposed spike shapes. However, such occurrences are extremely rare. Only in the case when two nerve fibers have exactly the same latency, and when sometimes one fiber is not activated by the stimulus, the recorded waveform may be shaped by the spike of a single axon, resulting in a slight change in spike shape. This is excluded by visual inspection using the marking method (see Figure 6B). We apply different protocols, such as mechanical stimulation, and can observe different amounts of activity-dependent conduction velocity slowing. Differences in the amount of slowing would reveal distinct fibers even if they have the same initial latency.

2. In cases where the waveforms/templates are very similar (e.g., Figure 3B-D), is it possible that an individual stimulus results in a fiber firing twice, in sequence? With the marking methods, these two spikes would be classified as separate units, and as the authors suggest, it would be virtually impossible to spike sort them accurately. On the other hand, isn't it unlikely, given the geometry of the fibers and the relative position to the electrode, that the spikes come indeed from the same fiber?

We agree that, in principle, it is possible for a peripheral axon to conduct two or more action potentials elicited by the same stimulus at different branches within the skin (cf. Weidner et al., 2000). However, in healthy volunteers, this phenomenon is rare. At branching points, the fastest action potential typically enters the branches retrogradely and collides with anterogradely conducted action potentials. The occurrence of this so-called “unidirectional conduction block” leading to double, triple, or multiple spiking is recognized by a progressive activity-dependent slowing of conduction velocity, without the application of additional stimuli.

Here, there is no evidence of multiple spiking within a single axon. Rather, the recorded action potentials originate from two distinct axons. It is a well-known observation across multiple laboratories that, in C-fiber recordings, when using a single extracellular electrode, the shape of action potentials from different axons can appear very similar.

3. Figure 4A. the authors restrict this similarity analysis to datasets with 2 tracks. I think that the number of data points could be extended also to multi-track dataset by considering, for each unit, a second unit with the lowest similaroty (worst case scenario).

In practical applications of C-fiber microneurography, we typically focus on the best-isolated track, especially when the goal is to identify well-separated fibers for further analysis. Including the most similar (i.e., least distinct) pairings from two tracks may not be a fair comparison. However, to address the reviewer’s point and ensure transparency, we have included these values for multi-track datasets as grey crosses in Figure 4A. This allows readers to observe the range of distances compared to the maximal accuracy while maintaining the focus of our main analysis.

4. Since the authors suggest that the method could be applied to spontaneous spikes as well, it would be nice to see that in action. How many spontaneous spikes could be classified on the used datasets?

It is important to note that peripheral afferent C-nociceptors in healthy volunteers are typically not spontaneously active, as their primary role is to signal potentially tissue-damaging stimuli. To address this limitation and explore the classifier's applicability to non-tracked activity, we plan to adjust our current stimulation protocol based on the marking method and use additional electrical-induced activity in future work. Such stimulation provides trackable, ground truth-labeled spikes and can serve as a controlled model for spontaneous firing. In the next steps, we aim to extend this work to include spikes evoked by mechanical, thermal, or chemical stimuli, which model in many respects spontaneous activity. To provide clarity, we have updated the Introduction, Discussion, and Conclusions and Outlook sections to emphasize that these will be the future steps in our research.

Minor points:

1. L142: SS-SPDF: first time this acronym is used. May be worth spelling it out

Thank you for pointing this out. We have now spelled out the acronym upon its first mention to improve clarity for the reader.

2. L352: why do the authors state that the study is about "spike morphology"? I would classify it as spike sorting analysis only

Thank you for the comment. While our work indeed involves spike sorting analysis, we also aimed to provide a broader, systematic overview of spike morphology in recordings made with microneurography. To our knowledge, this is the first comprehensive analysis focused on characterizing the diversity and structure of spike shapes recorded with this method.

To support this, we have added representative templates from the analyzed recordings to the Supporting Information to highlight the morphological variety observed (S5). We have revised the Introduction (see lines 136-150) to clarify that a central aim of the study was to evaluate spike sorting performance, and additionally, we systematically assess and summarize spike morphology characteristics across datasets.

3. L376-378: what other applications could it be transfered to?

Thank you for the question. We have revised the Conclusions and Outlook (lines 545-553) section to be more specific about potential applications. In particular, we included a short section outlining example scenarios where our approach could be transferred, such as other peripheral recordings from sympathetic C-fibers, which are important for heart/blood pressure control and thus for growing number of cardiovascular diseases or sensory A-fibers, whose input is important for motor control and in this line important for prosthesis development.

4. Table2: I would rename the Track*, R/S/T, Unit* consistently. The different naming makes it more confusing. You could just use Track1/2/3 or Unit1/2/3

Thank you for the suggestion, we have changed the names of the tracks to avoid confusion.

5. L481: Panda's -> pandas

Thank you, we have changed it.

6. Table 3: since most of steps are the same, a diagram/flowchart would be easier to understand. The differences are minor and could be explained in the text/captipn

Thank you for the helpful suggestion. We agree that a visual representation improves clarity. We have replaced Table 3 with a flowchart (now Fig 7) illustrating the main processing steps and moved the minor differences between pipelines to the text.

7. L518-519: this width is usually referred to as FWHM (full-width half maximum)

Thank you for pointing this out. We have updated the terminology in the manuscript to refer to the width as FWHM (full-width at half maximum), as suggested.

8. L558: What is W2? I guess that Wraw is the entire waveform (30-90 points), but W2 is not specified

We apologize for the confusion. W2 describes the principal components with two dimensions of the entire waveform and is defined in Table 5, where we provide a description of all feature sets. We have renamed W2 to W2-PCA for more clarity. The explanation can be found in the Materials and Methods section (beginning in line 762).

9. L569: where does the 23 come from? Aren't the new features 2 (S2/S3) instead of 4?

The original feature vector derived from the SS-SPDF method consisted of 24 features. However, we had to remove feature 4 as described in the Materials and Methods section, resulting in a 23-dimensional feature vector. Additionally, we have removed the PCA step, as suggested by Reviewer 3, P1, after realizing it did not contribute to redundancy reduction or performance improvement. We have revised the relevant section in the manuscript.

Reviewer #2: In this manuscript, the authors describe and evaluate the feasibility of a novel approach to sort spikes in electrophysiological recordings from nociceptive C-fibers in the peripheral nervous system, obtained using microneurography. The approach involves using SVM for the supervised classification of previously labeled spike data, opposed to existing unsupervised methods. The labelling of spikes is performed by employing the marking method, which leverages the difference in conduction velocities between fibers recorded simultaneously by an electrode and the activity-dependent slowing phenomenon in C-fibers. In the marking method, action potentials belonging to a single C-fiber are time-locked to a background low-frequency stimulus. By visualizing the recordings after several stimulation pulses in parallel, spikes originating from the same fiber will apear aligned in time (named a “track”), allowing to assign each spike to an individual fiber, and to extract the spike waveforms from the raw data. From the spike waveform data, the authors extract distinct feature sets (simple features, SS-SPDF features, and raw waveform features), which are the inputs to the SVM classifier. The SVM training/testing is performed for each recorded dataset (26 in total, from two different labs) using 5-fold cross validation, allowing to evaluate the sorting peformance of each feature set on a per-dataset basis, which could be used to guide the selection of the best features for sorting in a given dataset. In the end, the authors analyze and discuss the classification performance of each feature set according to general data features, such as number of individual fibers recorded and similarity of spike waveforms across the fibers in a single recording. They also highglight how the supervised method can be more efficient to sort spikes from different fibers compared to methods based on PCA followed by unsupervised clustering.

The manuscript is relevant for research involving microneurography and may advance the analysis of data from recordings of C-fibers. Moreover, the authors aimed to make the software code to apply the proposed method available, and describe efforts to make the analysis pipeline usable with different proprietary input file formats (leveraging open standards for data and metadata such as odML and NIX). However, there are points that need improvement and clarification in the manuscript.

We thank the reviewer for the constructive feedback on both the manuscript and the accompanying code. We appreciate the recognition of the manuscript’s relevance to microneurography research and its potential contribution to the analysis of C-fiber recordings. We are especially grateful for the suggestion to restructure the code using Snakemake. This recommendation significantly improved the efficiency and usability of our pipeline and greatly simplified the workflow for us.

1. The whole analysis rely on labeled data for ground truth using the marking method, but the manuscript does not detail how the spike tracks were actually obtained. Although the authors took their time to explain the rationale of the method, with helpful illustrative figures, the section in the methods (lines 448-472) does not detail how the actual procedure is executed with the raw data obtained in a recording from Aachen or Bristol. In the main text, the authors just describe this as a pre-analysis (line 165). In addition, there is no code in the GitHub repository for obtaining that track information (assumed to be stored in a NIX file after initial curation; Table 3). Therefore, the manuscript must present a more detailed description on how the marking method is performed as one part of the whole pipeline to obtain the starting spike data for the classification (e.g., software tools, manual curation steps, detailed signal preprocessing steps and parameters). The code should also be sh

Decision Letter 1

Nicholas Swindale

18 Jul 2025

Supervised Spike Sorting Feasibility of Noisy Single-Electrode Extracellular Recordings: Systematic Study of Human C-Nociceptors recorded via Microneurography

PONE-D-25-04960R1

Dear Dr. Troglio,

I am pleased to inform you that your manuscript has been recommened for publication by all three reviewers. It will be formally accepted once it meets any outstanding technical requirements.

Within one week, you will receive an e-mail detailing the required amendments. When these have been addressed, you will receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice will be generated when your article is formally accepted. Please note, if your institution has a publishing partnership with PLOS and your article meets the relevant criteria, all or part of your publication costs will be covered. Please make sure your user information is up-to-date by logging into Editorial Manager at Editorial Manager®  and clicking the ‘Update My Information' link at the top of the page. If you have any questions relating to publication charges, please contact our Author Billing department directly at authorbilling@plos.org.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they will be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

Sincerely,

Nicholas V Swindale

Academic Editor

PLOS ONE

Additional Editor Comments (optional):

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #1: All comments have been addressed

Reviewer #2: All comments have been addressed

Reviewer #3: All comments have been addressed

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: The authors addressed all my comments. I am glad that one of my comments allowed the authors to spot a bug in the code.

Reviewer #2: I thank the authors for the time to revise the manuscript, that is greatly improved. The authors performed a thorough rewriting of the text, to make their motivation, goals, and methods clear. The added comparison to other spike sorters strengthened the previous findings. The revised discussion now critically assessses the findings and limitations. The shared code was also refactored to use a WMS facilitating its use by the community. The open-source pipeline is easily applied to a new dataset, and the runs are more reproducible. All the concerns raised were addressed or adequately clarified in the rebuttal letter. The manuscript is suitable for publication.

Reviewer #3: FINAL REVIEW REPORT: Reviewer # 3

The authors have answered all my concerns and questions appropriately. In the new version of this manuscript, the authors have substantially improved the focus of the article to meet the demands of an audience more interested in experimental applications of this spike sorting method, mainly for human multi-unit electrophysiological extracellular nerve recordings (raw microneurography data).

Also, they have improved the methodological description, addressing all my major concerns about the alignment of the spikes, clustering, classification and curation processes. This version's workflow for spike sorting is more solid and a much better fit for the proposal.

In particular, the comparative aspects between the proposed method/algorithm and other approaches for spike sorting such as SS-SPDF method with Template Matching in spike phase-space, SpikeInterface and Support Vector Machines were appropriately addressed in the new version of the manuscript.

In addition, all my minor comments were also addressed.

I consider this type of mixed approach that integrating supervised spike-sorting with machine-learning models for C-nociceptor microneurography data very interesting and this is irrefutably necessary in clinical neurophysiology.

In my opinion, the manuscript has significantly improved with the suggestions and comments of all the reviewers, and with the new changes introduced by the authors. I have no futher suggestions, therefore, I accept this manuscript for publication in its current version.

Interesting paper - Job well done!!!

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean? ). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy .

Reviewer #1: Yes:  Alessio Paolo Buccino

Reviewer #2: No

Reviewer #3: No

**********

Acceptance letter

Nicholas Swindale

PONE-D-25-04960R1

PLOS ONE

Dear Dr. Troglio,

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS ONE. Congratulations! Your manuscript is now being handed over to our production team.

At this stage, our production department will prepare your paper for publication. This includes ensuring the following:

* All references, tables, and figures are properly cited

* All relevant supporting information is included in the manuscript submission,

* There are no issues that prevent the paper from being properly typeset

You will receive further instructions from the production team, including instructions on how to review your proof when it is ready. Please keep in mind that we are working through a large volume of accepted articles, so please give us a few days to review your paper and let you know the next and final steps.

Lastly, if your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

You will receive an invoice from PLOS for your publication fee after your manuscript has reached the completed accept phase. If you receive an email requesting payment before acceptance or for any other service, this may be a phishing scheme. Learn how to identify phishing emails and protect your accounts at https://explore.plos.org/phishing.

If we can help with anything else, please email us at customercare@plos.org.

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Dr. Nicholas V Swindale

Academic Editor

PLOS ONE

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 File. SVM classification accuracy scores.

    Accuracy values for SVM classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s001.csv (988B, csv)
    S2 File. SVM classification macro-averaged F1-scores.

    Macro-averaged F1-scores values for SVM classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s002.csv (921B, csv)
    S3 File. SVM classification precision scores.

    Precision values for SVM classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s003.csv (915B, csv)
    S4 File. SVM classification recall scores.

    Recall values for SVM classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s004.csv (916B, csv)
    S5 File. Spike templates for all datasets.

    The spike templates were computed by averaging all tracked spikes after aligning them to the time point of their maximum negative peak. These templates represent characteristic waveforms for each identified track across recordings and give insights into morphological differences.

    (PDF)

    pone.0329537.s005.pdf (1.3MB, pdf)
    S6 File. Cumulative explained variance ratio.

    The cumulative explained variance ratio for principal component counts ranging from 2 to 8, visualized separately for datasets A1 (S6.1) and A3 (S6.2). The plots illustrate how the proportion of total variance captured increases with the number of PCA components, providing insight into the dimensionality required to represent the spike waveform effectively.

    (PDF)

    pone.0329537.s006.pdf (122.4KB, pdf)
    S7 File. K-means clustering ARI scores.

    Adjusted Rand Index (ARI) values for k-means clustering, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s007.csv (912B, csv)
    S8 File. K-means clustering NMI scores.

    Normalized Mutual Information Score (NMI) values for k-means clustering, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s008.csv (908B, csv)
    S9 File. K-means clustering V-measure scores.

    V-measure values for k-means clustering, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s009.csv (908B, csv)
    S10 File. Random Forest classification accuracy scores.

    Accuracy values for Random Forest classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s010.csv (913B, csv)
    S11 File. Random Forest classification macro-averaged F1-scores.

    Macro-averaged F1-scores values for Random Forest classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s011.csv (918B, csv)
    S12 File. Random Forest classification precision scores.

    Precision values for Random Forest classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s012.csv (914B, csv)
    S13 File. Random Forest classification recall scores.

    Recall values for Random Forest classification, provided as a CSV file with comma-separated values.

    (CSV)

    pone.0329537.s013.csv (911B, csv)
    S14 File. Error values with max accuracy.

    Computed error metrics for all datasets, along with the maximum achieved accuracy for SVM classification. These metrics were used to investigate how template similarity affects sorting quality.

    (CSV)

    pone.0329537.s014.csv (660B, csv)
    S15 File. Screenshots of Dapsys and SpikeSpy.

    To illustrate the tracking process, this file includes two screenshots, one from Dapsys and one from SpikeSpy. Both software tools implement similar tracking mechanisms to extract vertically aligned spike waveforms during microneurography recordings, providing experimental ground truth for subsequent analysis.

    (PDF)

    pone.0329537.s015.pdf (1.6MB, pdf)
    S16 ZIP Folder. Feature set data for datasets A1, A3, and A6.

    This archive includes the raw extracted feature sets for A1, A3, and A6, as well as SPDFFV3 features for A1 and A3. It also contains waveform data used for plotting and template computation in Fig 3, along with the data used for PCA and clustering analyses presented in Fig 5.

    (ZIP)

    pone.0329537.s016.zip (145KB, zip)

    Data Availability Statement

    The data sharing is restricted by the terms of the participant consent, which explicitly limits usage to to the scope of this research project. Therefore, these recordings are available only upon reasonable request from the corresponding author. All data used for plotting and statistical analyses are included within the Supporting information files. The computational pipeline code, visualization scripts, and a test data recording are available on GitHub https://github.com/Digital-C-Fiber/SpikeSortingPipeline. We have also used Zenodo to assign a DOI to the repository: 10.5281/zenodo.14552210.


    Articles from PLOS One are provided here courtesy of PLOS

    RESOURCES