Implementing the PREP pipeline

Hey there,

Because ERP signals can be distorted by various filtering measures including notch filters, I did some research into preprocessing methods that avoid filtering and came across the PREP pipeline. I wanted to get some input from the community on this pipeline and whether it is worthy of being added into Brainstorm.

The article can be found at:


If you think this is an interesting approach and if you are interested in implementing it in Brainstorm, all contributions are welcome! I won’t have time to work on this directly, but I can guide you through the process.
The code is probably entirely in MATLAB, therefore there is not porting issue. We already have a few functions from EEGLAB, SPM and FieldTrip that are made available in Brainstorm. The work consists mainly in writing wrappers that convert the format of the inputs/outputs and then call the external functions. You can look at existing examples to see how this is done.
The full API for writing Brainstorm plugins is documented here:


Hi Brainstorm People

Did anyone implement the PREP pipeline in the end?
It looks very interesting

Thanks Tony

We did not work on this in the Brainstorm team.


Hi Tony,

One way we do this at the MNI is to run PREP pre-processing via the Automagic toolbox:

It is based on EEGLab and therefore its output can be imported into Brainstorm using our EEGLab importer.

I hope this helps,