LNS automated Matlab scripts for pre-processing raw EEG signal into filtered epoched data (Filtering_epoching.m), performing Independent Components Analyses (ICA) (Comp_ICA.m), and computing ERPs after interpolation and artefacts rejection (ERPs.m).
Flexible and adaptable to all designs and folder trees.
All steps can be skiped. All default values can be modified.
A log is generated after each run to explain what was done to the files.
For more information on how to get started, please refer to the User Manual.
Script order and details:
This script filters, imports marker files (.mrk) and epochs .bdf or .set files. You can create and save your epoching parameters in a .mat file to re-load them in a future use of this script.
Filtering pipeling:
- Re-referencing
- Bandpass filtering
- Removing sinusoidal noise (CleanLine)
- Detecting blinks (Blinker)
- Non-sinusoidal noise filtering (ASR)
- Removing the blinks detected in 4.
- Applying baseline correction
At the end of the epoching process, a to_interpolate.xlsx file is generated.
You can write in it the bad channels that will have to be interpolated and load them during the ERPs script.
Do not erase the first example line of the to_interpolate.xlsx file.
This script will automatically computed ICA on all the loaded files and will prompt the user to select the components that should be rejected for each of the files. The components rejection graphical interface is based on the ICLabel display.
- Interpolate the bad channels
- Reject epochs containings artifacts while ignoring the bad channels: 80uV threshold criterion and 30uV jumps
- Compute the ERP based on averaging parameters
- Compute the average reference or reference to Cz
You can create and save your averaging parameters to re-load them in a future use of this script. If no merging condition and no events are given, each file will be averaged over all its epochs. At the end of the run, a file named Ntrials.xlsx is generated. It contains the number of epochs at the start, deleted during artifacts rejection, and in the final ERPs.
PLUGINS | Description |
---|---|
EEGLAB v14.1.2b | Main software that manages most of the preprocessing and analyses toolboxes described in the table below |
BLINKER v1.1.2 | BLINKER is an automated pipeline for detecting eye blinks in EEG and calculating various properties of these blinks |
CleanLine v1.04 | This plugin adaptively estimates and removes sinusoidal (e.g. line) noise from your ICA components or scalp channels using multi-tapering and a Thompson F-statistic |
Clean_rawdata v2 | This plugin is used solely for the vis_artifacts.m function for the ICA script |
ICLabel v1.1 | An automatic EEG independent component classifer plugin |
EEGInterp | Homemade function to compute multiquadric interpolation based on radial basis function |
Isolated functions:
The dependencies are already included in the Functions folder and loaded automatically.
Hugo Najberg
SNSF PhD student
[email protected], [email protected]
Laboratory for Neurorehabilitation Science
University of Fribourg, Switzerland
Corentin Wicht
SNSF Doc.CH PhD student
[email protected], [email protected]
Laboratory for Neurorehabilitation Science
University of Fribourg, Switzerland
H. Najberg, C.A. Wicht, autoERP, (2020), GitHub repository https://github.com/HugoNjb/autoERP
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
See the LICENSE.md file for details
PD Dr. Lucas Spierer from the University of Fribourg provided substantial support and advices regarding theoretical conceptualization as well as access to the workplace and the infrastructure required to successfully complete the project. Additionally, Dr. Michael Mouthon and Dr. Michael De Pretto provided substantial advice on the pre-processing pipeline, ergonomy and testing.
This project was supported by a grant from the Velux Foundation (Grant #1078 to LS); from the Swiss National Science Foundation (Grant #320030_175469 to LS); and from the Research Pool of the University of Fribourg to PD Dr. Lucas Spierer.