FreeSurfer offers several ways to correct for multiple comparisons on the surface. One way is similar to Gaussian Random Fields (GRF) but uses a simulation rather than analitic equations to estimate the corrected voxel-wise and clusterwise p-values. See Hagler,et al. Using a simulation has seveal advantages, namely that the assumptions of needed to make the GRF equations work do not apply (eg, cluster-forming threshold and minimum smoothness). The disadvantage is that it is slow to run the simulation. However, it is possible to run simulations under many different conditions and store the results for later use. This has alread been performed for fsaverage and fsaverage_sym and are used automatically by mri_glmfit-sim (which performs the correction).

If you are using one of these two subjects with a whole cortex analysis, then you can use the precomputed results. If you want to use a different subject or to limit your analysis to a smaller spatial region, then you will need to run you own simulations. mri_mcsim is a program which efficiently performs this simulation

If you have your own subject (yoursubject), then run something like

mri_mcsim --o $FREESURFER_HOME/average/mult-comp-cor/yoursubject/lh/cortex \
   --base mc-z --surface yoursubject lh --nreps 10000

and

mri_mcsim --o $FREESURFER_HOME/average/mult-comp-cor/yoursubject/rh/cortex \
   --base mc-z --surface yoursubject rh --nreps 10000

nreps is the number of repetitions. 10000 should be enough.

This will create a directory structure similar to $FREESURFER_HOME/average/mult-comp-cor/fsaverage/lh/cortex

After these are complete, you can just run mri_glmfit-sim and it should find it. You can put it into a different directory and then spec that folder when you run mri_glmfit-sim with the --cache-dir flag.

By default, the above will use the ?h.cortex.label as a mask (ie, whole cortex). If you want to restrict the correction to a smaller area to reduce the severity of the correction, you can specify a mask or a label and change the output folder, eg

mri_mcsim --o $FREESURFER_HOME/average/mult-comp-cor/fsaverage/lh/superiortemporal \
   --base mc-z --surface fsaverage lh --nreps 10000 \
   --label  superiortemporal

This will create $FREESURFER_HOME/average/mult-comp-cor/fsaverage/lh/superiortemporal Note that lh.superiortemporal.label must exist in $SUBJECTS_DIR/fsaverage/label

You can also supply a binary mask, eg

mri_mcsim --o $FREESURFER_HOME/average/mult-comp-cor/fsaverage/lh/mymask \
   --base mc-z --surface fsaverage lh --nreps 10000 \
   --mask mymask.mgh

This is particularly useful if you want to correct the results from a run of mri_glmift. To do this, just supply the mask.mgh file found in the mri_glmfit output folder. This is the preferred method over running mri_glmfit-sim (unless you are doing a permutation test). Note that it does not make sense to run this unless you have specified a custom mask when running mri_glmfit. If you have not, then run mri_glmfit-sim with the --cache option

To apply it, run something like

mri_glmfit-sim --glmdir glmdir --cache-label superiortemporal --cache 2 abs

If you did not direct the output of mri_mcsim to $FREESURFER_HOME/average/mult-comp-cor/fsaverage/lh/superiortemporal, then specify the folder to mri_glmfit-sim with --cache-dir. Eg, if you sent the output to /my/space/mult-comp-cor/fsaverage/lh/superiortemporal, then

mri_glmfit-sim --glmdir glmdir --cache-label superiortemporal --cache 2 abs
  --cache-dir /my/space/mult-comp-cor

Note that --cache-dir is only /my/space/mult-comp-cor, not the full path.

A newer version of mri_mcsim for linux can be obtained from here: ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-patch/mri_mcsim.linux Copy it to $FREESURFER_HOME/bin/mri_mcsim. If you need a version for a different platform, contact the list.

BuildYourOwnMonteCarlo (last edited 2016-04-14 17:48:33 by 172)