Resting State 3dTproject Warning: 51,787 Constant Vectors

Hi Experts!

I am preprocessing resting state data in an older sample. I modeled my processing pipeline after Example 11 of afni_proc.py (included below). I got a warning following the execution of 3dTproject stating that 51,787 vectors are constant in the dataset:


3dTproject -polort 3 -prefix rm.det_pcin_r01 -censor rm.censor.r01.1D -cenmode KILL -input pb03.sub-002.r01.v$
++ 3dTproject: AFNI version=AFNI_20.1.06 (May  4 2020) [64-bit]
++ Authored by: Cox the Algebraic (Linear)
++ input time points = 136 ; censored = 8 ; remaining = 128
++ Setting up regressors
++ 1 Blocks * 4 polynomials -- 4 polort regressors
++ 128 retained time points MINUS 4 regressors ==> 124 D.O.F. left
++ no -mask option ==> processing all 311296 voxels in dataset
++ Compute pseudo-inverse of fixed orts
++ Loading dataset
^[[7m*+ WARNING:^[[0m 3dTproject input data :: 51787 vectors are cconstant
++ Starting project-orization
++ Convert results to output dataset
++ Output dataset ./rm.det_pcin_r01+tlrc.BRIK

My input EPI dataset is not skull stripped. Considering, this is such a large number of voxels (51,787/311,296), does this suggest there is an issue with the data? Any input would be greatly appreciated!

Thanks for your help!
Jenna


afni_proc.py                                                                                                            \
                 -subj_id ${sid} -script proc.${sid} -scr_overwrite -out_dir ${sid}.results                             \
                 -blocks despike tshift align tlrc volreg blur mask scale                                               \
                     regress                                                                                            \
                 -radial_correlate_blocks tcat volreg                                                                   \
                 -copy_anat ${ss_dir}/anatSS.${sid}.nii                                                                 \
                 -anat_has_skull no                                                                                     \
                 -anat_follower anat_w_skull anat  ${ss_dir}/anatU.${sid}.nii                                           \
                 -anat_follower_ROI aaseg anat ${fs_dir}/aparc.a2009s+aseg.nii.gz                                       \
                 -anat_follower_ROI aeseg epi ${fs_dir}/aparc.a2009s+aseg.nii.gz                                        \
                 -anat_follower_ROI FSvent epi ${fs_dir}/fs_ap_latvent.nii.gz                                           \
                 -anat_follower_ROI FSWe epi ${fs_dir}/fs_ap_wm.nii.gz                                                  \
                 -anat_follower_erode FSvent FSWe                                                                       \
                 -dsets ${raw_epi}                                                                                      \
                 -tcat_remove_first_trs 4                                                                               \
                 -tshift_opts_ts -tpattern altplus                                                                      \
                 -align_opts_aea -cost lpc+ZZ -giant_move -check_flip                                                   \
                 -tlrc_base MNI152_2009_template_SSW.nii.gz                                                             \
                 -tlrc_NL_warp                                                                                          \
                 -tlrc_NL_warped_dsets ${ss_dir}/anatQQ.${sid}.nii ${ss_dir}/anatQQ.${sid}.aff12.1D                     \
                     ${ss_dir}/anatQQ.${sid}_WARP.nii                                                                   \
                 -volreg_align_to MIN_OUTLIER                                                                           \
                 -volreg_align_e2a                                                                                      \
                 -volreg_tlrc_warp                                                                                      \
                 -blur_size 4                                                                                           \
                 -mask_epi_anat yes                                                                                     \
                 -regress_motion_per_run                                                                                \
                 -regress_ROI_PC FSvent 3                                                                               \
                 -regress_ROI_PC_per_run FSvent                                                                         \
                 -regress_make_corr_vols aeseg FSvent                                                                   \
                 -regress_anaticor_fast                                                                                 \
                 -regress_anaticor_label FSWe                                                                           \
                 -regress_censor_motion 0.3										\
		 -regress_apply_mot_types demean deriv                                                                  \
                 -regress_est_blur_epits                                                                                \
                 -regress_est_blur_errts                                                                                \
                 -html_review_style pythonic

Hi Jenna,

That is probably due to the extents mask, which only includes voxels that have valid signal at every time point.

In the volreg block, the time series are project to standard space where the volume matches that of the template (at a resolution akin to the original EPI). This volume typically covers more space than the original EPI, and so all voxels that are outside the original, warped EPI shoe box are all zero. These volumes will be constant 0. Overlay the volreg time series on the final_anat. You will probably get an idea of the original EPI box that does not cover the entire anat box.

It might be nicer to apply the extents mask in that 3dTproject command, but I have not taken the effort to do so, since it will not really affect the time much, nor will it affect the results. There are other commands where I could add similar masking. It is included where it would make a difference, but not everywhere where it would not.

Does that seem reasonable?

  • rick

Hi Rick,

Thank you for the information. I’ve attached a picture here of the pb0*volreg volume overlayed on the anat_final. Just to make sure I understand, does this mean that during the 3dTproject step that all voxels outside of the anat_final space (non-brain; yellow and blue voxels) are set to 0 which is why such a high number of voxels (51,787) have a constant timeseries?

Thank you!
Jenna

Screen Shot 2021-08-02 at 9.13.11 AM.png

Hi Rick,

Just checking in on this again. I’ve attached an image of the volreg overlay on the anat final. If I’m interpreting correctly, I would think that the voxels that would be most affected by the extents mask would be the voxels near the outer boundary box of the EPI, rather than all voxels outside of the brain (yellow/blue voxels). Do you find it concerning that such a large number of voxels (~15%) in the EPI dataset are constant?

Thank you!
Jenna

Hi Jenna,

I could have sworn I replied to your previous post, but maybe I never quite finished and then forgot, sorry.

Yes, it should be the voxel outside the extents mask (black in the overlay) that are all zero over time, and therefore constant. Perhaps lazily, no mask is provided to 3dTproject by afni_proc.py (it does not really matter, and would even be irrelevant as a speed-up) in this case, so the program is “surprised” by the constant time series. Note that 15% is not too much. That means the EPI box overlaps 85% of the template box, which is pretty good. And that only includes voxels which have valid data across all time points.

This seems to be no big deal. Sorry for the confusion.

  • rick

Hi Rick,

No problem! Thank you for the explanation - this makes sense. Thank you for your help!

Jenna