Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEL-Hack: Learning to develop an mTRF pipeline with eelbrain #19

Open
2 tasks done
vverbeni opened this issue Nov 7, 2024 · 4 comments
Open
2 tasks done

EEL-Hack: Learning to develop an mTRF pipeline with eelbrain #19

vverbeni opened this issue Nov 7, 2024 · 4 comments

Comments

@vverbeni
Copy link
Contributor

vverbeni commented Nov 7, 2024

Title

EEL-Hack: Learning to develop an mTRF pipeline with eelbrain

Leaders

Noemi Bonfiglio
Vincenzo Verbeni

Collaborators

Nan

Brainhack Global 2024 Event

Brainhack Donostia

Project Description

The Multivariate Temporal Response Function (mTRF) method is an advanced technique used to model the relationship between various features of an auditory stimulus—such as acoustic (e.g., sound envelope) and lexical (e.g., word boundaries, semantic information) features—and the brain's electrical activity as measured by M/EEG signals. This approach provides insights into how the brain processes auditory information over time, enabling researchers to link neural dynamics with complex auditory inputs.
In this project, we will walk through the process of analyzing EEG data using the mTRF method, leveraging the Python toolbox Eelbrain to manage data, prepare predictors, and analyze results. The main steps involved in this project will be:

1. Converting Data Structure from BIDS to Eelbrain Format

The BIDS format is a standardized organization of M/EEG datasets, but Eelbrain uses a different structure for managing and analyzing data. Therefore, we will organize the data according to Eelbrain’s requirements.

2. Defining the Experiment Design

Once the data has been converted, the next step is to define the experiment design. This involves inspecting the events recorded in the EEG data, which mark key moments such as stimulus presentation or participant responses, and ensuring they are correctly aligned with the corresponding auditory stimuli. This step is crucial because accurate event marking is essential for relating the brain signals to specific time points in the stimuli.

3. Building an experiment.py Script According to the Design

With the experiment design in place, we will implement the design in a Python script, experiment.py, which automates the process of loading and organizing the data for analysis. This script will:
Load the EEG data and events from the converted Eelbrain format.
Load the corresponding stimuli features (e.g., sound waveforms, lexical properties).
Synchronize the EEG recordings with the stimuli based on the experiment design.

4. Preparing the Predictors (e.g., Gammatones)

Before fitting the mTRF model, we need to prepare the predictors that will be used to relate the brain’s response to the auditory stimuli. Predictors can include a variety of acoustic and lexical features. Our main goal will be to prepare acoustic predictors for our mTRFs. Optionally, depending on the time available during BrainHack, we will work on lexical predictors - such as word frequency and surprisal.

5. Fitting an mTRF at the Group Level and plotting the results

Once the data and predictors are prepared, we will fit the mTRF model at the group level to investigate how different stimulus features are encoded in the brain’s neural activity over time. We will then inspect the results plotting the mTRF coefficients over time and the topographical maps showing the variations of these coefficients across different regions of the scalp.

Link to project repository/sources

NaN

Goals for Brainhack Global

a) understanding how mTRF method works
b) understanding how Eeelbrain works
c) writing and editing scripts to prepare the data and fit an mTRFs

Good first issues

issue 1: converting data structure from bids to Eelbrain format
issue 2: define the experiment design (i.e., checking events in the eeg data and the corresponding stimuli)
issue 3: building an experiment.py script according to the design
issue 3: prepare the predictors (e.g., gammatones)
issue 4: fit an mTRF at the group level
issue 5: plotting the mTRF results

Communication channels

NaN

Skills

  • basic python skills
  • basic knowledge of electrophysiological data

Onboarding documentation

NaN

What will participants learn?

How to use Eelbrain

Data to use

The following is a link to the EEG dataset (published in BIDS format on OSF) that we will use for our project:

https://osf.io/xq263/

Number of collaborators

2

Credit to collaborators

Project contributors will be listed in the project's README.

Image

Leave this text if you don't have an image yet.

Type

pipeline_development

Development status

1_basic structure

Topic

neural_encoding

Tools

MNE

Programming language

Python

Modalities

EEG

Git skills

0_no_git_skills

Anything else?

No response

Things to do after the project is submitted and ready to review.

  • Add a comment below the main post of your issue saying: Hi @brainhackorg/project-monitors my project is ready!
  • Twitter-sized summary of your project pitch.
@vverbeni
Copy link
Contributor Author

vverbeni commented Nov 7, 2024

Hi @brainhackorg/project-monitors my project is ready!

@vverbeni
Copy link
Contributor Author

vverbeni commented Nov 7, 2024

Twitter-size summary:

The multivariate Temporal Response Function (mTRF) method models the relationship between the features of an auditory stimulus (i.e., both acoustic and lexical features) and the recorded M/EEG signals across different time points.
In this project we will learn how to use the Python toolbox ‘Eelbrain’, addressing all the necessary steps to compute mTRF (data organization, predictor setting, etc.) on a publicly available EEG dataset.

@crnolan
Copy link
Collaborator

crnolan commented Nov 7, 2024

Looks good!

@vverbeni
Copy link
Contributor Author

Hello!

For anyone interested in following the development of the EEL-Hack project after Brainhack 2024, please find below the the link to our repository:

https://github.com/Noemii393/Eelhack-project

See you there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment