NeuroPycon: An open-source python toolbox for fast multi-modal and reproducible brain connectivity pipelines

David Meunier, Annalisa Pascarella, Dmitrii Altukhov, Mainak Jas, Etienne Combrisson, Tarek Lajnef, Daphné Bertrand-Dubois, Vanessa Hadid, Golnoush Alamian, Jordan Alves, Fanny Barlaam, Anne-Lise Saive, Arthur Dehgan, Karim Jerbi

TL;DR

NeuroPycon is a new open-source Python toolbox designed to streamline and standardize the analysis of complex, multi-modal brain data (MEG, EEG, fMRI). By leveraging the NiPype framework, it offers reproducible, shareable pipelines for advanced connectivity and graph-theoretical analyses, significantly reducing the complexity and time required for such research.

What Problem Does This Paper Address?

Reproducible research is a major goal in neuroscience, but it's often hindered by the sheer diversity of analysis tools, custom scripts, and the difficulty in tracking all the parameters used. This is particularly true for multi-modal brain data (like MEG, EEG, and fMRI), where analyses can involve numerous software packages and programming languages, making it incredibly challenging to replicate findings. The authors aim to solve this by providing a unified, flexible, and efficient framework that integrates existing tools into reproducible pipelines.

Methods

NeuroPycon is built upon the NiPype framework, which acts as a wrapper for various neuroimaging software. Instead of reimplementing algorithms, NeuroPycon integrates existing, well-established tools into a common Python environment. Key components include:

  • ephypype: Focuses on electrophysiology (MEG/EEG) data, offering pipelines for import, preprocessing (including artifact removal), source reconstruction, and spectral connectivity analysis.
  • graphpype: Specializes in graph-theoretical analysis of neuroimaging data, primarily using the radatools library for network metrics and modular partitions.
  • Command-Line Interface (CLI): A user-friendly interface that allows for on-the-fly pipeline creation and execution, simplifying the process of running analyses on large datasets.
  • Shareable Parameter Files (JSON): These files meticulously document all analysis parameters, ensuring that pipelines can be easily replicated by others.
  • Caching Mechanism (via NiPype): This feature significantly speeds up analyses by recomputing only the parts of a pipeline that have changed if an error occurs or if parameters are modified.
  • Multiprocessing: Leverages multi-core processors and clusters for parallel processing, crucial for handling large datasets.

Datasets

The paper mentions using data from the OMEGA project for demonstrating the preprocessing and source reconstruction pipelines. This dataset consists of simultaneous MEG/EEG recordings from 19 healthy participants performing a visual recognition task. The data was acquired using an Elekta Neuromag Vectorview 306 system and follows the BIDS specification. The authors also refer to replicating results from Jas et al. (2018), which used a similar open dataset.

Key Insights and Ideas

  • Unified Framework for Multi-Modal Data: NeuroPycon bridges the gap between different neuroimaging modalities (MEG, EEG, fMRI) by providing a single environment for analysis, which is crucial for multimodal fusion and comparison.
  • Reproducibility through Parameterization: The use of shareable JSON parameter files is a cornerstone for ensuring that analyses can be precisely replicated, addressing a major challenge in scientific research.
  • Efficiency via NiPype: By building on NiPype, NeuroPycon inherits powerful features like multiprocessing and caching, dramatically speeding up complex analyses and making them more robust to errors.
  • Modularity and Extensibility: The pipeline-based design, where each step is a "node," allows for flexible construction of complex workflows and makes it easier to integrate new tools or algorithms in the future.
  • Democratizing Advanced Analysis: The CLI and well-documented pipelines make sophisticated analysis techniques, previously requiring deep programming knowledge, accessible to a wider range of researchers.

Key Results

  • Reproducible Analysis Replication: The authors successfully replicated the group analysis results from Jas et al. (2018) using NeuroPycon, demonstrating its ability to reproduce published findings.
  • Computational Efficiency: The caching mechanism provided by NiPype significantly impacts analysis speed, especially when errors occur, as only modified nodes need recomputation.
  • Flexibility in Pipeline Construction: The paper illustrates various pipeline examples, from basic preprocessing to complex graph analysis, showcasing the toolkit's versatility.
  • Successful Integration of Tools: NeuroPycon effectively wraps and integrates established tools like MNE-Python and Radatools, providing a seamless user experience.

Limitations and Future Work

  • Limited Wrapped Packages: The authors acknowledge that currently, only a limited number of packages are wrapped. They hope the community will contribute to expanding this functionality.
  • BIDS Compatibility: Future development includes making NeuroPycon fully BIDS-compatible, ensuring that input data and intermediate outputs adhere to the BIDS derivative specification.
  • Automatic Co-registration: Automatic co-registration of MRI and MEG/EEG data is planned for future implementation, as this is currently a manual step.
  • Expanded Visbrain Integration: While Visbrain is used for visualization, its capabilities are currently considered post-processing steps. Future work may involve integrating Visbrain capabilities into standardized reports.
  • Multimodal Fusion: Future developments aim to enhance the fusion of multi-modal data, such as MEG and fMRI, or intracranial EEG and fMRI.

Summary updated

Abstract

Highlights•NeuroPycon is a open-source and efficient multi-modal brain data analysis toolkit.•It provides a unifying framework to seamlessly combine and compare existing tools.•Provided pipelines go from raw data to high-end connectivity and graph analyses.•The use of Nipype engine allows for caching, embedded multi-processing and reporting.•NeuroPycon provides a framework to facilitate reproducibility and method sharing.
BibTeX
@article{meunier2020neuropycon,
  author = {David Meunier and Annalisa Pascarella and Dmitrii Altukhov and Mainak Jas and Etienne Combrisson and Tarek Lajnef and Daphné Bertrand-Dubois and Vanessa Hadid and Golnoush Alamian and Jordan Alves and Fanny Barlaam and Anne-Lise Saive and Arthur Dehgan and Karim Jerbi},
  title = {{NeuroPycon: An open-source python toolbox for fast multi-modal and reproducible brain connectivity pipelines}},
  journal = {NeuroImage},
  year = {2020},
  doi = {10.1016/j.neuroimage.2020.117020},
}

Loading related content...

Figure