the problem about“cnesor”and “regress_apply_mot_types”in afni_proc.py

Hi,

I am confused on how to setup the afni_proc.py script to analyze my fMRI task about listening to story. In my experiment, the subjects are instructed to listen to two four-minute stories(one story, one run), and I want to make the correlation of two runs. But I encountered some problems in afni_proc.py script. This is my script:

afni_proc.py -subj_id sub9.c.demean.blur6
-dsets s9.1+orig.HEAD s9.4+orig.HEAD
-blocks despike tshift align tlrc volreg blur mask scale regress
-copy_anat anat+orig
-align_opts_aea -deoblique on -cost lpc+ZZ
-tlrc_base TT_N27+tlrc
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a
-volreg_tlrc_warp
-blur_size 6.0
-regress_censor_motion 0.2
-regress_censor_outliers 0.1
-regress_motion_per_run
-regress_apply_mot_types demean deriv
-regress_est_blur_epits
-regress_est_blur_errts
-execute

I have two questions for your guidance:

First, in" -regress_censor_motion 0.2" and “regress_censor_outliers 0.1”. in my experiment, I’m not sure whether I should use the censor in the afni_proc.py, because the censor out TR value is 0, This may affect voxel-by-voxel correlation.

Second, in" -regress_apply_mot_types “, I saw three options in the afni website,” -regress_apply_mot_types basic", " -regress_apply_mot_types demean deriv " and " -regress_apply_mot_types deriv " . I’ve tried each of the three options and found they were different, I’m not sure which option to choose. My colleague gave me some advice, but we didn’t reach a consistent result. So could someone give me a reasonable suggestion?

thanks a lot,
Dan

Hi Dan,

This is akin to resting state analysis, except that you are correct, censoring is not an option here (unless it were combined across the 2 runs, would be more difficult to script). Censoring is okay for seed-based correlations, but that is because all voxels would have the same censoring. Here, you might want to just skip it.

Using ‘basic’ and ‘demean’ should lead to the exact same results, except for the polort 0 terms (which you will probably never see). The ‘deriv’ case also regresses the 6 first differences, so those results will differ. In this case, akin to resting state, it would probably be better to include the deriv terms, too, especially since you will probably not be censoring.

  • rick

Hi rick,

Thanks again for your help. I still have two questions for you, which may seem silly.

First, you mentioned that " Using ‘basic’ and ‘demean’ should lead to the exact same results, except for the polort 0 terms ".

  1. In the proc file generated by proc.py, I don’t know whether the ’ polort 0 ’ you mentioned is in " running the regression analysis " (polort default value is 1) or in " using 3dTproject to project out regression matrix " (polort default value is 2). In my proc file , polort value is 2 in " running the regression analysis " , but polort value is 0 in " using 3dTproject to project out regression matrix ".

  2. Using ‘basic’ and ‘demean deriv’, I got different results in the same subject. TSNR average is 260.187 in ’ basic ’ , TSNR average is 267.431 in ’ demean deriv '. And the voxel by voxel correlation results between 2 runs are also different in basic and demean deriv.

This is my script.
(1) " -regress_apply_mot_types basic " in afni_proc.py
#!/bin/tcsh
###nocensor basic blur6
afni_proc.py -subj_id sub6.no.basic.blur6
-dsets s6.1+orig.HEAD s6.4+orig.HEAD
-blocks despike tshift align tlrc volreg blur mask scale regress
-copy_anat anat+orig
-align_opts_aea -deoblique on -cost lpc+ZZ
-tlrc_base TT_N27+tlrc
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a
-volreg_tlrc_warp
-blur_size 6.0
-regress_apply_mot_types basic
-regress_est_blur_epits
-regress_est_blur_errts
-execute
The proc file in attach file ‘nocensor.basic’.
(2) " -regress_apply_mot_types demean deriv " in afni_proc.py
#!/bin/tcsh
###nocensor demean deriv blur6
afni_proc.py -subj_id sub6.no.demean.blur6
-dsets s6.1+orig.HEAD s6.4+orig.HEAD
-blocks despike tshift align tlrc volreg blur mask scale regress
-copy_anat anat+orig
-align_opts_aea -deoblique on -cost lpc+ZZ
-tlrc_base TT_N27+tlrc
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a
-volreg_tlrc_warp
-blur_size 6.0
-regress_apply_mot_types demean deriv
-regress_est_blur_epits
-regress_est_blur_errts
-execute
The proc file in attach file ‘nocensor.demean’.

Second,I don’t understand the meaning of " The ‘deriv’ case also regresses the 6 first differences, so those results will differ. ".Could you explain it in more detail?

Thanks a lot,
Dan

Hi Dan,

  1. The polort 0 terms that I mentioned are the beta weights for the constant terms in the linear regression. You are probably not even getting them as output (by default, they are not output). Given that, it might be more simple to just say that ‘basic’ and ‘demean’ should produce identical results.

  2. Using ‘demean deriv’ will certainly differ. That includes the 6 extra regressors. You should expect that to be different from ‘basic’ or just ‘demean’.

Look at the motion_demean.1D and motion_deriv.1D plots, e.g.

1dplot -sepscl motion_demean.1D &
1dplot -sepscl motion_deriv.1D &

Using “-regress_apply_mot_types demean” will include that first set of 6 time series in the regression. Including ‘deriv’ means including the second set of 6 as additional regressors. That will change the result.

  • rick

Hi rick,

Thanks for your help ! And I think using “-regress_apply_mot_types demean deriv” is better for my experiment with your help.

Thanks again for your generous help!

Dan