top | previous | FSFAST Tutorial Top

1. Group Level Analysis

In general, the group analysis for fMRI is very similar to that of the structural data. There is a tutorial for this at GroupAnalysis. There are several specific differences for fMRI which are described here.

In the structrual GroupAnalysis, you would:

  1. Run mris_preproc to resample each subject into the common space and then concatenate all of your subjects (one subject for each frame) into one file.
  2. Smoothed the data on the surface, then
  3. Run mri_glmfit and mri_glmfit-sim

For the function MRI group analysis you will need to:

2. Concatenating the Data

In the structural stream (see GroupAnalysis), the subject's data were concatenated into one file with mris_preproc . For the functional stream, the program is called isxconcat-sess:

isxconcat-sess -sf sessidlist -analysis workmem.sm05.lh -contrast encode-v-base -o group

junk

Run the concatenation for the right hemisphere and mni305 spaces

isxconcat-sess -sf sessidlist -analysis workmem.sm05.rh -contrast encode-v-base -o group
isxconcat-sess -sf sessidlist -analysis workmem.sm05.mni305 -contrast encode-v-base -o group

When this is complete, a directory called 'group' will be created. cd into this directory and see what's there:

cd $FSFTUTDIR/group
ls

Go into the workmem.sm05.lh and see what's there:

cd $FSFTUTDIR/group/workmem.sm05.lh
ls

You will see several files and folders:

Each of the volumes is in the output space (lh, rh, mni305), as can be verified with mri_info.

Go into the contrast folder and see what's there:

cd $FSFTUTDIR/group/workmem.sm05.lh/encode-v-base
ls

These are going to be the inputs for the group GLM analysis.

3. Running the GLM

Details on how to run the GLM are given in GroupAnalysis, including the use of FSGD files to construct complicated group-level design matrices. Here we are going to use a very simple design in which test whether the mean across the groups equals 0 (the One Sample Group Mean, or OSGM). This just requires a design matrix with a single column of all ones (created with the --osgm flag):

mri_glmfit --y ces.nii.gz \
  --wls cesvar.nii.gz \
  --osgm \
  --surface fsaverage lh \
  --glmdir my-glm.wls \
  --nii.gz

The one difference between this and the call in the structrual steam is the presence of the '--wls cesvar.nii.gz' option. cesvar.nii.gz is the variance of each session at each voxel. This is used to de-weight a session with high variance. This is not a true mixed effects analysis (this has been referred to as 'psuedo mixed effects'; see Thirion, 2007, Neuroimage). This step is not performed in the structural stream because we do not have variance information for each subject.

4. Visualizing the Results of the Group GLM

tksurfer fsaverage lh inflated -aparc -overlay my-glm.wls/osgm/sig.nii.gz

lh.group.encode.jpg

5. Correct for Multiple Comparisons

The correction is the same as for the structural group analysis. For example, run:

mri_glmfit-sim --glmdir my-glm.wls --cache 2 pos --cwpvalthresh .0166

Using a cluster-wise p-value threshold of p < .0166 corrects across all three spaces for p<.05 (ie, .0166 = .05/3). This corrections for a whole brain (ie, lh, rh, and subcortical) analysis.

This will create several outputs, though there are two that are most important:

View the cache.th30.pos.sig.cluster.summary table

cat my-glm.wls/osgm/cache.th30.pos.sig.cluster.summary

6. Right Hemisphere

Perform the same operations above for the right hemisphere (ie, go into workmem.sm05.rh):

cd $FSFTUTDIR/group/workmem.sm05.rh
mri_glmfit --y ces.nii.gz --wls cesvar.nii.gz --osgm --surface fsaverage rh --glmdir my-glm.wls --nii.gz
mri_glmfit-sim --glmdir my-glm.wls --cache 2 pos --cwpvalthresh .0166

7. Subcortical (MNI 305 Space)

Perform the same operations above for the MNI 305 space analysis (ie, go into workmem.sm05.mni305). There are a couple of things that are different about this analysis.

cd $FSFTUTDIR/group/workmem.sm05.mni305
ls

This directory has the same files as the surface-based results, though their dimensions are different. All the volumes here are true volumes. There is an addition file that is not in the surface-based results:

This is a mask that only covers the subcortical structures. This will be used to help prevent the re-analysis of cortical structures.

tkmedit fsaverage orig.mgz -aparc+aseg -overlay subcort.mask.nii.gz -fthresh 0.5

The mri_glmfit command is the same as for the surface-based analysis but without the (--surface fsaverage lh) part and with the specification of a mask

cd workmem.sm05.mni305/encode-v-base
mri_glmfit --y ces.nii.gz --wls cesvar.nii.gz --osgm  --glmdir glm.wls --mask ../subcort.mask.nii.gz
tkmedit fsaverage orig.mgz -aparc+aseg -overlay glm.wls/osgm/sig.nii.gz