https://github.com/cognitiveneurolab/pipeline_eeg_to_erp_eeglab_stats_r
General pipeline used for analyzing EEG data where Raw EEG data gets transformed into ERPS and Stats are done in R (Mixed effects models)
https://github.com/cognitiveneurolab/pipeline_eeg_to_erp_eeglab_stats_r
Science Score: 41.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: sciencedirect.com, springer.com, nature.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Keywords
Repository
General pipeline used for analyzing EEG data where Raw EEG data gets transformed into ERPS and Stats are done in R (Mixed effects models)
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
EEG pipeline
Douwe John Horsthuis 2024-02-28

EEG pipeline using EEGlab
This EEG pipeline is made to analyze data collected with a biosemi system, using however many channels you want. There are several cleaning steps (e.g. channel rejection, ICA, epoch rejection) after which stats can be done using R studio. This pipeline contains several scripts, organized alphabetically. Each script runs a loop on all the participants, making sure that the same steps are taken for each participant. The reason it is not one big script is, because after running each script it would be a good moment to check if you are happy with the data.
All plots are made using the average data of 38 controls participants while they are doing a go-no-go task.
If you have questions or suggestions please reach out to douwehorsthuis@gmail.com
For in dept explanations check the WIKI
About The Project
This EEG pipeline is made to analyze data collected with a biosemi system, using however many channels you want. There are several cleaning steps (e.g. channel rejection, ICA, epoch rejection) after which stats can be done using R studio. It is scalable to multiple groups and variables such as filter strength, and rejection thresholds are changeable, but are pre-tested and worked for multiple publications.
Built With
Publications
The following are the papers that we published using this pipeline.
Francisco, A. A., Berruti, A. S., Kaskel, F. J., Foxe, J. J., & Molholm, S. (2021). Assessing the integrity of auditory processing and sensory memory in adults with cystinosis (CTNS gene mutations). Orphanet Journal of Rare Diseases, 16(1), 1-10. (unique settings: re-referenced to TP8 and epochs are −100 to 400ms using a baseline of −50 to 0ms.)
Francisco, A. A., Foxe, J. J., Horsthuis, D. J., DeMaio, D., & Molholm, S. (2020). Assessing auditory processing endophenotypes associated with Schizophrenia in individuals with 22q11. 2 deletion syndrome. Translational psychiatry, 10(1), 1-11 (unique settings: re-referenced to TP8 and epochs are −100ms to 400ms using a baseline of −100ms to 0ms)
Francisco, A. A., Horsthuis, D. J., Popiel, M., Foxe, J. J., & Molholm, S. (2020). Atypical response inhibition and error processing in 22q11. 2 Deletion Syndrome and schizophrenia: Towards neuromarkers of disease progression and risk. NeuroImage: Clinical, 27, 102351. (unique settings: 0.1 Hz high pass filter (0.1 Hz transition bandwidth, filter order 16896) and epochs are −100 ms to 1000 using a baseline of −100 ms to 0 ms)
Francisco, A. A., Foxe, J. J., Horsthuis, D. J., & Molholm, S. (2020). Impaired auditory sensory memory in Cystinosis despite typical sensory processing: A high-density electrical mapping study of the mismatch negativity (MMN). NeuroImage: Clinical, 25, 102170. (unique settings: re-referenced to TP8 and epochs are −100ms to 400ms using a baseline of −100ms to 0ms)
Visual representation of the pipeline

Pipeline order
Here we describe the order of the scripts. The order is obvious sometimes (for example there is no way to do anything without the first script), but less so in other moments (for example, when do you interpolate channels). For more in-dept explanations see Pipeline extended, or click on the step you want to know more about, and you will be send to the wiki page for more info.
merging and creating a set
extention
Cleaning
Optional
Downsampling
Filtering
general
Filtering in
dept
Adding channel
info
Deleting channels
automatic
Deleting channels
manual
Interpolation
Average
reference
PCA
ICA
Delete bad components
IC
re-referencing
(optional)
Epoching
Reaction
time
Grandmeans
Dashboards
All explanations are in the process of being moved to the wiki page
Issues
See the open issues for a list of proposed features (and known issues).
Contributing
Please contact me if you see anything in this pipeline that you think
could be improved. I’m always looking to improve the pipeline!
Back to top
Updates
5/7/2021 - adding Cmanualcheck script +
biosemi160sfp file
6/17/2021- updating the re-referencing situation. We used to do this in
the first script when loading the BDF file, but this caused problems
<<<<<<< HEAD with flat channels not being flat anymore.
6/17/2021 - updating
Drerefexclextrnavgrefica_autoexcom,only
deleting eye-components from now on.
10/17/2022 - Working on a QA dashboard that will show you both
individual subject and group related information to see without hassle
how your data look
12/20/2022 - Added a script that is optional so that you can see how
much data get’s deleted when you clean your data and what would be the
best settings for your data. 2/14/2024 - major update to get everything
smoothed out. All programs should run without issues. There is a
visualization step at the end. There is now a reaction time script.
2/28/2024 - major update where all the scripts are re-written in a way
that they flawlessly should run together while being adaptable without
having to change the underling code.
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Douwe John Horsthuis - @douwejhorsthuis - douwehorsthuis@gmail.com
Project Link: https://github.com/DouweHorsthuis/EEG_to_ERP_pipeline_stats_R
Acknowledgements
- Ana Francisco Who created the basis for this pipeline and took the time to explain everything in detail.
- Filip De Sanctis
- Sophie Molholm
Owner
- Name: CNL
- Login: CognitiveNeuroLab
- Kind: organization
- Repositories: 8
- Profile: https://github.com/CognitiveNeuroLab
Shared Github of CNL Bronx and CNL Rochester
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Horsthuis" given-names: "Douwe J" orcid: "https://orcid.org/0000-0002-9711-5423" - family-names: "Molholm" given-names: "Sophie" orcid: "https://orcid.org/0000-0003-1870-7306" - family-names: "Foxe" given-names: "John J" orcid: "https://orcid.org/0000-0002-4300-3098" - family-names: "Francisco" given-names: "Ana A" orcid: "https://orcid.org/0000-0003-4030-0297" title: "EEG_to_ERP_pipeline_stats_R" version: 2.2 DOI: 10.5281/zenodo.10798894 date-released: 2024-3-8 url: "https://github.com/DouweHorsthuis/EEG_to_ERP_pipeline_stats_R"