The methods for electrophysiology in neuroscience have evolved tremendously over the recent years with a growing emphasis on dense-array signal recordings. Such increased complexity and augmented wealth in the volume of data recorded, have not been accompanied by efforts to streamline and facilitate access to processing methods, which too are susceptible to grow in sophistication. Moreover, unsuccessful attempts to reproduce peer-reviewed publications indicate a problem of transparency in science. This growing problem could be tackled by unrestricted access to methods that promote research transparency and data sharing, ensuring the reproducibility of published results. Here, we provide a free, extensive, open-source software that provides data-analysis, data-management and multi-modality integration solutions for invasive neurophysiology. Users can perform their entire analysis through a user-friendly environment without the need of programming skills, in a tractable (logged) way. This work contributes to open-science, analysis standardization, transparency and reproducibility in invasive neurophysiology.
Invasive electrode recordings are a unique source of in-vitro and in-vivo neurophysiological data at high resolution in both space and time, recorded in relation to complex animal and human behavior. The complexity of this kind of data has increased in recent years, with the advent of increasingly dense multi-channel and multi-site electrode arrays. This evolution provides exciting opportunities to explore the relationship between local events, such as action potentials, and more global dynamics at the systems level, such as fluctuations in oscillatory network activity. At the same time, these multiscale explorations require different analytical methods from those traditionally used in the field.
Challenges in exploring high-dimensional spatio-temporal data sets are not specific to electrophysiology: they occur frequently in neuroimaging data, as scanners produce increasingly large volumes of data, which are often shared across multiple groups or research centres. In response, the brain imaging community has made significant strides in developing shared software platforms to harmonize analytical methods and to facilitate data sharing1,2,3,4,5,6. Indeed, free, open-source software toolkits have been critical for facilitating training and augmenting research productivity. This approach has transferred to the field of scalp electrophysiology7, but as of yet it has not found widespread use in invasive neurophysiology (IN). Software tools do exist for specific segments of the IN data workflow, such as for spike detection and sorting and time-series analysis8,9,10,11,12,13,14,15, but they remain relatively specialized, some with limited support and documentation and most with restricted interoperability with other tools.
While we acknowledge significant efforts in harmonizing data formats for electrophysiology (Refs16,17,18, Neuroshare - http://neuroshare.sourceforge.net/index.shtml), it does seem that this field lags behind others in meeting the demands of recommended practices for data management and transparency19,20. In this regard, well-supported software tools are required to produce analytical workflows that are validated, well documented and reproducible. Important components include data organization, review and quality control, verified implementations of signal extraction and decomposition methods, solutions for advanced visualization registered to anatomy, and sound approaches to machine learning and statistical inference. As in the brain imaging field, such tools would facilitate the reproducibility of published results and the dissemination of methods within and between research groups. They would also save considerable time and resources currently required to re-code published methods. In addition, re-coding presents challenges in code verification relative to a published method, raising possible concerns about the validity of the end results and limiting the long-term value of the effort.
Here we deploy and share open-source software (called Invasive Neurophysiology-Brainstorm, or IN-Brainstorm) that integrates multiple aspects of data analysis for most modalities and signal types for basic electrophysiology: from single cells to distributed channel arrays, from spiking events to local field potentials, from ongoing recordings to event-related responses, and from in vitro preparations to free-behaving models. We also emphasize the importance of an extensive graphical interface for user-friendly access to advanced analytical methods, of flexible scripting features for high-performance computing, and of traceable code execution. The proposed tool is accompanied by extensive online documentation and support from a user community web forum.
This free application builds on the foundations of the Brainstorm platform6, which is well-established (21,000 user accounts), free open-source software for magnetoencephalography (MEG) and electroencephalography (EEG). Brainstorm can integrate multimodal data volumes in addition to scalp electrophysiology e.g., magnetic resonance imaging (MRI), CT-scans and functional near-infrared spectroscopy (fNIRS). It also features advanced source modeling for electrophysiological signals.
The IN-Brainstorm application provides a comprehensive suite that interoperates with other, more specific and constantly evolving IN tools available from the open-source community e.g., for performing spike sorting. The end result is a unique and expansive software toolkit that bridges across recording scales and data modalities, registers invasive neurophysiology with structural anatomy data, and thereby delivers a unifying analytical environment to the neurophysiology research community.
The IN-Brainstorm functionalities described here offer comprehensive solutions for data importation and analysis, including spike-sorting, extraction of local field potentials, and correlations among these measures across multiple channels. Importantly, thanks to an intuitive graphical user interface, no programming skills are required for accessing and using the advanced methods available, including for assembling and sharing advanced data analysis pipelines. A summary of these software features is provided in Table 1, and a schematic of the workflow enabled by the toolbox is shown in Fig. 1.
The bedrock of the present developments is the Brainstorm platform. Brainstorm6 is written in Matlab (Matlab2008a and higher) and Java. It is therefore independent of the operating system (Windows, MacOS and Linux). Community code management is via GitHub. Users without access to a Matlab license can use a fully executable version of the application compiled for the above operating systems. Extensive documentation is freely available online, with specialized tutorials, datasets and videos (https://neuroimage.usc.edu/brainstorm/e-phys/Introduction). A thorough comparison of Brainstorm and other open source toolboxes was published recently21.
In the following sections, we describe a broad spectrum of analysis options for multiscale electrophysiology that are enabled by IN-Brainstorm and illustrate these features with the processing of an example raw data file.
Importing, reviewing and pre-processing raw data
Raw data importation
Data to be analyzed must first be imported into the software. Brainstorm can read raw electrophysiology data from 80 different file formats. We have added new data formats specific to single- and multi-unit electrophysiology, including Plexon (.plx, .pl2), Blackrock (.nsX), Ripple (.nsX), Intan (.rhd, .rhs), Tucker Davis Technologies, and Neurodata Without Borders (.nwb). New formats can be added on demand. Raw data can also be read directly from ASCII and basic binary data formats, with header file parameters easily specified from a GUI.
Raw files of continuous data from chronic preparations can be voluminous due to hours-long durations, tens of kilo-Hertz sampling rate and simultaneous recording from multi-channel electrode arrays. Hence loading such large raw files at once into computer memory can be impractical. For this reason, we have implemented efficient data review solutions of the raw signals, that load portions of the raw data on the fly depending on the visualization parameters set by the user (e.g., virtual page length, selection of a subset of channels or montages for review, keyboard and mouse shortcuts for navigating and marking events).
Task events (e.g., stimulus types and presentation times, behavioral responses) and ancillary recordings (electrooculograms, electrocardiogram, eye and body movements, video recordings of behaviour, etc.) are readily registered to the electrophysiological data in IN-Brainstorm, for multimodal data review, quality control and event-related processing. We emphasize that when a raw file is reviewed, the physical data is not duplicated as a Brainstorm file. Instead, the header of the original data file is automatically parsed to extract metadata, such as channel parameters, sampling rate, time stamps, event codes, etc.
Figure 2 (left) shows an example of IN-Brainstorm display for data review, including sub-menus for displaying and navigating through files and events. The right panel shows an example of raw data collected with a Plexon MAP system and a 32-channel linear electrode implanted in cortical areas MT and MST of a non-human primate. The animal maintained fixation during the presentation of a motion stimulus comprising of dots that translated in 8 different directions.
The red line in the figure shows the time of a “Stim On 0” event, extracted from the data. Spikes detected online (labelled as Spikes Channel) were extracted directly from the raw file contents by IN-Brainstorm, with automatic registration to the data time series.
The bottom right panel of Fig. 2 shows a selection of 4 channels temporally aligned with the top figure. The spikes from a neuron that was isolated on the first electrode are marked with green circles at the top of the full time-series displayed in the top panel. Users can browse the raw traces using point-and-click GUI and a series of keyboard shortcuts. On-the-fly bandpass and notch filtering can be applied to the signals.
Quality control & data pre-processing
Starting from the kind of raw data shown in Fig. 2, users can easily navigate through the recordings and experimental trials and events for quality control. Data segments, channels and entire trials can be marked as “bad” and excluded from further analyses using automatic processes or based on user evaluations.
The IN-Brainstorm pre-processing toolkit features solutions for adjustments of recording baseline, data resampling and frequency filtering (with linear phase filters). Additionally, detection and attenuation of artifacts (e.g., heartbeats, eye and body movements, stimulation and juice artifacts) can be achieved with principal22 or independent component analysis23,24. Finally, combining sensor data with the actual geometry of the recording array(s) enables many 2-D and 3-D visualization possibilities for time-series and realistic topographical plots, as illustrated further below.
Spike detection and spike sorting
Following the importation and preprocessing of data, IN data is often processed to extract spiking events from single or multiple neurons. This entails detecting spike occurrences and classifying these events according to their respective neural sources25. Most data acquisition systems feature online spike detection and sorting. These online events can be imported directly into IN-Brainstorm with the corresponding raw recordings. Yet, usual IN practice is to refine spike classification with a two-step procedure consisting of 1) unsupervised clustering, which automatically assigns each spike to a neural source based on waveform features, then 2) supervised clustering, which requires manual reviewing and editing of the labels from unsupervised clustering and the elimination of spurious spike events.
For IN-Brainstorm, we have enabled the direct interoperability with a selection of existing and openly-available spike-sorting toolkits: Waveclus14, UltraMegaSort20008,10 and Kilosort13. Those packages can be downloaded and installed automatically, in a completely transparent procedure. Sequentially, these tools are called by and interact with IN-Brainstorm without programming interventions from users.
Unsupervised spike sorting
Figure 3 (left) shows IN-Brainstorms’ GUI for unsupervised spike-sorting. Raw files are dragged and dropped into the GUI process box before a spike-sorting tool is selected from the IN-Brainstorm toolkit. Next, spike events are detected on each electrode and classified according to their putative neuronal generators.
The unsupervised spike events produced overwrite the online counterparts that were detected during data acquisition. The output of the spike-sorting process (Fig. 3 Box 1) is automatically registered to and accessible from the IN-Brainstorm database and linked to the corresponding raw file. The spike events are labelled in a principled manner (per channel and source cell number – Fig. 3 Box 2).
Supervised spike sorting
As WaveClus and UltraMegaSort2000 have built-in supervised spike sorting graphical user interfaces, we synchronized their GUIs with IN-Brainstorm’s. For Kilosort, we developed specific GUI bridges via Klusters9. The user-selected supervised clustering tool is called from Brainstorm’s main window after an unsupervised spike-sorted file is selected (Fig. 4a). The user then switches to the GUI of the selected supervised spike clustering tool (Fig. 4b–d). Once supervised spike clustering is complete, the spike events are updated accordingly and registered into the software’s file system. Double-clicking on the link to the raw data file lets the user review the updated spike events along with the raw electrophysiological traces as shown in Fig. 2 (Right).
Spike events and categories from other spike-sorting tools can be readily imported as Brainstorm events, following the procedure described in the online documentation (https://neuroimage.usc.edu/brainstorm/e-phys/ConvertToBrainstormEvents).
Extraction of local field potentials
In addition to spiking activity, IN recordings yield local field potentials (LFPs), which provide direct measures of the summed post-synaptic electrical activity in the vicinity of recording electrodes26. These can be useful as a complement to spiking activity or a surrogate for some aspects of neural activity (e.g.27), provided that LFP traces can reliably be filtered and separated from spike waveforms28.
Figure 5a shows the IN-Brainstorm’s GUI for extracting LFP traces from raw recordings. The application features efficient tools to remove spike traces (Zanos et al., 2011), to perform anti-aliasing bandpass filtering and to down-sample the raw data. The de-spiking method proposed by Zanos et al.28 increases the accuracy of subsequent spike-field coherence measures and of spike-triggered average signals.
The resulting LFP traces and experimental events are automatically registered in IN-Brainstorm’s data repository for further review and analysis with a vast library of tools and pipelines − as described below − or for easy exportation to other software or plain files.
LFP extraction produces a new IN-Brainstorm down-sampled time-series binary file (Fig. 5b) with all the corresponding metadata, such as channel description (e.g., electrode labels and locations), and spike and experimental events. This file is easily sharable among researchers since its size is typically ~20–30 times smaller than the original raw file. Figure 5c shows a segment of the LFP file created.
Once the relevant neural signals (LFPs and spikes) have been extracted from the raw data, they can be divided according to experimental epochs. Epochs are typically comprised of experimental trials, with the time window selection defined around a stimulation or behavioral event of interest. These can be imported directly into the IN-Brainstorm file system.
To illustrate these functions, we make use of the example visual cortex recording described previously (Fig. 2). The experiment involved presentations of moving stimuli while the animal maintained fixation; we defined the relevant epochs as segments of [−500, 1000] ms around the onset of each visual stimulus (Fig. 6 Left). In total we considered 8 different directions of the visual stimulus moving pattern; each stimulus condition was repeated 4 times (one condition was repeated for 96 trials for usage in the raster plot, and noise correlation functions). Imported trials to the database are shown in (Fig. 6 – Right).
The following analysis steps can then be applied on the epoched trials.
Analysis of individual LFP signals
LFP traces can be analyzed using Brainstorm’s extensive library originally developed for EEG and MEG research6. We show in Table 1 a list of the main data processing categories that are available for LFP analysis. There is extensive online documentation, accompanied by data files, that describes in detail the methods and practices of LFP signal analysis (http://neuroimage.usc.edu/brainstorm).
We briefly provide below a few examples of these functions and their implementation in IN-Brainstorm.
Having extracted the LFP signal and defined an appropriate analysis epoch, one can compute the LFP power at different frequencies and at different times relative to a stimulus event. Such information is often used to infer stimulus selectivity, anatomical sources of input, and other factors that are not necessarily apparent in spiking activity29,30,31,32,33.
IN-Brainstorm provides functionality for spectral and time-frequency decompositions, which can be derived using power spectrum density estimates, Hilbert or wavelet transforms. An example time-frequency decomposition (wavelet) is shown in Fig. 7a for the example LFP data corresponding to a single stimulus condition and epoch that shows strong alpha and beta responses after stimulation. The wavelet decomposition was z-scored with respect to a pre-stimulus baseline [−500:−100] ms.
LFP-LFP signal analysis
LFP signals from multichannel recordings can be analyzed to detect occurrences of various forms of signal similarities in the time or frequency domain. These measures are often interpreted as representing functional connectivity between different sites30,33,34,35. IN-Brainstorm provides support for widely-used measures based on amplitude or phase statistics as indicators of possible interregional brain interactions (coherence, phase-locking values, bandlimited amplitude envelope correlations, phase-transfer entropy) and parametric models (estimates of time- or frequency-domain Granger causality). Advanced measures of interdependence between oscillatory components of polyrhythmic brain activity can be derived with phase-amplitude coupling (PAC) estimation tools36,37. An example estimation of coherence among all combinations of electrodes is shown in Fig. 7b for a single stimulus condition and epoch. The bimodal pattern that emerges (high coherence among some channels and low coherence among others) is an indication of the transition of the linear probe across neighboring cortical areas, from MT (electrodes 1:13) to MST (21:32).
Analysis of individual neuron spiking activity
Spikes are registered in IN-Brainstorm as events; the corresponding features are 1) the time of occurrence and 2) a label for distinguishing between neuronal sources. We provide several features for visualization of epoched spiking data.
Raster plot – peristimulus time histograms
Raster plots and peristimulus time histograms (PSTH), are routinely used to visualize the relations between neuronal firing and a stimulus event or a behavioral response.
We provide three methods for visualizing spiking activity with IN-Brainstorm:
The first method (raster plot) shows the spiking data as trial vs. time for each neuron. Similarly, the second method (PSTH) shows the average binned firing rate for each neuron, along its 95% confidence intervals. Raster plots and PSTHs of spiking rates are displayed after interactive selection of the cell to be reviewed. Figure 8a shows the raster plot of the first neuron detected from contact AD01 (top), and its equivalent PSTH with 10-ms binning (bottom). The PSTH of the neuron’s firing rate from 96 trials of a single condition revealed a stimulus-onset-to-maximum-firing latency of about 150 ms.
The third method is embedded within the topographical plots section as shown below.
Tuning curves capture the relationship between an experimental variable (e.g., the orientation of a visual stimulus) and a scalar measure of neural activity (e.g., a single neuron’s trial-averaged firing rate).
Tuning curves are readily produced from continuous data files that contain the event markers of interest to the study. Tuning curves are displayed with IN-Brainstorm after manual assignment of the order of the experimental conditions (x-axis), the selection of the neurons to be displayed, and the selection of the time window of interest for reporting spiking activity. A separate tuning curve figure is produced for each neuron selected.
We selected the events and individual neurons previously identified from spike sorting via IN-Brainstorm’s GUI. Figure 8b shows the tuning curves of one example neuron (labeled as “Spikes Channel AD07 |1|”) for the 8 different conditions (Stim On −3/4 pi, Stim On −2/4 pi etc.) of the motion stimuli, and its 95% confidence intervals. The tuning curve shows the preference of this neuron for stimuli moving in the right direction (Stim On -1/4 pi condition).
When multichannel recording devices are used, neurophysiology data can be shown as topographically registered to structural anatomy. IN-Brainstorm can show neuronal firing at the 3-D locations of the recording probes/arrays. To illustrate this feature, we used a separate dataset that was collected from two 96-channel Utah arrays and one 32-linear probe38. A structural T1-weighted MRI volume was acquired preoperatively. The head and brain surface envelopes were segmented with Freesurfer39 and directly imported in IN-Brainstorm. The electrode contact locations were co-registered to the 3-D anatomical volume by specifying the distance of the electrodes along the probe and locating the tip of the probe and the entry point through the skull, using Brainstorm’s MRI volume viewer.
Neuronal firing was binned in 10-ms segments and displayed on the animal’s anatomy as shown in Fig. 9a (a single bin is displayed in the figure). This figure shows IN-Brainstorm’s ability to overlay the segmented cortical surface, MRI orthogonal slices, the implanted devices with actual geometry, and color-coded displays of raw or processed electrophysiology data (here instantaneous firing rates). Figure 9b shows a zoomed-in version of Fig. 9a over the Utah array implanted in the prefrontal cortex.
Spike-spike analysis: noise correlations
While tuning curves capture neuronal sensitivity to stimulus properties, the fidelity of a population code is thought to be limited by noise that is common across neurons40; for example, neurons would be noise correlated if for each stimulus their activities are correlated41. Such noise correlations are typically quantified as the Pearson correlation coefficient between the firing rates of two neurons across trials. Such correlations strongly influence the accuracy of population coding42,43,44,45,46.
Noise correlation statistics are displayed with IN-Brainstorm from the correlation of the spike trains that each neuron elicited within a given epoch, for all neuronal combinations. The end result is a nxn matrix (with n the number of unique neurons that produced spikes during the selected trials) that shows noise correlation estimates between the selected neurons.
Figure 8c shows the noise correlation profile across the 32-channel array of the example dataset, for 53 unique neurons that elicited spikes across all trials at the 8 conditions of presentation of the moving stimulus in the original data set from Fig. 2. Spikes included in the correlation computations were selected in the [0,300]-ms time range of each trial.
The computed noise correlation showed 2 pairs of neurons with abnormally high noise correlation (above 0.8). After further inspection, it was revealed that this was due to the fact that the spike-sorter that was used was not taking into account the relative position of the electrodes, and the same neurons were picked up from neighbouring channels:
Neurons: AD01 |1| - AD02|2| and AD08 |1| - AD09 |1| were the same neuron.
Spikes are local events, reflecting outputs from individual neurons. LFPs in contrast can capture activity over regions, including subthreshold post-synaptic activity, and therefore reflect the state of a broader network47. There is considerable interest in relating the two types of signals for estimating the dependence of spiking activity on the broader context in which the neuron is embedded.
Spike-field coherence (SFC) estimates the consistency between the time occurrence of spike trains and the phase of co-localized LFP cycles as a function of frequency48. SFC can also be used to evaluate synchronized activity between distant brain regions, as a marker of neuronal communication34,49,50,51,52. IN-Brainstorm features the spike-field coherence estimator proposed by Fries53. The user can derive SFC estimates for each GUI-selected neuron, for all electrodes and frequencies of interest.
Figure 8d shows SFC up to 50 Hz between a single neuron detected at channel AD07 of the example data set and the LFP traces at all the 32 channels of the probe. The time window selected around the spiking events was [−150, 150] ms. The horizontal white line indicates the electrode where the neuron was detected.
Spike-triggered average of the LFP
Spike-triggered averaging (STA) of the LFP reveals how neuronal spiking is related to the dynamics of proximal or distant LFPs54,55,56. STA proceeds with trial averaging of LFP traces time-locked to a designated neuron’s spike events, followed by normalization with the total spike count.
Analogous to spike-field coherence, STA is computed over a user-selected time window around each spiking event. STA scores are per neuron, showcasing the average LFP amplitude around the occurrence of the spikes of each neuron. STA can be visualized on topological 2-D representations of the recording array, to reveal time-locked associations between neuronal spiking activity and local or remote LFP recordings.
Figure 8e shows the STA time-locked to the firing of the first neuron detected by electrode AD01 across trials and conditions. The topographical 2-D plot is produced with IN-Brainstorm using multidimensional scaling of the actual 3-D location and geometry of the implanted probe. The LFP epoch around spike event was [−150,150] ms.
Statistical inference and machine learning
Once measures have been extracted from spiking or LFP data, tools to conduct inferential statistical analysis in the multiple dimensions of electrophysiological data (space, time, frequency, connectivity) are available from Brainstorm’s library.
Parametric (one- and two-sample tests) and nonparametric permutation tests, descriptive and distribution statistics from histograms (Q-Q plot and Shapiro-Wilk test for data normality) are available. Here too, the software architecture emphasises interoperability with other toolkits, for expanded resources. For instance, multidimensional and nonparametric cluster statistics can be run on LFP and time-frequency data, from Brainstorm, via calls to FieldTrip12.
In addition, statistical learning tools for decoding and multivariate pattern analysis (MVPA) are also available (see e.g. Cichy et al.57). The Brainstorm library also includes support vector machine (SVM) and linear discriminant analysis (LDA) classification of LFP time series based on experimental events and conditions.
Hardware acceleration in the processing of long recordings is enabled by Matlab’s standard parallel computing (e.g., multi-core) features, which are controlled directly from Brainstorm’s GUI. Flexible management of memory resources is also accessible to users, with the specification of the amount of RAM allocated to data manipulations while executing the LFP extraction process. Moreover, GPU acceleration computations are enabled through Kilosort for the spike-sorting step.
Generally speaking, formal data management plans are seldom adopted by electrophysiology labs. Instead, the handling of data is typically project-based, with trainees managing their individual data collection and analyses until publication. When they move on to another project or to the next step of their career, they frequently leave data, analysis pipelines and results behind, with minimal documented organization for sustainability and knowledge transfer. This limits the long-term value of data and negatively impacts the reproducibility and verification of research results58. Brainstorm has tools to improve and facilitate data management: data is hierarchically organized by Studies, followed by Subjects/Samples and (experimental) Conditions, which point to data elements such as links to raw data files, single-trial epochs, sample statistics, and other derivatives: power spectra, wavelet decompositions, measures of cross-frequency coupling and inter-regional connectivity, etc. As with all features in the application, user interactions with Brainstorm’s data organization are facilitated both by the application’s GUI and direct access via scriptable functions using Matlab code.
Another important aspect of Brainstorm is its capacity for importing entire data repositories at once, with associated metadata, when those datasets are organized according to the emergent Brain Imaging Data Structure (BIDS). Originally driven by the neuroimaging community, BIDS is a grassroots effort to harmonize data organization and documentation59. BIDS has recently been extended to MEG electrophysiology60 and is presently integrating EEG61, and invasive neurophysiology62.
The software has a specific GUI for assembling data processing pipelines in an intuitive manner, choosing elementary processes from the (IN-)Brainstorm library and assembling them together into a logical progression along the workflow. These pipelines enable the reproduction of any data workflow with a click of a button. They can also be shared in Matlab format with collaborators or the entire user community. The Matlab code for pipelines can also be generated automatically by Brainstorm e.g., for execution in headless (no GUI) mode on high-performance computing servers and cloud resources.
We provide a free, extensive open-source software application for invasive electrophysiology. IN-Brainstorm is built on the foundations of Brainstorm, which was originally designed for human multimodal electrophysiology and imaging. IN-Brainstorm supports multiple data formats of raw signals from a variety of acquisition systems. The recorded traces and their LFP versions can be reviewed, quality-controlled and processed within a unique analytical environment, with easy GUI interactions, rich visualization, intuitive pipeline editing for scripting and sharing. We have built bridges for IN-Brainstorm to interoperate seamlessly with established, free spike-sorting tools.
A specific emphasis was put on providing versatile solutions for multidimensional data visualization, including 2-D and 3-D topographical plots registered to structural anatomy from co-registered MRI data. Source modeling of array data is also available using boundary element modeling of head and brain tissues63,64 and a variety of source modeling techniques available in Brainstorm65. Videos synchronised to electrophysiological traces can also be imported and visualized simultaneously in synchrony, for marking behavioral events.
The software is supported by an expansive online documentation (with tutorial data) and online user forum. The active Brainstorm user community contributes to an efficient peer-reviewing/debugging process, and daily updates deliver bug fixes and software improvements that are readily available to the users.
With IN-Brainstorm, electrophysiologists are provided a free, integrated software environment that promotes and facilitates harmonized principles of data management, methods, documentation, code verification and reproducibility of data analyses. Such practical and user-friendly tools also accelerate the education of electrophysiologist trainees and promotes the adoption and expansion of data harmonization efforts, such as BIDS and Neurodata Without Borders.
Every instance of data processing is logged, with the filenames of the data used and time stamps of execution. These simple, yet powerful features document the provenance of data derivatives and analysis results. Custom IN analysis pipelines assembled for elementary processing blocks of the software’s library can be shared with collaborators, publishers and the scientific community. Pipelines are constructed via the GUI and saved as Matlab files. The open-source code of IN-Brainstorm is thoroughly documented, verifiable and can benefit from contributions from any user via GitHub. Sharing is further encouraged and facilitated by Brainstorm’s data organization in Studies, which can be zipped for archiving, exportation (e.g., as a BIDS repository) or importation into the Brainstorm environment of a collaborator. Batch processing of multiple data volumes is automated, thanks to the systematic organization of Brainstorm’s file system and can be executed on high-performance computing servers without requiring GUI interactions.
For all these reasons, we believe that IN-Brainstorm responds to an unmet need of the electrophysiology community. By providing a unique environment with a common set of analytical tools, the application also provides a unique bridge between recording scales, data types and researchers, and additionally, between the methods used in human, animal and slice preparations. It also represents a scalable framework to developments and integration of existing or future tools and data formats for the entire field of electrophysiology.
The dataset that was used for showcasing this toolbox, is available as part of the tutorial for the toolbox’s features: https://neuroimage.usc.edu/brainstorm/e-phys/Introduction.
The toolbox can be acquired as part of Brainstorm’s GitHub repository: https://github.com/brainstorm-tools/brainstorm3.
Abraham, A. et al. Machine learning for neuroimaging with scikit-learn. Front. Neuroinformatics 8, 14 (2014).
Gorgolewski, K. et al. Nipype: A Flexible, Lightweight and Extensible Neuroimaging Data Processing Framework in Python. Front. Neuroinformatics 5, 13 (2011).
Gramfort, A. et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 7, 267 (2013).
Gramfort, A. et al. MNE software for processing MEG and EEG data. NeuroImage 86, 446–460 (2014).
Hanke, M. et al. PyMVPA: a unifying approach to the analysis of neuroscientific data. Front. Neuroinformatics 3, 3 (2009).
Tadel, F., Baillet, S., Mosher, J. C., Pantazis, D. & Leahy, R. M. Brainstorm: A User-Friendly Application for MEG/EEG Analysis. Comput. Intell. Neurosci, 2011, 879716 (2011).
Baillet, S., Friston, K. & Oostenveld, R. Academic Software Applications for Electromagnetic Brain Mapping Using MEG and EEG. Computational Intelligence and Neuroscience 2011, 972050 (2011).
Fee, M. S., Mitra, P. P. & Kleinfeld, D. Automatic sorting of multiple unit neuronal signals in the presence of anisotropic and non-Gaussian variability. J. Neurosci. Methods 69, 175–188 (1996).
Hazan, L., Zugaro, M. & Buzsáki, G. Klusters, NeuroScope, NDManager: a free software suite for neurophysiological data processing and visualization. J. Neurosci. Methods 155, 207–216 (2006).
Hill, D. N., Mehta, S. B. & Kleinfeld, D. Quality metrics to accompany spike sorting of extracellular signals. J. Neurosci. Off. J. Soc. Neurosci. 31, 8699–8705 (2011).
Mitra, P. & Bokil, H. Observed Brain Dynamics. (Oxford University Press, 2007).
Oostenveld, R., Fries, P., Maris, E. & Schoffelen, J.-M. FieldTrip: Open Source Software for Advanced Analysis of MEG, EEG, and Invasive Electrophysiological Data. Computational Intelligence and Neuroscience 2011, 156869 (2011).
Pachitariu, M., Steinmetz, N. A., Kadir, S. N., Carandini, M. & Harris, K. D. Fast and accurate spike sorting of high-channel count probes with KiloSort. In Advances in Neural Information Processing Systems 29 (eds Lee, D. D., Sugiyama, M., Luxburg, U. V., Guyon, I. & Garnett, R.) 4448–4456 (Curran Associates, Inc., 2016).
Quiroga, R. Q., Nadasdy, Z. & Ben-Shaul, Y. Unsupervised Spike Detection and Sorting with Wavelets and Superparamagnetic Clustering. Neural Comput. 16, 1661–1687 (2004).
Siegle, J. H. et al. Open Ephys: an open-source, plugin-based platform for multichannel electrophysiology. J. Neural Eng. 14, 045003 (2017).
Stead, M. & Halford, J. J. A Proposal for a Standard Format for Neurophysiology Data Recording and Exchange. J. Clin. Neurophysiol. Off. Publ. Am. Electroencephalogr. Soc 33, 403–413 (2016).
Teeters, J. L. et al. Neurodata Without Borders: Creating a Common Data Format for Neurophysiology. Neuron 88, 629–634 (2015).
Rübel, O. et al. NWB:N 2.0: An Accessible Data Standard for Neurophysiology. bioRxiv 523035 (2019).
Gorgolewski, K. J. & Poldrack, R. A. A Practical Guide for Improving Transparency and Reproducibility in Neuroimaging Research. PLOS Biol. 14, e1002506 (2016).
Larson, M. J. & Moser, J. S. Rigor and replication: Toward improved best practices in human electrophysiology research. Int. J. Psychophysiol. 111, 1–4 (2017).
Unakafova, V. A. & Gail, A. Comparing Open-Source Toolboxes for Processing and Analysis of Spike and Local Field Potentials Data. Front. Neuroinformatics 13, 57 (2019).
Uusitalo, M. A. & Ilmoniemi, R. J. Signal-space projection method for separating MEG or EEG into components. Med. Biol. Eng. Comput. 35, 135–140 (1997).
Bell, A. J. & Sejnowski, T. J. An information-maximization approach to blind separation and blind deconvolution. Neural Comput. 7, 1129–1159 (1995).
Cardoso, J. F. High-order contrasts for independent component analysis. Neural Comput. 11, 157–192 (1999).
Quiroga, R. Q. Spike sorting. Scholarpedia 2, 3583 (2007).
Legatt, A. D., Arezzo, J. & Vaughan, H. G. Averaged multiple unit activity as an estimate of phasic changes in local neuronal activity: effects of volume-conducted potentials. J. Neurosci. Methods 2, 203–217 (1980).
Mineault, P. J., Zanos, T. P. & Pack, C. C. Local field potentials reflect multiple spatial scales in V4. Front. Comput. Neurosci 7, 21 (2013).
Zanos, T. P., Mineault, P. J. & Pack, C. C. Removal of Spurious Correlations Between Spikes and Local Field Potentials. J. Neurophysiol. 105, 474–486 (2011).
Buzsáki, G. Rhythms of the Brain. (Oxford University Press, 2006).
Fries, P., Womelsdorf, T., Oostenveld, R. & Desimone, R. The Effects of Visual Stimulation and Selective Visual Attention on Rhythmic Neuronal Synchronization in Macaque Area V4. J. Neurosci. 28, 4823–4835 (2008).
Pesaran, B., Pezaris, J. S., Sahani, M., Mitra, P. P. & Andersen, R. A. Temporal structure in neuronal activity during working memory in macaque parietal cortex. Nat. Neurosci. 5, 805–811 (2002).
Wilke, M., Logothetis, N. K. & Leopold, D. A. Local field potential reflects perceptual suppression in monkey visual cortex. Proc. Natl. Acad. Sci. 103, 17507–17512 (2006).
Womelsdorf, T., Fries, P., Mitra, P. P. & Desimone, R. Gamma-band synchronization in visual cortex predicts speed of change detection. Nature 439, 733–736 (2006).
Fries, P. A mechanism for cognitive dynamics: neuronal communication through neuronal coherence. Trends Cogn. Sci. 9, 474–480 (2005).
Fries, P., Schröder, J.-H., Roelfsema, P. R., Singer, W. & Engel, A. K. Oscillatory neuronal synchronization in primary visual cortex as a correlate of stimulus selection. J. Neurosci. Off. J. Soc. Neurosci. 22, 3739–3754 (2002).
Canolty, R. T. et al. High Gamma Power Is Phase-Locked to Theta Oscillations in Human Neocortex. Science 313, 1626–1628 (2006).
Samiee, S. & Baillet, S. Time-resolved phase-amplitude coupling in neural oscillations. NeuroImage 159, 270–279 (2017).
Krause, M. R. et al. Transcranial Direct Current Stimulation Facilitates Associative Learning and Alters Functional Connectivity in the Primate Brain. Curr. Biol. 27, 3086–3096.e3 (2017).
Fischl, B., Liu, A. & Dale, A. M. Automated manifold surgery: constructing geometrically accurate and topologically correct models of the human cerebral cortex. IEEE Trans. Med. Imaging 20, 70–80 (2001).
Zohary, E., Shadlen, M. N. & Newsome, W. T. Correlated neuronal discharge rate and its implications for psychophysical performance. Nature 370, 140–143 (1994).
Eyherabide, H. G. & Samengo, I. When and Why Noise Correlations Are Important in Neural Decoding. J. Neurosci. 33, 17921–17936 (2013).
Abbott, L. F. & Dayan, P. The effect of correlated variability on the accuracy of a population code. Neural Comput. 11, 91–101 (1999).
Averbeck, B. B., Latham, P. E. & Pouget, A. Neural correlations, population coding and computation. Nat. Rev. Neurosci. 7, 358–366 (2006).
Liu, L. D., Haefner, R. M. & Pack, C. C. A neural basis for the spatial suppression of visual motion perception. eLife 5, e16167 (2016).
Panzeri, S., Schultz, S. R., Treves, A. & Rolls, E. T. Correlations and the encoding of information in the nervous system. Proc. R. Soc. B Biol. Sci. 266, 1001–1012 (1999).
Sompolinsky, H., Yoon, H., Kang, K. & Shamir, M. Population coding in neuronal systems with correlated noise. Phys. Rev. E Stat. Nonlin. Soft Matter Phys 64, 051904 (2001).
Cui, Y., Liu, L. D., McFarland, J. M., Pack, C. C. & Butts, D. A. Inferring Cortical Variability from Local Field Potentials. J. Neurosci. Off. J. Soc. Neurosci. 36, 4121–4135 (2016).
Arce-McShane, F. I., Sessle, B. J., Ross, C. F. & Hatsopoulos, N. G. Primary sensorimotor cortex exhibits complex dependencies of spike-field coherence on neuronal firing rates, field power, and behavior. J. Neurophysiol. 120, 226–238 (2018).
Gregoriou, G. G., Gotts, S. J., Zhou, H. & Desimone, R. High-Frequency, Long-Range Coupling Between Prefrontal and Visual Cortex During Attention. Science 324, 1207–1210 (2009).
Liebe, S., Hoerzer, G. M., Logothetis, N. K. & Rainer, G. Theta coupling between V4 and prefrontal cortex predicts visual short-term memory performance. Nat. Neurosci. 15, 456–462 (2012).
Singer, W. Neuronal Synchrony: A Versatile Code for the Definition of Relations? Neuron 24, 49–65 (1999).
Womelsdorf, T. et al. Modulation of Neuronal Interactions Through Neuronal Synchronization. Science 316, 1609–1612 (2007).
Fries, P., Reynolds, J. H., Rorie, A. E. & Desimone, R. Modulation of Oscillatory Neuronal Synchronization by Selective Visual Attention. Science 291, 1560–1563 (2001).
Jin, J. Z. et al. On and off domains of geniculate afferents in cat primary visual cortex. Nat. Neurosci. 11, 88–94 (2008).
Nauhaus, I., Busse, L., Carandini, M. & Ringach, D. L. Stimulus contrast modulates functional connectivity in visual cortex. Nat. Neurosci. 12, 70–76 (2009).
Ray, S. & Maunsell, J. H. R. Network Rhythms Influence the Relationship between Spike-Triggered Local Field Potential and Functional Connectivity. J. Neurosci. 31, 12674–12682 (2011).
Cichy, R. M., Pantazis, D. & Oliva, A. Resolving human object recognition in space and time. Nat. Neurosci. 17, 455 (2014).
Baker, M. 1,500 scientists lift the lid on reproducibility. Nat. News 533, 452 (2016).
Gorgolewski, K. J. et al. The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments. Sci. Data 3, 160044 (2016).
Niso, G. et al. MEG-BIDS, the brain imaging data structure extended to magnetoencephalography. Sci. Data 5, 180110 (2018).
Pernet, C. R. et al. EEG-BIDS, an extension to the brain imaging data structure for electroencephalography. Sci. Data 6, 1–5 (2019).
Holdgraf, C. et al. iEEG-BIDS, extending the Brain Imaging Data Structure specification to human intracranial electrophysiology. Sci. Data 6, 1–6 (2019).
Gramfort, A., Papadopoulo, T., Olivi, E. & Clerc, M. OpenMEEG: opensource software for quasistatic bioelectromagnetics. Biomed. Eng. OnLine 9, 45 (2010).
Kybic, J. et al. A common formalism for the Integral formulations of the forward EEG problem. IEEE Trans. Med. Imaging 24, 12–28 (2005).
Baillet, S., Mosher, J. C. & Leahy, R. M. Electromagnetic brain mapping. IEEE Signal Process. Mag. 18, 14–30 (2001).
Liu, L. D., Miller, K. D. & Pack, C. C. A Unifying Motif for Spatial and Directional Surround Suppression. J. Neurosci. 38, 989–999 (2018)
Liu, L. D. & Pack, C. C. The Contribution of Area MT to Visual Motion Perception Depends on Training. Neuron 95, 436–446.e3 (2017).
Krause, M. R., Vieira, P. G., Csorba, B. A., Pilly, P. K. & Pack, C. C. Transcranial alternating current stimulation entrains single-neuron activity in the primate brain. Proc. Natl. Acad. Sci 116, 5747–5755 (2019).
We are grateful to Dr. Matthew Krause, Dr. Pedro Vieira, Dr. Christos Gkogkas, Bennet Csorba, Nardin Nakhla and Yavar Korkian for providing datasets. Dr. Shahab Bakhtiari for his input in data analysis. We also thank Elizabeth Bock for early testing of the tools featured. We also extend acknowledgments to Dr. Michael Petrides, Sebastien Tremblay and Veronika Zlatkina for their input. This work was supported by a Molson Neuro-Engineering Scholarship (the Molson Foundation) to K.N., by grants from the National Science and Engineering Research Council of Canada (NSERC 436355-13 to S.B. and 341534-2012 to C.C.P.), the National Institutes of Health (NIH-1R01EB026299) and the Brain Canada Foundation (PSG15-3755) to S.B.
The authors declare no competing interests.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Nasiotis, K., Cousineau, M., Tadel, F. et al. Integrated open-source software for multiscale electrophysiology. Sci Data 6, 231 (2019). https://doi.org/10.1038/s41597-019-0242-z