Skip to content
Kevin Tan edited this page Jun 10, 2016 · 91 revisions

Kevin Tan's EEGLAB pipeline performs ICA-based EEG preprocessing and source-localization. The pipeline is designed for ERP analyses, but can be modified for any epoch-based analyses, such as ERSP and single-trial classification. Preprocessing is fully-automated, while source localization can be fully- or semi-automated.

Extensive algorithmic description can be found on the pages to the right. Code can be downloaded here for illustrative purposes only – not actively maintained!

Use of this pipeline in a source-space ERP paradigm can be found in Tan & Tarr (2016).

Table of Contents

Overview

Epoched EEG data before (left) and after (right) artifactual IC subtraction in stage 3 of the pipeline. IC subtraction has cleaned EOG, muscle, and other artifacts from the data.

The pipeline contains three stages: 1) PREP for early-stage preprocessing 2) ICA decomposition and source localization 3) late-stage preprocessing that readies data for further analyses (e.g. EEGLAB's study structure). The 2nd and 3rd stages are run separately so that data processing can be optimized for each purpose.

This guide and its code are tailored for .bdf recordings from Carnegie Mellon University Psychology's BioSemi. It has been tested on CNBC's Psych-O cluster, using Matlab 2013a (should work up to Matlab 2014a).

This pipeline is very computationally intensive, and requires the use of an HPC cluster. Using 36 threads, a 1hr EEG recording (136ch @ 512Hz) takes 12hr+ to complete. For faster preprocessing, there are less intensive pipelines available.

Theoretical Background

This pipeline uses Independent Components Analysis (ICA) for artifact rejection and source localization.

ICA is a blind signal separation technique that is widely used to decompose distinct neurogenic and artifactual sources of EEG activity (Delorme et al., 2007, 2012). Independent components (ICs) have been shown to arise from synchronous activity in distinct cortical patches, despite being blind to electrode locations and source conduction patterns (Hild & Nagarajan, 2009; Głąbska et al., 2014). As such, neurogenic IC sources are accurately modeled using one (lateralized) or two (bilateralized) equivalent dipoles. Moreover, equivalent dipole fitting of ICs results in much lower residual variance compared to fitting of non-decomposed data (e.g. ERP components or condition contrasts), suggesting greater localization accuracy (Delorme et al., 2012). In my experience, high-quality neurogenic ICs produce dipole models with residual variance ≤ 10%, sometimes ≤ 1%.

Acknowledgements

This pipeline was developed with input from Makoto Miyakoshi and Jason Palmer at UCSD, as well as the EEGLAB mailing list.

Many ideas here were derived from Makoto's pipeline and EEGLAB documentation. Check them out!

Legal Disclaimer

Use this pipeline at your own risk! The author makes no claims or guarantees related to the content herein. The author is not liable for any unfavorable outcomes that may result.

Content herein should not be used for medical purposes.