Export surface source maps to SPM12

Authors: Francois Tadel

The statistical analysis is still limited in Brainstorm, but you can easily export your source maps and run your tests with an external application. This tutorial explains how to export source maps to SPM12. It is based on the older introduction tutorials (CTF median nerve stimulation, protocol TutorialRaw), but it is easy to translate it to the new tutorials (auditory oddball).

SPM12 can work with source activations represented either as volumes, as illustrated in the tutorial Export to SPM8, or as surfaces, as presented in this tutorial.

Export source files

We want to export the sources estimated for all the trials for the left condition to surface files in GIfTI format (readable by SPM). We are going to get rid of the time information because it cannot be represented in SPM, and keep only two averaged time windows per condition: a baseline [-20,-15]ms and an active state [33,38]ms.

Clear the Process1 box and drop all the trials for condition Left in it. Select the button "Process sources" on the left of the Process1 tab.

introBst.gif

Select the process "File > Export to SPM12 (surface)".

exportLeftBaseline.gif

Configure the process:

Add another export process after this one, to export the "active" state. Set the time window to [33,38]ms, to capture the peak of the response in the primary somatosensory cortex, and the file name to "subject01_left_active".

exportLeftActive.gif

Click on Run and let it process for a while. It will generate the following files (total of 12 Mb):

This representation is quite heavy (405 files) for so little information. Hopefully this will get improved in a future release of SPM12.

Run SPM12

Installing SPM is easy: http://www.fil.ion.ucl.ac.uk/spm/software/spm12/

Start Matlab, go to the SPM folder, add it to your path if it is not done already, then type "spm". Select "M/EEG" on the SPM startup screen.

Import note: Do not run Brainstorm and SPM at the same time, always close Brainstorm before starting SPM (but you don't need to close Matlab).

spmStart1.gif

In the main SPM window, click on "Specify 2nd level".

spmStart2.gif

Now you can specify your stats design in the Batch Editor window. We are going to start with a simple t-test for the left condition: active state versus baseline. Select the following options:

Once you have defined all the options, click on the Run button (the green button in the toolbar on top of the Batch Editor window).

spmSetupTwoSample.gif

The design matrix window is displayed in the Graphics window, and a file SPM.mat is saved in the output directory you defined in the options.

spmDesign.gif

In the SPM12 Menu window, click on the Estimate button. Select the SPM.mat file that was just created. SPM estimates the parameters, it may take a while.

spmRun.gif

When done click on Results in the SPM12 Menu window, select again the same SPM.mat file. A window pops up, you have to specify the contrast(s) of interest.

spmContrast1.gif

Click on "Define new contrast...". Edit the options to define the t-test post-stim > pre-stim:

spmContrast2.gif

It updates the window "SPM contrast manager".

spmContrast3.gif

Click on "Done", then a list of parameters is asked in the "SPM12: Stats: Results" window.

spmContrast4.gif

You get the final results in the Graphics window. You can click on the cortex surface to rotate.

spmResultsConstr.gif

You can repeat the same operations with the right condition.

The results you get here are very basic, but the logic of exporting source results from Brainstorm to SPM can be extended to any type of analysis.





Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


ExportSpm12 (last edited 2022-03-15 14:28:32 by RaymundoCassani)