A subscription to JoVE is required to view this content. Sign in or start your free trial.

Method Article

PIPEMAT-RS: Development and Validation of a Standardized MATLAB Pipeline for Resting-State EEG Preprocessing

1.6K views

⸱

DOI:

10.3791/68350

⸱

June 6th, 2025

 ,  ,  ,  ,  ,  ,  ,  ,  , 

* These authors contributed equally

In This Article

Summary

This protocol presents PIPEMAT-RS, a standardized MATLAB-based preprocessing pipeline for resting-state EEG data. It ensures artifact removal, improves signal quality, and enhances data reproducibility across studies. The pipeline automates key preprocessing steps, including filtering, independent component analysis (ICA), and artifact classification, facilitating consistent and reliable EEG analysis for neurophysiological research.

Abstract

Electroencephalography (EEG) is a crucial tool in neuroscience research and clinical applications, but raw EEG data often contain noise and artifacts that compromise signal quality. To address this, we developed PIPEMAT-RS, a standardized MATLAB-based preprocessing pipeline for resting-state EEG data. PIPEMAT-RS follows a structured seven-step workflow: file format conversion, EEG montage configuration, downsampling, filtering, artifact rejection, independent component analysis (ICA), and ICLabel classification for automated artifact removal. This protocol enhances EEG data quality by minimizing human intervention while maintaining high accuracy in artifact rejection. It was validated using multiple datasets, demonstrating its robustness in improving signal integrity. PIPEMAT-RS provides a systematic approach that facilitates reproducibility and reliability in EEG studies, aligning with commonly adopted practices in the field and offering a clearly documented structure that can complement existing pipelines. By standardizing EEG preprocessing, PIPEMAT-RS facilitates neurophysiological research and clinical applications, allowing for more accurate interpretations of resting-state brain activity and its associations with neurological and psychiatric conditions.

Introduction

The electroencephalogram (EEG) is a critical tool in both neuroscience research and clinical practice, offering valuable insights into brain electrical activity. Resting-state EEG data, in particular, are extensively utilized to investigate various neurological and psychiatric conditions, such as stroke, fibromyalgia, and chronic neuropathic pain. Despite its widespread application, the analysis of EEG data necessitates rigorous preprocessing to eliminate artifacts and noise, ensuring the integrity and reliability of the results1,2,3. Over the years, EEG has been invaluable i....

Access restricted. Please log in or start a trial to view this content.

Protocol

PIPEMAT-RS was developed as part of our ongoing research project, approved by the Ethics Committee of the Clinics Hospital, University of São Paulo Medical School (CAAE: 86832518.7.0000.0068). This project aims to enhance the quality and reliability of resting-state EEG data for various neurological and psychiatric studies. The data used in this study are derived from a cohort study, the protocol of which was previously published by Simis et al. (2021)31. The main study is still in progress, with data collection ongoing for the remaining clinical groups. The script for the pipeline is provided in Supplementary File 1.

....

Access restricted. Please log in or start a trial to view this content.

Results

The validation of the EEG preprocessing pipeline is essential to ensure the reliability and effectiveness of the methods employed for extracting meaningful neurophysiological data. This process involves empirical evidence from published studies, statistical assessments, and comparisons with established benchmarks in the field.

The robustness and utility of PIPEMAT-RS have been demonstrated through its successful application in several published studies spanning a range of neurological and psyc.......

Access restricted. Please log in or start a trial to view this content.

Discussion

The PIPEMAT-RS pipeline was developed to provide a standardized, efficient method for preprocessing resting-state EEG data. Critical steps in this protocol include artifact rejection and Independent Component Analysis (ICA), both of which significantly enhance the signal-to-noise ratio and ensure the extraction of meaningful neural signals. The combination of automatic artifact rejection using the clean_rawdata function and manual inspection via eegplot ensures comprehensive artifact management, balancing efficiency and .......

Access restricted. Please log in or start a trial to view this content.

Disclosures

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

Specifically, LMM was supported by a postdoctoral research grant #21/05897-5, São Paulo Research Foundation (FAPESP). AC was supported by a scientific initiation grant #21/12790-2, São Paulo Research Foundation (FAPESP). SPB was supported by a postdoctoral research grant #20/08512-4, São Paulo Research Foundation (FAPESP). FF and LRB are supported by research grant #17/12943-8, São Paulo Research Foundation (FAPESP). Individually, FF received support from NHI 2020 R01 AT, Project #1R01AT009491-01A1.

....

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
MATLAB MathWorksR2020a or newerRequired for executing the PIPEMAT-RS script.
EEG Recording SystemBrain Productshttps://www.brainproducts.com/EEG acquisition system used for data collection. Other brands  include BioSemi / ANT Neuro (or equivalent) 
EEGLAB ToolboxSwartz Center for Computational NeuroscienceN/AOpen-source MATLAB toolbox for EEG analysis.
Electrodes (Ag/AgCl)Brain Products https://www.brainproducts.com/solutions/r-net/Used in EEG data acquisition. Other brands  include BioSemi / ANT Neuro (or equivalent) 
ICLabel PluginSwartz Center for Computational NeuroscienceN/AAutomated artifact classification tool for EEG.
PIPEMAT-RS ScriptN/AN/ACustom MATLAB script for standardized EEG preprocessing.
Signal AmplifierBrain Products https://www.brainproducts.com/solutions/#amplifiersAmplifies EEG signals for processing. Other brands  include BioSemi / ANT Neuro (or equivalent) 
Standard 64-Channel EEG CapBrain Products https://www.brainproducts.com/solutions/#electrodes-capsElectrode cap for EEG recording. Other brands  include BioSemi / ANT Neuro (or equivalent) 

References

  1. Niedermeyer, E., da Silva, F. L. Electroencephalography: basic principles, clinical applications, and related fields. , Lippincott Williams and Wilkins. Philadelphia, PA. (2004).
  2. Delorme, A., Makeig, S. EEGLAB: an open-source toolbo....

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Explore More Articles

Artifact RejectionIndependent Component AnalysisICLabel ClassificationEEG Signal QualityBand Pass FilteringEEG Data CleaningNeurophysiological Research