add regressors to 3dTproject

I have some data that have already been preprocessed using another software. Now I’d like to use 3dTproject to perform a simultaneous nuisance regression + bandpass filtering on these data. I have a text file with the CSF and WM regressors and another file with movement regressors. However I’m not sure how to input these files in the 3dTproject command:

3dTproject -input func_data.nii.gz -automask -bandpass 0.01 0.1 -polort 3 -prefix proj.nii.gz

Thank you very much in advance

Hi Sam,

The other files should be columns of numbers, where each column of each text file would be viewed as a nuisance regressor. For example, the motion parameters are typically stored as a text file with 6 columns. These files can be given to 3dTproject using one or more -ort options.

Has your func_data.nii.gz data been detrended, or even just de-meaned? If so then -automask would not be appropriate. Note that masking is not really needed to be part of this step. It could be applied later if that seemed more reasonable.

  • rick

Thank you Rick. I haven’t detrended the data yet but was thinking of doing it. I suppose there is no option to detrend with 3dTproject, as it would be nice to do everything in one swoop (bandpass, nuisance regression and detrending)? If this is not possible would you recommend using 3dDetrend with default options before 3dTproject? Thank you!

Hi Sam,

Projecting out terms all at one time is exactly what 3dTproject was written to do, including polorts or frequency bands. That is what uses to do bandpassing, motion, tissue, polort, and ANATICOR (voxelwise) regression, as well as censoring, all in one step. Stick with 3dTproject.

  • rick

Hi Rick,
thanks I intend to use, but I’d like to understand some of the afni main commands before starting using afni_proc.
If I understood you correctly detrending will be performed in 3dTproject if I set the -polort flag, so I don’t need to detrend the data before running 3dTproject, right? Do you recommend a particular degree for resting-state data, or is the default -polort 2 adequate?

And can I ask you another question please?

I ran this command:
3dTproject -input func_data.nii.gz -bandpass 0.01 0.1 -polort 3 -prefix proj.nii.gz -ort regr.txt
What exactly is the proj.nii.gz? Is it accurate to say that this file is the cleaned functional data, that is with nuisance regressors regressed out, detrended and bandpass filtered?
The resulting file has values between -12 and 14, which I find strange since my preprocessed functional images (unsmoothed) before 3dTproject have values between 400 and 1300. Does this mean that something failed along the way?