EEG Pasteurization Pipeline: Automatic preprocessing of BIDS-compliant EEG datasets
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
- High-pass filter (default: 0.25Hz): removing slow drifts
- PREP pipeline (using the pyprep package): detecting bad channels and interpolating them while re-referencing to a robust common average
- Notch filtering: removing line noise
- ICA (using the mne-icalabel to classify components): removing eye movements, heart beat and/or muscle artifacts
- Low-pass filter (default: 40Hz): removing high-frequency activities
- ASR clean_window function (using the meegkit package): annotating remaining artifacts on the continuous signal
- Interpolate remaining bad channels
- Saving the EEG signal in the BIDS format
- 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)
- Bad channels detection: using pyprep NoisyChannels (without RANSAC)
- Line noise levels: Signal-to-Noise ratio of the line noise (50/60Hz)
- Epoch rejection rate: what proportion of 1-second epochs would be rejected with a 150µV threshold?
- 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