MNE-BIDS: Organizing electrophysiological data into the BIDS format and facilitating their analysis

Stefan Appelhoff, Matthew Sanderson, Teon Brooks, Marijn van Vliet, Romain Quentin, Chris Holdgraf, Maximilien Chaumon, Ezequiel Mikulan, Kambiz Tavabi, Richard Höchenberger, Dominik Welke, Clemens Brunner, Alexander Rockhill, Eric Larson, Alexandre Gramfort, Mainak Jas, Clemens Brunner 0001J. Open Source Softw 2019 · DOI · DBLP

Introduction

In the field of neuroimaging, data management has historically been characterized by a lack of standardization. Different laboratories, and often individual researchers within the same lab, employ disparate folder structures, file naming conventions, and metadata storage methods. This inconsistency creates significant barriers to data sharing and makes the implementation of automated, large-scale analysis pipelines nearly impossible.

The Brain Imaging Data Structure (BIDS) was introduced to address these challenges by providing a universal standard for organizing and describing neuroimaging datasets. However, the manual conversion of raw electrophysiological data—including Magnetoencephalography (MEG), Electroencephalography (EEG), and Intracranial Electroencephalography (iEEG)—into BIDS format is a labor-intensive and error-prone process. MNE-BIDS was developed as an open-source Python library to automate this transition, providing a programmable bridge between raw data and standardized formats.

The MNE-BIDS Framework

MNE-BIDS serves as a dedicated software interface that facilitates the creation and management of BIDS-compliant datasets. It offers both a stable Application Programming Interface (API) for integration into Python scripts and a Command-Line Interface (CLI) for broader accessibility. By leveraging the existing MNE-Python ecosystem, the tool allows researchers to maintain their existing workflows while ensuring their data meets modern open-science standards.

The core philosophy of MNE-BIDS is that programmability is essential for reproducibility. By scripting the data organization process, researchers ensure that every step is documented and repeatable, eliminating the human error associated with manual file manipulation.

Technical Features and Capabilities

The library provides several critical functions for data standardization:

  • Automated Conversion and Organization: MNE-BIDS re-organizes raw data files into the specific folder hierarchies and naming schemes required by the BIDS specification.
  • Metadata Integration: The software automatically generates the necessary Javascript Object Notation (JSON) and tab-separated value (TSV) files. These sidecar files store essential experimental parameters and channel information in a machine-readable format.
  • Validation and Compliance: To ensure that the output meets international standards, all conversion routines are tested against the official BIDS validator.
  • Participant Privacy: The tool includes specialized functions for "defacing" T1-weighted anatomical MRI images. This process removes identifiable facial features, a crucial step for protecting participant privacy before data is shared publicly.
  • Coordinate Mapping: For researchers performing source localization, MNE-BIDS facilitates the saving of anatomical landmark coordinates. This is vital for coregistering MEG/EEG sensor data with MRI scans.

Impact on the Research Ecosystem

MNE-BIDS significantly improves the efficiency of neuroimaging workflows. The authors report that the software allows for the conversion of entire datasets in a matter of minutes, a process that previously required hours of manual labor. This efficiency gain is a major incentive for labs to adopt standardized data structures.

Beyond simple conversion, MNE-BIDS acts as an enabler for a wider ecosystem of "BIDS-compatible" software. Once data is standardized, it can be seamlessly processed by automated pipelines such as the MNE-study-template, which can perform end-to-end analysis with minimal manual intervention. The library has also become a core dependency for other tools, including Biscuit, a graphical user interface for BIDS management.

Conclusion

MNE-BIDS represents a significant step forward in the standardization of electrophysiological data. By providing a robust, community-driven tool for BIDS conversion, it lowers the barrier to entry for open-science practices. As the BIDS standard continues to evolve to include new modalities and metadata fields, MNE-BIDS remains a critical component of the neuroimaging software landscape, ensuring that data remains accessible, interoperable, and reproducible.

Summary updated

BibTeX
@article{appelhoff2019mne,
  author = {Stefan Appelhoff and Matthew Sanderson and Teon Brooks and Marijn van Vliet and Romain Quentin and Chris Holdgraf and Maximilien Chaumon and Ezequiel Mikulan and Kambiz Tavabi and Richard Höchenberger and Dominik Welke and Clemens Brunner and Alexander Rockhill and Eric Larson and Alexandre Gramfort and Mainak Jas and Teon L Brooks and Clemens Brunner and Alexander P. Rockhill and Eric B. Larson},
  title = {{MNE-BIDS: Organizing electrophysiological data into the BIDS format and facilitating their analysis}},
  journal = {J. Open Source Softw.},
  year = {2019},
  doi = {10.21105/joss.01896},
}
Figure