Error using afni_proc.py Example 11

Hi,

I am trying to use afni_proc.py for the analysis of resting state data. I only have 1 run per subject.

I tried to apply Example 11 to my data as follow:

afni_proc.py -subj_id H018.rest
-blocks despike tshift align tlrc volreg blur mask
scale regress
-copy_anat H018_SurfVol.nii
-anat_follower_ROI aaseg anat aparc.a2009s+aseg.nii
-anat_follower_ROI aeseg epi aparc.a2009s+aseg.nii
-anat_follower_ROI FSvent epi H018_vent.nii
-anat_follower_ROI FSWe epi H018_white.nii
-anat_follower_erode FSvent FSWe
-dsets func/H018_rest.nii
-tcat_remove_first_trs 2
-align_opts_aea -cost lpc+ZZ
-tlrc_base MNI152_2009_template_SSW.nii.gz
-tlrc_NL_warp
-tlrc_NL_warped_dsets anatQQ.H018.nii
anatQQ.H018.aff12.1D
anatQQ.H018_WARP.nii
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a
-volreg_tlrc_warp
-mask_epi_anat yes
-regress_motion_per_run
-regress_ROI_PC FSvent 3
-regress_make_corr_vols aeseg FSvent
-regress_anaticor_fast
-regress_anaticor_label FSWe
-regress_censor_motion 0.2
-regress_censor_outliers 0.05
-regress_apply_mot_types demean deriv
-regress_est_blur_epits
-regress_est_blur_errts

but it ended up with the following error: ** error: option -regress_motion_per_run follows unknot arg #52 (-mask_epi_anat), and even removing that line the error still occurred likely related to a problem with(-mask_epi_anat. Do you have any suggestion?

Thank you very much,
Giulia

Hi, Giulia-

Just to make sure that your AFNI version is uptodate, what is the output of:


afni -ver

?

Thanks,
pt

Hi Paul,

the AFNI version on the server I am working on is 17.1.12. I’ll try to process one subject on my PC which has the latest AFNI version.

Thanks,
Giulia

Hi again,

I tried using the uptodate version but I have the following error:
afni_proc.py -subj_id H018.rest \

     -blocks despike tshift align tlrc volreg blur mask         \
             scale regress                                      \
     -copy_anat H018_SurfVol.nii                                  \
     -anat_follower_ROI aaseg anat aparc.a2009s+aseg.nii        \
     -anat_follower_ROI aeseg epi  aparc.a2009s+aseg.nii        \
     -anat_follower_ROI FSvent epi H018_vent.nii                  \
     -anat_follower_ROI FSWe epi H018_WM.nii                   \
     -anat_follower_erode FSvent FSWe                           \
     -dsets func/H018_rest.nii.gz                                \
     -tcat_remove_first_trs 2                                   \
     -align_opts_aea -cost lpc+ZZ                               \
     -tlrc_base MNI152_2009_template_SSW.nii.gz                 \
     -tlrc_NL_warp                                              \
     -tlrc_NL_warped_dsets anatQQ.H018.nii                        \
                           anatQQ.H018.aff12.1D                   \
                           anatQQ.H018_WARP.nii                   \
     -volreg_align_to MIN_OUTLIER                               \
     -volreg_align_e2a                                          \
     -volreg_tlrc_warp                                          \
     -mask_epi_anat yes                                         \
     -regress_motion_per_run                                    \
     -regress_ROI_PC FSvent 3                                   \
     -regress_make_corr_vols aeseg FSvent                       \
     -regress_anaticor_fast                                     \
     -regress_anaticor_label FSWe                               \
     -regress_censor_motion 0.2                                 \
     -regress_censor_outliers 0.05                              \
     -regress_apply_mot_types demean deriv                      \
     -regress_est_blur_epits                                    \
     -regress_est_blur_errts

– applying input view as +orig
** warning: removing first 2 TRs from beginning of each run
→ the stimulus timing files must reflect the removal of these TRs
** warning: have duplicate anat follower: aparc.a2009s+aseg.nii
** Failed “3dnvals -all /Users/giuliaavvenuti/Documents/H018/anatQQ.H018.nii”
** error in -tlrc_NL_warped_dsets p1: tlrc anat should be 1 volume,
but dataset anatQQ.H018.nii shows -1
** invalid block : tlrc

** failed command (create_blocks):

afni_proc.py -subj_id H018.rest -blocks despike tshift align tlrc volreg
blur mask scale regress -copy_anat H018_SurfVol.nii -anat_follower_ROI
aaseg anat aparc.a2009s+aseg.nii -anat_follower_ROI aeseg epi
aparc.a2009s+aseg.nii -anat_follower_ROI FSvent epi H018_vent.nii
-anat_follower_ROI FSWe epi H018_WM.nii -anat_follower_erode FSvent
FSWe -dsets func/H018_rest.nii.gz -tcat_remove_first_trs 2
-align_opts_aea -cost lpc+ZZ -tlrc_base MNI152_2009_template_SSW.nii.gz
-tlrc_NL_warp -tlrc_NL_warped_dsets anatQQ.H018.nii
anatQQ.H018.aff12.1D anatQQ.H018_WARP.nii -volreg_align_to MIN_OUTLIER
-volreg_align_e2a -volreg_tlrc_warp -mask_epi_anat yes
-regress_motion_per_run -regress_ROI_PC FSvent 3
-regress_make_corr_vols aeseg FSvent -regress_anaticor_fast
-regress_anaticor_label FSWe -regress_censor_motion 0.2
-regress_censor_outliers 0.05 -regress_apply_mot_types demean deriv
-regress_est_blur_epits -regress_est_blur_errts

Thank you again,
Giulia

Hi, Giulia-

I think that this part of the error:


** Failed "3dnvals -all /Users/giuliaavvenuti/Documents/H018/anatQQ.H018.nii"
** error in -tlrc_NL_warped_dsets p1: tlrc anat should be 1 volume,
but dataset anatQQ.H018.nii shows -1

means that afni_proc.py cannot find your anatQQ.H018.nii file. In that usage, 3dnvals will return the four dimensions of your matrix (3 spatial, one time). For example, for my 152 vol dset here:


3dnvals -all CD/AFNI_data6/afni/epi_r1+orig.
80 80 33 152

Returning ‘-1’ means that it can’t find it. So, can you check the path (location) of that file on your system?

Right now, afni_proc.py thinks it is in:


/Users/giuliaavvenuti/Documents/H018/anatQQ.H018.nii

… but is that really the case? (And the same will apply to the other anatQQ* dsets being entered there.)

–pt

That suggests the dataset does not exist. What is the output of
ls -l anatQQ.H018.nii
or
3dinfo anatQQ.H018.nii

Are those datasets in a subdirectory?

  • rick