regressing out WM in afni_proc.py

Hello,

I have a simple monkey/animal_warper/afni_proc.py question. I am modifying the MACAQUE_DEMO_REST pipeline.
If I want to use eroded WM signal as a nuisance regressor in afni_proc (whether via anaticor or as averaged WM), and I have WM mask from the NMT template, I should import the mask in NMT space into afni_proc, correct?

So this:


afni_proc.py                                                              \
[...]
        -mask_import             WM_mask ${additional_path}/WMe_mask+tlrc     \
[...]
        -regress_ROI             WM_mask                                      \

or this


afni_proc.py                                                              \
[...]
        -mask_import             WM_mask ${additional_path}/WMe_mask+tlrc     \
[...]
        -regress_anaticor_fast                                                \
        -regress_anaticor_radius  20                                          \
        -regress_anaticor_label   WM_mask                                      \

instead of


afni_proc.py                                                              \
[...]
        -anat_follower_ROI       WMmask epi ${odir_aw}'/'WM_anat_mask+orig    \
        -anat_follower_erode     WMmask                                       \
[...]                       
        -regress_anaticor_fast                                                \
        -regress_anaticor_radius  20                                          \
        -regress_anaticor_label   WMmask                                      \

because the latter would involve warping the WM mask from the NMT to individual space in animal warper and then warping it back to NMT space in afni_proc, right?

Hi Pawel,

Sorry for missing this.

You seem to understand correctly.

In your first example (-mask_import), the mask is assumed to be in the final registration space. And with -regress_ROI, it will regress out the average time series over that ROI. That is a single regressor applied to all voxels.

For the second example, instead of using the single regressor, each voxel gets is own regressor: the Gaussian-weighted average of the white matter, weighted by distance to the given voxel. Since the example uses -mask_import, the mask is still assumed to be in the final voxel space (and on the final EPI grid).

The third example uses -anat_follower*, which implies the mask is aligned with the INPUT anatomical dataset (passed via -copy_anat). The mask will be eroded and transformed to the final space in the same way that the original anat is transformed. After that, the anaticor_fast method will be applied to generate a regressor for each voxel as in the previous example.

So yes, if in the third example the WM_anat_mask is already in the final space, that would not be appropriate. If that is the case, start with -mask_import.

  • rick

Thanks, Rick!

Pawel