MLIB: an easy-to-use Matlab toolbox for the analysis of extracellular spike data
This article has been Reviewed by the following groups
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
- Evaluated articles (Peer Community in Neuroscience)
Abstract
The analysis of neurophysiological data obtained from extracellular recordings is usually performed using a number of standard techniques. These include a) the extraction of action potentials from voltage traces and their subsequent classification, i.e., spike sorting, b) the visualization of activity, e.g., by constructing raster plots, peri-stimulus time histograms (PSTHs), and spike density functions, and c) the quantification of neuronal responses according to experimental variables such as stimulation or movement. Here I present a Matlab toolbox containing functions for the visualization and analysis of neuronal spike data. The toolbox consists entirely of one-liners that operate on vector or matrix inputs, i.e., spike and event timestamps or waveform samples. The toolbox functions provide both basic (constructing PSTHs, computing waveform characteristics etc.) and more advanced functionality, such as dimensionality reduction of multi-neuron recordings. While offering a high degree of versatility, the toolbox should also be accessible to newcomers to neurophysiology, such as (under)graduate students or PhD students. The functions are streamlined, easy to use, and each function is extensively introduced with several examples using real or simulated data. In addition, many functions provide fully formatted plots on request, even with minimal Matlab knowledge.
Article activity feed
-
-
Dear Dr. Stüttgen,
Thank you for submitting your manuscript entitled "MLIB: an easy-to-use Matlab toolbox for the analysis of extracellular spike data" (https://www.biorxiv.org/content/10.1101/2025.03.25.645246v2) for review at PCI C.Neuro.
I have now received two independent reviews and have sufficient basis to proceed with my recommendation. Both reviewers appreciate the quality of the work and the utility of the MLIB toolbox; however, they each identify a key area for improvement that could meaningfully increase the manuscript's impact.
Specifically, they recommend a more thorough conceptual comparison of MLIB with existing tools used for similar initial analyses of spiking data. Additionally, one reviewer suggests strengthening the treatment of the statistical methods included in the toolbox. In particular, providing a clearer …
Dear Dr. Stüttgen,
Thank you for submitting your manuscript entitled "MLIB: an easy-to-use Matlab toolbox for the analysis of extracellular spike data" (https://www.biorxiv.org/content/10.1101/2025.03.25.645246v2) for review at PCI C.Neuro.
I have now received two independent reviews and have sufficient basis to proceed with my recommendation. Both reviewers appreciate the quality of the work and the utility of the MLIB toolbox; however, they each identify a key area for improvement that could meaningfully increase the manuscript's impact.
Specifically, they recommend a more thorough conceptual comparison of MLIB with existing tools used for similar initial analyses of spiking data. Additionally, one reviewer suggests strengthening the treatment of the statistical methods included in the toolbox. In particular, providing a clearer rationale for the use of classical approaches and a frank discussion of their limitations relative to more modern alternatives.
Should you choose to address these points in a revised submission, I would be happy to submit a positive recommendation for your manuscript.
Best regards,
Hernando M. Vergara
-
Review text not available.
-
The manuscript presents a Matlab toolbox for the visualization and analysis of neuronal spike data, covering a range of commonly used methods (e.g., PSTHs, spike train statistics, dimensionality reduction, and regression-based analyses). The toolbox is designed with a strong emphasis on accessibility and ease of use, particularly for users with limited programming experience.
The toolbox (or earlier versions of it) has been available for some time and has been used in published studies, including by the reviewer. This suggests that the software is practically usable and has reached a certain level of stability.
Overall, the manuscript describes a useful and potentially valuable resource, particularly for users seeking a low-threshold entry into spike data analysis.
Major comments
1. Positioning relative to existing toolboxes
The manuscript …
The manuscript presents a Matlab toolbox for the visualization and analysis of neuronal spike data, covering a range of commonly used methods (e.g., PSTHs, spike train statistics, dimensionality reduction, and regression-based analyses). The toolbox is designed with a strong emphasis on accessibility and ease of use, particularly for users with limited programming experience.
The toolbox (or earlier versions of it) has been available for some time and has been used in published studies, including by the reviewer. This suggests that the software is practically usable and has reached a certain level of stability.
Overall, the manuscript describes a useful and potentially valuable resource, particularly for users seeking a low-threshold entry into spike data analysis.
Major comments
1. Positioning relative to existing toolboxes
The manuscript clearly identifies its intended user group and emphasizes ease of use and minimal setup as central design principles. This is a strength of the work.
At the same time, the manuscript acknowledges the existence of alternative toolboxes and resources (e.g., Python-based tools) in the Discussion. However, this remains largely at the level of references, without a more explicit conceptual comparison.
Given the overlap with existing tools (e.g., Elephant for spike train analysis, SpikeInterface for spike processing, and more recent frameworks such as Pynapple emphasizing structured data representations), a clearer positioning of the present toolbox would be highly beneficial.
In particular, explicitly articulating how the lightweight, function-based design (use of one-liners, minimal setup) contrasts with more structured or pipeline-oriented approaches would help clarify the intended role of the toolbox within the current landscape of neuroscience data analysis tools.
2. Justification of methodological choices
The toolbox implements several standard analysis approaches, including multiple linear regression on binned spike counts. While this is a well-established and interpretable method, more recent work often relies on generalized linear models (e.g., Poisson GLMs), which can better account for the statistical properties of spike data.
The manuscript would benefit from a clearer discussion of the rationale for using these classical approaches and their limitations relative to more modern methods. This would help contextualize the toolbox within current analytical practices.
Minor comments
In Figure 4, the legend text appears inconsistent:
“C) Population trajectory for the first three PCs” likely should read “D)” instead of “C)”.
Overall assessmentThe manuscript describes a practically useful toolbox with a clear focus on accessibility and ease of use. Strengthening the positioning relative to existing tools and clarifying methodological choices would further improve its clarity and impact.
-
Extracellular electrophysiology has been part of the neuroscientist's toolbox for many decades, allowing the study of neuronal activity with high temporal resolution. By analysing the internal correlations of neuronal activity, as well as those with environmental stimuli and with behaviour, extracellular electrophysiology has been key to significant advances across the field of neuroscience, from sensory perception to cognition. It is not surprising, therefore, that its expansion shows no signs of slowing, with new technologies allowing both the recording and the analysis of many neurons simultaneously (Steinmetz et al., 2018). Yet, careful manual curation of the recorded data remains a necessary step to obtain reliable and reproducible results, and this process, along with subsequent data processing, can represent a daunting challenge …
Extracellular electrophysiology has been part of the neuroscientist's toolbox for many decades, allowing the study of neuronal activity with high temporal resolution. By analysing the internal correlations of neuronal activity, as well as those with environmental stimuli and with behaviour, extracellular electrophysiology has been key to significant advances across the field of neuroscience, from sensory perception to cognition. It is not surprising, therefore, that its expansion shows no signs of slowing, with new technologies allowing both the recording and the analysis of many neurons simultaneously (Steinmetz et al., 2018). Yet, careful manual curation of the recorded data remains a necessary step to obtain reliable and reproducible results, and this process, along with subsequent data processing, can represent a daunting challenge for researchers with limited coding skills.
Dr. Stüttgen presents "MLIB: an easy-to-use MATLAB toolbox for the analysis of extracellular spike data", which addresses both of these bottlenecks by providing a simple yet comprehensive pipeline for sorting neuronal spikes, visually inspecting them for curation, and performing standard analyses on the data. This is all achieved using a few lines of well-documented code, lowering the entry barrier to both electrophysiology analysis and coding. MLIB provides a versatile yet accessible end-to-end pipeline through simple functions and standardised data formats. The fact that it is written for software that requires a licence is acknowledged and discussed in the manuscript, and given the wide use of MATLAB in the neuroscience community, this toolbox represents a significant contribution.
The manuscript was evaluated very positively by both reviewers, with one of them reporting having already used the toolbox. Following the suggestion of both reviewers, the latest version of the manuscript incorporates a qualitative comparison of the toolbox with other packages, to which the reader is referred for distinct yet complementary applications.
I value greatly the efforts that experts in the field are making to democratise access to complex analyses, and I expect this toolbox to become a widely used resource for those conducting electrophysiological analyses for the first time and for experienced researchers alike.
References
Steinmetz NA, Koch C, Harris KD, Carandini M. Challenges and opportunities for large-scale electrophysiology with Neuropixels probes. Curr Opin Neurobiol. 2018 Jun;50:92-100. doi: 10.1016/j.conb.2018.01.009. Epub 2018 Feb 13. PMID: 29444488; PMCID: PMC5999351.
Maik Christopher Stüttgen (2026) MLIB: an easy-to-use Matlab toolbox for the analysis of extracellular spike data. bioRxiv, ver.3 peer-reviewed and recommended by PCI Neuroscience https://doi.org/10.1101/2025.03.25.645246
-
