Published April 17, 2026 | Version 1.0.0
Software Open

EEG Pasteurization Pipeline: Automatic preprocessing of BIDS-compliant EEG datasets

Authors/Creators

  • 1. Institut de l'Audition

Description

EEG Pasteurization Pipeline

This repository allows to perform automatic EEG preprocessing using Python and the MNE ecosystem.

Created by Rémy MASSON (remy.masson[at]pasteur.fr)

About the project

Manual cleaning (preprocessing) of large EEG datasets is often unfeasible because of time, consistency and reproducibility constraints. However, MNE does not offer a simple option to automatically preprocess EEG signals without manual intervention.

The goal of this project is to reproduce automatic EEG preprocessing pipelines available with EEGLAB on MATLAB, on Python and MNE. The preprocessing steps are heavily inspired from toolboxes such as Automagic, DISCOVER-EEG or EEGLAB clean_rawdata.

The script takes as input a BIDS database containing EEG recordings and produces preprocessed EEG signals, saved in a BIDS-compliant manner within a 'derivatives' subfolder. HTML reports on EEG preprocessing are produced for each recording.

Additionally, quality control metrics can be calculated for both raw and preprocessed EEG.

Processing steps

  1. High-pass filter (default: 0.25Hz): removing slow drifts
  2. PREP pipeline (using the pyprep package): detecting bad channels and interpolating them while re-referencing to a robust common average
  3. Notch filtering: removing line noise
  4. ICA (using the mne-icalabel to classify components): removing eye movements, heart beat and/or muscle artifacts
  5. Low-pass filter (default: 40Hz): removing high-frequency activities
  6. ASR clean_window function (using the meegkit package): annotating remaining artifacts on the continuous signal
  7. Interpolate remaining bad channels
  8. Saving the EEG signal in the BIDS format
  9. Producing a HTML report

You will be able to change some of the chosen parameters through the GUI at the beginning.

Quality control steps (work in progress)

  1. Bad channels detection: using pyprep NoisyChannels (without RANSAC)
  2. Line noise levels: Signal-to-Noise ratio of the line noise (50/60Hz)
  3. Epoch rejection rate: what proportion of 1-second epochs would be rejected with a 150µV threshold?
  4. Heatmap of signal amplitude: for visualization purposes

Outputs include a PNG figure per recording and a CSV table summarizing results for all recordings.

Files

eeg-pasteurization-pipeline-master.zip

Files (15.3 kB)

Name Size Download all
md5:142b391f3dd59a3349798c0c482f71a6
15.3 kB Preview Download

Additional details

Software

Repository URL
https://gitlab.pasteur.fr/rmasson/eeg-pasteurization-pipeline
Programming language
Python
Development Status
Active