Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Line 22: Line 21:
mri_mcsim --o $FREESURFER_HOME/average/mult-comp-cor \ If you have your own subject (yoursubject), then run something like

mri_mcsim --o $FREESURFER_HOME/average/mult-comp-cor/yoursubject/lh/cortex \
Line 25: Line 26:
And one for the right hemi too. and

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

nreps is the number of repetitions. 10000 should be enough.
Line 28: Line 34:
$FREESURFER_HOME/average/mult-comp-cor/fsaverage $FREESURFER_HOME/average/mult-comp-cor/fsaverage/lh/cortex
Line 30: Line 36:
It may take a couple of days to run but once it is done, you don't need
to run it again. After that you can just run mri_glmfit-sim
After these are complete, you can just run mri_glmfit-sim and it
should find it. Yyou can put it into a different directory and then
spec that folder when you run mri_glmfit-sim with the --cache-dir
flag.
Line 33: Line 41:
Note, 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

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/lh/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. Yyou 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

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