Douwe John Horsthuis 2024-02-28
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 [email protected]
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.
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)
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
See the open issues for a list of proposed features (and known issues).
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
5/7/2021 - adding C_manual_check 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
D_reref_exclextrn_avgref_ica_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.
Distributed under the MIT License. See LICENSE for more information.
Douwe John Horsthuis - @douwejhorsthuis - [email protected]
Project Link: https://github.com/DouweHorsthuis/EEG_to_ERP_pipeline_stats_R
- Ana Francisco Who created the basis for this pipeline and took the time to explain everything in detail.
- Filip De Sanctis
- Sophie Molholm