Hi,

I am preprocessing a resting state dataset using afni_proc. My dataset is fairly short (6 minutes, ~150 time points). The preprocessing steps are fairly straight forward but I have issue preprocessing the majority of my subjects because the way afni_proc applies temporal filtering through regression. I ask it to regress out white matter, CSF, global signals, plus the six motion correction parameters and their derivatives, totaling 15 regressors. But with the temporal filter regressors (sine and cosine waves of the frequencies we are trying to filter out) I end up with 108 regressors, which means for a lot of my subjects, after motion ensoring, there is not enough degrees of freedom to perform the regression and I will have to discard them. I was wondering if there is a way to apply the temporal filter without regressing sine and cosine waves, for example using a Butterworth filter, similar to what MATLAB does. If not, I can perform motion censoring, temporal filtering, and regression of nuisance variables (white matter, CSF, global signal and motion correction parameters) in another software package, but then the question is how do I get afni_proc to calculate white matter, CSF, and global signals plus motion correction parameters for me without regressing them out, so I can load those files in another software package?

Thanks for your help,

Pantea

P.S. Here is my code:

afni_proc.py -subj_id sub-A00000300

-dsets sub-A00000300_ses-20110101_task-rest_bold.nii

-copy_anat sub-A00000300_ses-20110101_acq-mprage_run-01_T1w.nii

-blocks tshift align tlrc volreg mask blur regress

-tcat_remove_first_trs 5

-tlrc_base MNI152_T1_2009c+tlrc

-volreg_align_e2a

-volreg_tlrc_warp

-tlrc_NL_warp

-mask_segment_anat yes

-mask_segment_erode yes

-volreg_align_to MIN_OUTLIER

-regress_ROI WMe CSFe brain

-regress_apply_mot_types demean deriv

-regress_bandpass 0.01 0.1

-blur_size 4

-regress_censor_motion 0.2

-regress_censor_outliers 0.05\

Hi-

Unfortunately, there is no way around the fact that your modeling is using up too many degrees of freedom. Doing regression in a different way here would still use up all (if not more than all!) degrees of freedom, but you just wouldn’t know about it. Performing bandpassing in the regression model is the mathematically consistent way to do it-- and it also prevents one from ending up with highly artifactual data output. I find it odd that other software don’t check for this or model in a similar way, to prevent a researcher from unknowingly converting using up all degrees of freedom.

Changing the method of regressing does not change the basic fact that you would still be using up all your degrees of freedom.

Do you really need to bandpass? I think often people include bandpassing because “other people do it”, but it might not be necessary. I refer to this Resting State Note in afni_proc.py’s help form more information about this:

https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/afni_proc.py_sphx.html#resting-state-note

–pt

Thanks. The choice of filter parameters has been shown to affect the results of resting state connectivity analysis, but I do not know about other types of analysis. I think at least to be able to compare the results with other studies, I need to temporally filter my signals. I agree with your opinion though. How sensitive results of different analyses are to specific choice of filtering parameters has remained relatively unexplored.

I am afraid that certainly some of those “other studies” used up degrees of freedom if they included a huge amount of regressors but in separate steps…

You could consider bandpassing with a wider “allowed frequency” range, perhaps.

Note that resting state processing probably *needs* to include censoring, since spikes would cause big artifactual correlation. Censoring uses up degrees of freedom: for each time point removed, that is one degree of freedom taken out. In AFNI, censoring due to enorm being suprathreshold leads to 2 time points censored (because motion is estimated as a relative difference, when there is a big motion event both time points involved get removed); censoring due to outlier fraction involves just one time point being removed.

These are all additional considerations, but I worry that other studies might not have done the processing correctly, always.

–pt