Skip to content

Commit 6b8d5d0

Browse files
authored
Add EEGLAB course creation guidelines
Added detailed course materials and instructions for creating an EEGLAB course, including prerequisites, folder structure setup, and session content overview.
1 parent f3e9895 commit 6b8d5d0

File tree

1 file changed

+218
-0
lines changed

1 file changed

+218
-0
lines changed

workshops/create_your_own_course.md

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,221 @@ long_title: Create your own course
55
parent: Workshops
66
nav_order: 1
77
---
8+
# Create Your Own EEGLAB Course
9+
10+
This [repository](https://github.com/sccn/EEGLAB_course) contains materials for EEGLAB course sessions. This course was originally conducted at the [practical MEEG 2025 workshop](https://cuttingeeg.org/practicalmeeg2025/).
11+
12+
You may adapt the materials as needed for your own course, although please acknowledge the authors of the materials.
13+
14+
## Course Slides
15+
16+
Lecture slides for the course are available in two formats:
17+
18+
**PDF format:** Available in the [slides](slides/) folder of this repository. The following presentations are included:
19+
- Introduction to the course
20+
- Data preprocessing
21+
- Event-Related Potentials (ERP) analysis
22+
- Spectral and time-frequency analysis
23+
- Source localization and ICA
24+
- Connectivity analysis
25+
- IC clustering
26+
- LIMO statistics
27+
- MVPA (Multivariate Pattern Analysis)
28+
29+
**PowerPoint format:** Editable PowerPoint versions of the slides are available at:
30+
[Google Drive - Course Slides](https://drive.google.com/drive/folders/17EqHqypmM0aIQVuoaDMLbfSnMh8zB_GG?usp=drive_link)
31+
32+
## Prerequisites
33+
34+
### Step 1 – Download and install MATLAB
35+
36+
If you are organizing a course, you can usually obtain a [MATLAB trial version](https://www.mathworks.com/support/contact_us.html) for your participants by contacting the licensing department. Please have your participants install MATLAB in advance so you're ready to run EEGLAB during the course.
37+
38+
### Step 2 – Download the data
39+
40+
This course uses data from the multimodal face recognition BIDS dataset, a pruned version of the OpenNeuro dataset ds000117.
41+
42+
**Download the pruned single-subject dataset (ds000117_pruned):**
43+
[https://zenodo.org/record/7410278](https://zenodo.org/record/7410278)
44+
45+
This dataset contains only one subject and is used in Sessions 1, 2, 3, and 5.
46+
47+
**For group-level analyses (Sessions 4 and 6), also download the preprocessed group dataset (ds002718):**
48+
[https://zenodo.org/records/5528500](https://zenodo.org/records/5528500)
49+
50+
### Folder Structure Setup
51+
52+
The scripts expect the following folder structure:
53+
54+
```
55+
parent_folder/
56+
├── Data/
57+
│ └── sub-01/ (processed files for Session 4)
58+
└── EEGLAB_course/
59+
├── ds002718_5_Subjects/ (preprocessed group data for Session 6)
60+
├── ds000117_pruned/ (raw data for Sessions 1, 2, 3, 5)
61+
│ └── derivatives/
62+
│ └── meg_derivatives/
63+
│ └── sub-01/
64+
│ └── ses-meg/
65+
│ └── meg/
66+
└── (script files: Session_1_Import_Data.m, etc.)
67+
```
68+
69+
**Setup instructions:**
70+
1. Place the `ds000117_pruned` folder **inside** the `EEGLAB_course` folder (used by Sessions 1, 2, 3, 5)
71+
2. Place the `ds002718_5_Subjects` folder **inside** the `EEGLAB_course` folder (used by Session 6)
72+
3. Create a `Data` folder in the **parent** folder of `EEGLAB_course` and extract:
73+
- Processed single-subject files to `Data/sub-01/` (for Session 4)
74+
75+
**Note:** Sessions 1-3 generate processed files. Session 4 expects to find these in the parent `Data/sub-01/` folder, so you may need to copy output files from earlier sessions there.
76+
77+
### Step 3 – Download EEGLAB
78+
79+
Now it's time to clone the EEGLAB Git repository on your computer.
80+
81+
**Warning:** Do not download the ZIP file directly from GitHub, as it does not include EEGLAB submodules.
82+
83+
Instead, use the following command to clone the repository and pull its submodules:
84+
85+
```bash
86+
git clone --recurse-submodules https://github.com/sccn/eeglab.git
87+
```
88+
89+
Or download from the [EEGLAB website](https://sccn.ucsd.edu/eeglab/download.php).
90+
91+
### Step 4 – Check that EEGLAB runs
92+
93+
1. Start MATLAB
94+
2. In MATLAB, navigate to the folder containing the EEGLAB repository
95+
3. At the MATLAB command prompt (>>), type: `eeglab`
96+
4. The EEGLAB main interface should appear
97+
98+
If it opens without errors, you're all set for the workshop!
99+
100+
### Step 5 – Download the course scripts
101+
102+
During the course, participants will follow along and do hands-on work using the EEGLAB graphical interface. However, they can also run the scripts provided in this repository.
103+
104+
Clone this repository:
105+
106+
```bash
107+
git clone https://github.com/sccn/EEGLAB_course.git
108+
```
109+
110+
Or download the ZIP on GitHub.
111+
112+
## Course Content Overview
113+
114+
The course materials are organized into several sessions, each focusing on different aspects of EEG/MEG data analysis using EEGLAB.
115+
116+
### Session 1: Preprocessing
117+
118+
For this presentation, we will first import the data with the [Session_1_Import_Data.m](Session_1_Import_Data.m) script. This script has 11 steps.
119+
120+
* Step 1: Importing MEG data files with FileIO
121+
* Step 2: Adding fiducials and rotating montage
122+
* Step 3: Recomputing head center (for display only)
123+
* Step 4: Re-import events from STI101 channel (the original ones are incorect)
124+
* Step 5: Selecting EEG or MEG data
125+
* Step 6: Cleaning artefactual events (keep only valid event codes)
126+
* Step 7: Fix button press info
127+
* Step 8: Renaming button press events
128+
* Step 9: Correcting event latencies (events have a shift of 34 ms as per the authors)
129+
* Step 10: Replacing original imported channels
130+
* Step 11: Creating folder to save data if does not exist yet
131+
132+
After importing the data, it is preprocessed using the [Session_1_Preprocess_Data.m](Session_1_Preprocess_Data.m) script. This script itself has several steps.
133+
134+
* Re-Reference the data
135+
* Resampling the data (for speed)
136+
* Filter the data
137+
* Automatic rejection of bad channels
138+
* Re-Reference again
139+
* Repair bursts and reject bad portions of data
140+
* run ICA to detect brain and artifactual components
141+
* automatically classify Independent Components using IC Label
142+
* Save dataset
143+
144+
145+
### Session 2: Single sensor analysis (ERP/ERF)
146+
147+
For this presentation, we will use different vizualization techniques using the [Session_2_ERP_Analysis.m](Session_2_ERP_Analysis.m) script. The script first further process the data as follow.
148+
149+
* Extract data epochs for the famous, scrambled, and unfamiliar face stimuli
150+
* Remove the baseline from -1000 ms to 0 pre-stimulus
151+
* Apply a threshold methods to remove spurious epochs
152+
* Resave the data
153+
154+
Then it plots the data using the following methods:
155+
156+
* Plot ERP butterfly plot and scalp distribution at different latencies
157+
* Remove ICA artifactual components and replot
158+
* Plot series of scalp topography at different latencies
159+
* Plot conditions overlaid on each other
160+
* Plot ERPimages
161+
162+
### Session 2: Time-frequency decomposition
163+
164+
For this presentation, we will the script [Session_2_Time_Frequency_Analysis.m](Session_2_Time_Frequency_Analysis.m). It performs the following steps.
165+
166+
* Spectral analysis for each of the conditions
167+
* Time-frequency analysis for each of the conditions
168+
169+
### Session 3: Single and distributed sources
170+
171+
For this presentation, we will the script [Session_3_Source_Reconstruction.m](Session_3_Source_Reconstruction.m). It performs the following steps.
172+
173+
* Definition of head model and source model
174+
* Localization of ICA components
175+
* Plotting of ICA components overlaid on 3-D template MRI
176+
177+
### Session 4: ERP source analysis
178+
179+
The script [Session_4_ERP_Source_Analysis_TOEDIT.m](Session_4_ERP_Source_Analysis_TOEDIT.m) analyzes ERP component contributions and source-level analysis.
180+
181+
* Load preprocessed data from Session 1
182+
* Extract epochs for Famous, Unfamiliar, and Scrambled face conditions
183+
* Perform baseline correction (-1000 to 0 ms)
184+
* Apply threshold-based epoch rejection
185+
* Plot ERP scalp distributions for each condition
186+
* Analyze ICA component contributions to ERPs using scalp envelope plots
187+
* Demonstrate removal of artifact components
188+
* Visualize component projections to ERPs
189+
190+
### Session 5: BIDS import and preprocessing workflows
191+
192+
This session demonstrates how to work with BIDS-formatted datasets using two scripts:
193+
194+
**Single-subject BIDS import** - [Session_5_6_bids_ds000117.m](Session_5_6_bids_ds000117.m):
195+
* Import data using EEGLAB BIDS tools from ds000117_pruned
196+
* Add fiducial coordinates and rotate montage
197+
* Re-import events from STI101 channel
198+
* Select EEG or MEG data type
199+
* Clean artifactual events
200+
* Merge multiple runs for each subject
201+
202+
**Group-level BIDS import** - [Session_5_6_bids_ds002718.m](Session_5_6_bids_ds002718.m):
203+
* Import multiple subjects from ds002718 BIDS dataset
204+
* Remove unwanted channels
205+
* Apply common average reference
206+
* Resample data to 100 Hz
207+
* Apply high-pass (1 Hz) and low-pass (40 Hz) filters
208+
* Prepare data for group-level analysis
209+
210+
### Session 6: Group-level analysis
211+
212+
The script [Session_6_Group_Analysis_STUDY.m](Session_6_Group_Analysis_STUDY.m) perform group analysis on a group of subjects.
213+
214+
* Removing components flagged for rejection using ICLabel
215+
* Plotting grand average ERPs
216+
217+
## Advises on conducting the course
218+
219+
Give the lecture for the course and run the hands on exercises that accompany the PowerPoint slides. The scripts can support the demonstrations, although relying on them too heavily can overwhelm beginners. Most participants will follow the GUI more easily, so position the scripts as a reference rather than the primary workflow.
220+
221+
To continue to Session 2, participants must either run the script [Session_1_Import_Data.m](Session_1_Import_Data.m) or manually reproduce all import steps in the GUI, which is impractical for this dataset. The raw files require several technical adjustments that are not beginner friendly. For Session 1, a practical compromise is to have users import the FIF file in the GUI, select the EEG channels, explore the raw data briefly, then execute the import script to complete the required preprocessing. The second script, [Session_1_Preprocess_Data.m](Session_1_Preprocess_Data.m), can be reproduced entirely with the GUI if students prefer to work interactively.
222+
223+
From Session 3 onward, the scripts function mainly as optional examples. All core operations can be performed in the GUI. Instructors can choose whether to demonstrate scripts to illustrate reproducible workflows, but this should not be required for participants to progress.
224+
225+
A few additional suggestions can improve the course experience. Clarify early that ICA may yield slightly different outcomes across computers and that this variability is normal. Finally, alternate between explanation and hands on exploration so participants stay engaged and do not fall behind. Have a teaching assistant present throughout the session so participants who get stuck can receive prompt one to one support without interrupting the flow of the course.

0 commit comments

Comments
 (0)