Link Search Menu Expand Document

EEGLAB and iEEG, sEEG, or ECoG data

EEGLAB supports reading most iEEG data formats (EDF, MEF3, NWB) through native code or plugins. The BIDS-Matlab-tools EEGLAB plugin also supports importing BIDS-formatted MEG data. You may install plugins from the EEGLAB plugin manager (menu item File > Manage EEGLAB extensions).

Importing data

For example, after installing the MEF3 and BIDS-Matlab-tools plugins, you may import the ds003708 BIDS dataset. First, download the data. Second, use menu item File > BIDS Tools > Import BIDS folder to STUDY. Leave all defaults and press OK (you may also select the column of interest for event types). Alternatively, use menu item File > Import data > Using EEGLAB functions and plugins > Import MEF3 folder to import the mefd folder located in the ds003708/sub-01/ses-ieeg01/ieeg/ folder of the BIDS dataset.

When importing with BIDS, the advantage is that, along with the data, you will likely have access to the iEEG electrode locations and relevant events. We show below the raw sEEG data for the unique subject in the BIDS dataset ds003708.

Screen Shot 2022-09-09 at 3 16 34 PM

The channel locations for the same dataset are shown below.

Screen Shot 2022-09-09 at 3 16 56 PM

Even if you are not planning to use EEGLAB to process iEEG data, importing your iEEG data into EEGLAB and resaving it into an EEGLAB dataset may be useful for processing it in other software.

Importing spike information

EEGLAB allows importing spikes as events when using the NWB (Neurodata Without Border). Below, we show an example using the file sub-01_ses-20140828T132700_ecephys+image.nwb of this DandiSet. After downloading the file, and after installing the NWB-io EEGLAB plugins (menu item File > EEGLAB extensions then install the NWB-io plugin). After installing the plugin, import the file above in EEGLAB using menu item File > Import data > Using EEGLAB functions and plugins > From NWB file. Make sure to check the checkbox to import spike latencies.

Screenshot 2024-04-17 at 10 00 59 AM

Once the file has been imported, use menu item Plot > Channel data (scroll)

Screenshot 2024-04-17 at 10 02 28 AM

We can then extract data epochs and plot ERPs. For example, to extract data epochs based on the spike of unit #1, use menu item Tools > Extract epochs and select events corresponding to the first unit as shown below.

Screenshot 2024-04-17 at 11 45 31 AM

You can then use menu item Plot > Channel ERPs > with scalp maps to plot the ERP of the two channels recorded in this dataset.

Screenshot 2024-04-17 at 11 48 32 AM

Additional ressources

Other relevant resources for processing iEEG data: