Sources statistical file with only clusters above certain threshold

Hi Francois,

After running a statistical analysis on sources is there a way to get a copy of the output file with only min voxels/vertices above a certain threshold? Equivalent to the min size under the surface tab. This is to make it easier to extract statistical information from those sources that were above a certain threshold e.g 20 voxels.

The option to remove the small "clusters" in the source maps is only a display option. This should not be used for statistical analysis, the results of the statistical tests should not be edited to remove "small clusters" after the computation of the p-values, otherwise the correction for multiple comparisons is not valid anymore.

If you want to be able to explore your results by spatio-temporal clusters, and keep only the significant clusters, you need to use cluster-based statistics:
https://neuroimage.usc.edu/brainstorm/Tutorials/Statistics#Example_3:_Cluster-based_correction

Is there a way to get the the statistical data according to region? In the statistical file I can see the tmap and pmap but is there a way to group these according to brain region so I can then extract max t and p value within region?

You can get the indices of the vertices of a ROI in the structure of the cortex surface:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scouts#On_the_hard_drive

And then compute the max t or min p over these vertices.
Example from the introduction tutorials:

>> SurfaceMat.Atlas(1)

ans = 

  struct with fields:

      Name: 'User scouts'
    Scouts: [1×2 struct]

>> SurfaceMat.Atlas(1).Scouts(1)

ans = 

  struct with fields:

    Vertices: [2854 2897 3000 3001 3002 3003 3085 3087 3089 3137 3187 3223 3254 3376 3500 3501 3543 6849 7168 7211 7263 7335 7482]
        Seed: 3223
       Color: [0 0.8000 0]
       Label: 'A1L'
    Function: 'Mean'
      Region: 'LT'
     Handles: []

>> min(StatMat.pmap(SurfaceMat.Atlas(1).Scouts(1).Vertices,:), [], 1)

ans =

  Columns 1 through 19

    0.4338    0.0115    0.0918    0.6028    0.3336    0.2267    0.3208    0.4791    0.0246    0.1973    0.2029    0.0395    0.1011    0.1080    0.1304    0.3518    0.6908    0.0330    0.0549

...

Thanks. I can create ROIs using scouts as in the tutorial. Is there a way or some template I can use so I can be more accurate in assigning vertices to ROIs. For example, the vertices that correspond to the left entorhinal all in one ROI?

For example, the vertices that correspond to the left entorhinal all in one ROI?

Use the cortical (or volume) parcellations generated by FreeSurfer or CAT.

image

Data exported as "SurfaceMat"

>> iAtlas = find(strcmpi({SurfaceMat.Atlas.Name}, 'Desikan-Killiany'))
iAtlas =
     3

>> iScout = find(strcmpi({SurfaceMat.Atlas(iAtlas).Scouts.Label}, 'entorhinal L'))
iScout =
     9

>> SurfaceMat.Atlas(iAtlas).Scouts(iScout)
ans = 
  struct with fields:
    Vertices: [33×1 double]
        Seed: 4929
       Color: [0.8627 0.0784 0.0392]
       Label: 'entorhinal L'
    Function: 'Mean'
      Region: 'LT'
     Handles: []

Thanks. I have imported SPM12 and CAT12. This error message came up after installing CAT12 but it seems to have been installed successfully.

image

I used the default anatomy - ICBM152 - for my analysis. Is the correct next step to right-click MRI:ICBM152 > MRI segmentation > CAT12 and set number of vertices on the cortex surface to 15002? For cortex I have cortex_15002V.

The problem is the creation of the link from plugins/spm12/spm12/toolbox/cat12 to plugins/cat12/cat12.
Can you run Matlab as an administrator (right-click on Matlab in the startup menu, and you should find a menu to do this) and try again?

You don't have to uninstall/reinstall CAT12, maybe you can just try to execute the following command in the Matlab command window after starting Matlab as an admin:

bst_plugin('Load', 'cat12');
bst_plugin('LinkCatSpm', 1);

I added a section Install / troubleshooting in the CAT12 tutorial:
https://neuroimage.usc.edu/brainstorm/Tutorials/SegCAT12

Thanks. I ran it and got this:

>> bst_plugin('Load', 'cat12');
bst_plugin('LinkCatSpm', 1);
BST> Adding plugin spm12 to path: C:\Users\dloughre\.brainstorm\plugins\spm12\spm12
BST> Executing callback LoadedFcn: spm('defaults','EEG');
BST> Adding plugin cat12 to path: C:\Users\dloughre\.brainstorm\plugins\cat12\cat12
BST> Creating symbolic link: mklink /D "C:\Users\dloughre\.brainstorm\plugins\spm12\spm12\toolbox\cat12" "..\..\..\cat12\cat12"

Is this the correct approach for default anatomy with 15002V?

Is this the correct approach for default anatomy with 15002V?

Correct with respect to what?
If you need to run CAT12 on the MNI ICBM152 template because you need a volume or surface parcellation that is not available with the default FreeSurfer segmentation: yes, it makes sense. Otherwise, I'm not sure why you would do this.

I will at some point update the ICBM152 template used by default in the Brainstorm protocols to include the CAT12 atlases.

I'm using Windows. I'm not sure how to get FreeSurfer on Brainstorm. I can't see an option to download this plugin via Brainstorm?

The MNI ICBM152 template is already processed with FreeSurfer...
What are you expecting to do?

I found the atlas thanks.

Hi Francois,

I have a script to extract the statistical information (t values and p values) of the voxel with the lowest p value according to ROI (using the Desikan-Kiliany Atlas). I would like to include the MNI co-ordinates for these vertices with the most significant t values. Is there a way to extract/match the MNI coordinates (as available in the MRI viewer) with the extracted 15002V or is there a file I can export from Brainstorm that would allow me to match these data?

If you know the index iVertex of the vertex of interest in the data map (tmap or pmap), you can get the SCS coordinates from the cortex surface, and then compute the MNI coordinates:

xyz_scs = sCortex.Vertices(iVertex,:);
xyz_mni = cs_convert(sMri, 'scs', 'mni', xyz_scs); 

https://neuroimage.usc.edu/brainstorm/CoordinateSystems#Converting_between_coordinate_systems

I exported cortex_15002V to MatLab under name sCortex. I got the iVertex and can get the xyz_scs coordinates for this but I can't convert to xyz_mni. I changed sMRI to sCortex but the outcome is blank - [].

I changed sMRI to sCortex but the outcome is blank

You need to have the reference MRI structure loaded in sMRI.
This is where all the information about the various coordinate systems is stored.

Thanks Francois