group mask for whole brain 3dclustsim

Hello,

I feel like this is fairly straightforward thing to do, but I also don’t see much discussion around the different options of how people do this and how these decisions could impact thresholding estimates.

For a whole brain 3dclustsim thresholding calculation, do you have recommendations on how to calculate the group average mask? For example, do you recommendations on if and which type of masking threshold should be used?

Thanks!

Hi-

There is discussion of this in the AFNI Bootcamp data/talks. In AFNI_demos/AFNI_pamenc/AFNI_02_pamenc/, there is a script called: global_process_outline.txt, and this contains some start-to-finish ideas for processing a (task) FMRI set, including things to run before afni_proc.py, running afni_proc.py itself and then doing “post-analysis QC and group prep”. One of the steps in the latter section involves combine individual masks to make a group mask.

It is worth checking out the whole script and comments, but some ideas for making a group mask are looking for, say, 70% overlap (something that seems reasonable) or going for strict intersection (reasonable also, but smaller):


# generate 70% group mask and related (or intersection mask)
3dmask_tool -input sub*/*.results/mask_epi_anat*.HEAD \
            -prefix QC/group_mask.7 -frac 0.7
3dmask_tool -input sub*/*.results/mask_epi_anat*.HEAD \
            -prefix QC/group_mask.inter -frac 1.0

… and see section A-2 here for some comments about making a group mask:
https://www.biorxiv.org/content/10.1101/308643v1.abstract

–pt

Thank you so much!

I’ll dig into these resources to see how much this matters, but one thing I forgot to specify is that these are for data where the first level models were run in spm, so our files are .nii.

(I know the spm-afni combo is a larger topic for 3dclustsim in general, but we are already making sure acf parameters are being calculated from first level residuals, then averaged and our rx models are in afni; moving forward, the plan is to not combine!)

Hi-

NIFTI or BRIK/HEAD makes absolutely no difference to AFNI. The only thing that changes is your file-selection glob:


# generate 70% group mask and related (or intersection mask)
3dmask_tool -input sub*/*.results/mask_epi_anat*.nii* \
            -prefix QC/group_mask.7 -frac 0.7
3dmask_tool -input sub*/*.results/mask_epi_anat*.nii* \
            -prefix QC/group_mask.inter -frac 1.0

Using SPM or AFNI for processing individual subjects is entirely your choice; obviously, I am more familiar with one of those two softwares… You just want to make sure you have scaled your data meaningfully. See:
https://pubmed.ncbi.nlm.nih.gov/27729277/
Some other important issues to consider in analysis are also contained in the paper from the above link in the earlier message.

–pt

fantastic, thank you!

I have related question to the one above.

I’m trying to make sure I’m understand how the different parts of how 3dclustsim works since I’m using with first level models runs in spm.

Note: I’ve calculated my acf parameters from the first level residuals to ensure I’m not calculating acf parameters from residual files of my stats model at rx level.

I noticed if I don’t specify a grey matter mask (i.e., no mask flag) in my 3dclustsim analysis, my k values are much lower. Intuitively, I would have expected the opposite. My goal is to include the whole brain in my calculation.

Could you help tease apart why my values vary so dramatically between using a grey matter mask (more stringent p/k value ratios) and no mask? I’m assuming the k values provides with the grey matter mask are correct because they are more stringent, but I just want to make sure I’m understanding why.

Thanks again!