Size: 4262
Comment:
|
Size: 4954
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
This tutorial will host the steps to use the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox]] in Brainstorm. ... | This tutorial introduces the Temporal Response Function (TRF) analysis within the Brainstorm environment, employing the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox]] as plugin. |
Line 9: | Line 9: |
This tutorial introduces the Temporal Response Function (TRF) analysis within the Brainstorm environment, employing the mTRF Toolbox. TRF analysis is instrumental in delineating the dynamics of the brain's response to continuous stimuli, such as speech and music, providing insights into the underlying neural mechanisms. | Temporal Response Function (TRF) analysis is instrumental in delineating the dynamics of the brain's response to continuous stimuli, such as speech and music, providing insights into the underlying neural mechanisms. The present tutorial will show the TRF analysis functionality within the Brainstorm interface using the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox]] as plugin. For a detailed documentation, more examples and citation for the mTRF-Toolbox, please refer to the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox GitHub page]]. This tutorial uses data from the [[https://neuroimage.usc.edu/brainstorm/DatasetIntroduction|introduction dataset]], and can be followed by completing all steps of the [[https://neuroimage.usc.edu/brainstorm/Tutorials#Get_started|Get Stared]]] tutorials up to and including [[https://neuroimage.usc.edu/brainstorm/Tutorials/PipelineEditor|tutorial 9]]. |
Line 12: | Line 14: |
In order to use the process files required for TRF analysis, you will need to download the [[https://www.frontiersin.org/journals/human-neuroscience/articles/10.3389/fnhum.2016.00604/full|mTRF toolbox]]. First, visit the [[https://github.com/mickcrosse/mTRF-Toolbox.git|mTRF Toolbox GitHub]] page to download the latest version of the toolbox. Click the "Code" button and extract the downloaded zip file into a directory that MATLAB can access. Then, open MATLAB and add the toolbox to your MATLAB path using the addpath function. This ensures MATLAB recognizes the toolbox commands. Alternatively, you can install the mtrf manually from Brainstorm directly. For that, go to Plug-ins > Statistics > mtrf. Or, the plugin will install automatically once you call the process for the first time. |
Install '''mTRF-Toolbox''' as a [[https://neuroimage.usc.edu/brainstorm/Tutorials/Plugins|Brainstorm plugin]]. In the main Brainstorm window, go to the menu <<BR>> '''Plug-ins > Statistics > mtrf > Install'''. Or, the plugin will install automatically once you call the process for the first time. |
Line 21: | Line 17: |
Using the Introduction dataset, you will first need to import the entire recordings for whichever run you want to study into your database. Right-click on the raw file, and then 'Import in database'. | Using the '''introduction dataset''', you will first need to import the entire recordings for whichever run you want to study into your database. e.g., '''Run01''' Right-click on the raw file, and then 'Import in database'. |
Line 24: | Line 20: |
Once this is done, the recordings will have appeared in a new file. Some recordings will be labeled as bad and therefore need to be handled. Right-click on the file and select 'Accept Trial'. |
Once this is done, the recordings will have appeared in a new file '''Raw (0.00s,360.00s)'''. If the [[https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsDetect|bad segments were already identified]] in the continuous recording, the new file will be labeled as '''bad''' (), before continuing we need to change its status to '''good'''. right-click on the file and select 'Accept Trial'. |
Line 31: | Line 24: |
== Saving the TRF weights == In order to start your TRF analysis, you will need to run the 'Temporal Response Function Analysis' process. First, drag the imported file in the 'Process1' box. Click 'Run', then select 'Encoding' > 'Temporal Response Function Analysis'. |
== TRF analysis == In order to start your TRF analysis, you will need to run the '''Temporal Response Function Analysis''' process. First, drag the imported file in the '''Process1''' box. Click '''Run''', then select '''Encoding' > Temporal Response Function Analysis'''. |
Line 35: | Line 28: |
In this tutorial, we want to compute the TRF the MEG sensors, in a window from -100 to 200 ms after the tones. To do so set the analysis parameters, as follows: | |
Line 36: | Line 30: |
Set '''MEG''' for the | |
Line 37: | Line 32: |
Set the analysis parameters, including the range of time lags to investigate, and the events that you want to analyze. In this tutorial, choose -100ms for minimum time lag, 200ms maximum time lag and we will be looking at the TRF related to deviant and standard beeps. Once your parameters are chosen, hit 'Run'. This will save two files in your database as matrices containing the weights between neural and response data. |
Thus, set '''-100ms''' for 'minimum time lag', '''200ms''' for 'maximum time lag' and we will be looking at the TRF related to '''deviant''' and '''standard''' tones. Once your parameters are chosen, hit '''Run'''. Once the process finishes, there will be new two matrix files in your database, these contain the weights between neural and response data. |
Line 41: | Line 35: |
For visualization purposes, you can also double click the matrix files to open a new window with the TRF time series for all the sensors. | |
Line 45: | Line 38: |
In order to extract the data for specific channels, you will need to run the 'Extract Value' process on these output matrices. First, drag the chosen matrix into the 'Process1' box. Select 'Run' and then choose 'Extract' > 'Extract Values'. | In order to extract the data for specific channels, you will need to run the process '''Extract Value''' on these output matrices. First, drag the chosen matrix into the '''Process1''' box. Select '''Run''' and then choose '''Extract > Extract Values'''. |
Line 49: | Line 42: |
Input your preferred analysis parameters including channel number and time window. For this tutorial, we will choose to analyze channel 80. Set these parameters: | Input your preferred analysis parameters including channel number and time window. For this tutorial, we will choose to analyze channel '''80''' (sensor '''MLP22'''). Set these parameters: |
Line 53: | Line 46: |
Hit 'Run'. A new matrix file containing the weights for the specified channel will have been created. For visualization purposes, you can also double click the file which will open a new window with the TRF time series. | Click on '''Run'''. A new matrix file containing the weights for the specified channel will have been created. For visualization purposes, you can also double click the file which will open a new window with the TRF time series. |
Multivariate Temporal Response Function
Authors: Anna Zaidi, Raymundo Cassani
This tutorial introduces the Temporal Response Function (TRF) analysis within the Brainstorm environment, employing the mTRF-Toolbox as plugin.
Contents
Introduction
Temporal Response Function (TRF) analysis is instrumental in delineating the dynamics of the brain's response to continuous stimuli, such as speech and music, providing insights into the underlying neural mechanisms. The present tutorial will show the TRF analysis functionality within the Brainstorm interface using the mTRF-Toolbox as plugin. For a detailed documentation, more examples and citation for the mTRF-Toolbox, please refer to the mTRF-Toolbox GitHub page.
This tutorial uses data from the introduction dataset, and can be followed by completing all steps of the Get Stared] tutorials up to and including tutorial 9.
Install mTRF-Toolbox
Install mTRF-Toolbox as a Brainstorm plugin. In the main Brainstorm window, go to the menu
Plug-ins > Statistics > mtrf > Install. Or, the plugin will install automatically once you call the process for the first time.
Preparing the data
Using the introduction dataset, you will first need to import the entire recordings for whichever run you want to study into your database. e.g., Run01 Right-click on the raw file, and then 'Import in database'.
Once this is done, the recordings will have appeared in a new file Raw (0.00s,360.00s). If the bad segments were already identified in the continuous recording, the new file will be labeled as bad (), before continuing we need to change its status to good. right-click on the file and select 'Accept Trial'.
TRF analysis
In order to start your TRF analysis, you will need to run the Temporal Response Function Analysis process. First, drag the imported file in the Process1 box. Click Run, then select Encoding' > Temporal Response Function Analysis.
In this tutorial, we want to compute the TRF the MEG sensors, in a window from -100 to 200 ms after the tones. To do so set the analysis parameters, as follows:
Set MEG for the
Thus, set -100ms for 'minimum time lag', 200ms for 'maximum time lag' and we will be looking at the TRF related to deviant and standard tones. Once your parameters are chosen, hit Run. Once the process finishes, there will be new two matrix files in your database, these contain the weights between neural and response data.
For visualization purposes, you can also double click the matrix files to open a new window with the TRF time series for all the sensors.
Investigating a specific channel
In order to extract the data for specific channels, you will need to run the process Extract Value on these output matrices. First, drag the chosen matrix into the Process1 box. Select Run and then choose Extract > Extract Values.
Input your preferred analysis parameters including channel number and time window. For this tutorial, we will choose to analyze channel 80 (sensor MLP22). Set these parameters:
Click on Run. A new matrix file containing the weights for the specified channel will have been created. For visualization purposes, you can also double click the file which will open a new window with the TRF time series.