AFNI version info (afni -ver
):
I'm creating an afni_proc.py script for multi-echo fMRI and I'm facing a strange issue regarding the obliquity during the blip step.
Here is the script
afni_proc.py \
-subj_id sub-${SUB}_task-${TASK}.simple \
-outdir ${SBJDIR}/derivatives/afni_proc/sub-${SUB}_task-${TASK}.simple.results \
-dsets_me_run ${SBJDIR}/func/${SUBSES}_task-${TASK}_run-01_echo-*_bold.nii.gz \
-echo_times 10.60 28.69 46.78 64.87 82.96 \
-blip_forward_dset "${SBJDIR}/fmap/${SUBSES}_acq-${TASK}_dir-AP_epi.nii.gz" \
-blip_reverse_dset "${SBJDIR}/fmap/${SUBSES}_acq-${TASK}_dir-PA_epi.nii.gz" \
-copy_anat "${SSwarperDIR}/anatSS.sub-${SUB}.nii.gz" \
-anat_has_skull no \
-anat_follower anat_w_skull anat "${SSwarperDIR}/anatU.sub-${SUB}.nii" \
-blocks despike tshift volreg combine \
align tlrc blur mask scale regress \
-radial_correlate_blocks tcat volreg regress \
-tcat_remove_first_trs 10 \
-tshift_interp -wsinc9 \
-align_unifize_epi local \
-align_opts_aea -cost lpc+ZZ \
-giant_move \
-volreg_align_to MIN_OUTLIER \
-volreg_compute_tsnr yes \
-volreg_align_e2a \
-volreg_post_vr_allin yes \
-volreg_pvra_base_index MIN_OUTLIER \
-volreg_warp_dxyz 2.5 \
-volreg_warp_final_interp wsinc5 \
-reg_echo 1 \
-tlrc_base MNI152_2009_template.nii.gz \
-tlrc_NL_warp \
-tlrc_NL_warped_dsets "${SSwarperDIR}/anatQQ.sub-${SUB}.nii" \
"${SSwarperDIR}/anatQQ.sub-${SUB}.aff12.1D" \
"${SSwarperDIR}/anatQQ.sub-${SUB}_WARP.nii" \
-mask_epi_anat yes \
-combine_method OC \
-blur_size 4 \
-blur_in_automask \
-regress_censor_motion 0.2 \
-regress_censor_outliers 0.05 \
-regress_motion_per_run \
-regress_apply_mot_types demean deriv \
-regress_mot_as_ort yes \
-html_review_style pythonic
The prompt of the error is
-- applying input view as +orig
** warning: removing first 10 TRs from beginning of each run
--> the stimulus timing files must reflect the removal of these TRs
-- template = 'MNI152_2009_template.nii.gz', exists = 1
-- have APQC atlas APQC_atlas_MNI_2009c_asym.nii.gz
** error: reverse blip obliquity (0) does not match EPI (1)
** invalid block : blip
----------------------------------------------------------------------
** failed command (create_blocks):
afni_proc.py -subj_id sub-007_task-rest.simple -dsets_me_run \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/func/sub-007_ses-01_task-rest_run-01_echo-1_bold.nii.gz \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/func/sub-007_ses-01_task-rest_run-01_echo-2_bold.nii.gz \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/func/sub-007_ses-01_task-rest_run-01_echo-3_bold.nii.gz \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/func/sub-007_ses-01_task-rest_run-01_echo-4_bold.nii.gz \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/func/sub-007_ses-01_task-rest_run-01_echo-5_bold.nii.gz \
-echo_times 10.60 28.69 46.78 64.87 82.96 -blip_forward_dset \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/fmap/sub-007_ses-01_acq-rest_dir-AP_epi.nii.gz \
-blip_reverse_dset \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/fmap/sub-007_ses-01_acq-rest_dir-PA_epi.nii.gz \
-copy_anat \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/derivatives/SSwarper2/anatSS.sub-007.nii.gz \
-anat_has_skull no -anat_follower anat_w_skull anat \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/derivatives/SSwarper2/anatU.sub-007.nii \
-blocks despike tshift volreg combine align tlrc blur mask scale \
regress -radial_correlate_blocks tcat volreg regress \
-tcat_remove_first_trs 10 -tshift_interp -wsinc9 -align_unifize_epi \
local -align_opts_aea -cost lpc+ZZ -giant_move -volreg_align_to \
MIN_OUTLIER -volreg_compute_tsnr yes -volreg_align_e2a \
-volreg_post_vr_allin yes -volreg_pvra_base_index MIN_OUTLIER \
-volreg_warp_final_interp wsinc5 -reg_echo 1 -tlrc_base \
MNI152_2009_template.nii.gz -tlrc_NL_warp -tlrc_NL_warped_dsets \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/derivatives/SSwarper2/anatQQ.sub-007.nii \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/derivatives/SSwarper2/anatQQ.sub-007.aff12.1D \
/export/home/ccaballero/ccaballero/MRI_PhD_training//sub-007/ses-01/derivatives/SSwarper2/anatQQ.sub-007_WARP.nii \
-mask_epi_anat yes -combine_method OC -blur_size 4 -blur_in_automask \
-regress_censor_motion 0.2 -regress_censor_outliers 0.05 \
-regress_motion_per_run -regress_apply_mot_types demean deriv \
-regress_mot_as_ort yes -html_review_style pythonic
----------------------------------------------------------------------
However, when I check the obliquity of the datasets, they seem to be identical.
[ccaballero@BRODMANN157 fmap]$ 3dinfo -obliquity sub-007_ses-01_acq-rest_dir-AP_run-01_epi.nii.gz
** AFNI converts NIFTI_datatype=512 (UINT16) in file /bcbl/home/home_a-f/ccaballero/MRI_PhD_training/sub-007/ses-01/fmap/sub-007_ses-01_acq-rest_dir-AP_run-01_epi.nii.gz to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
34.806
[ccaballero@BRODMANN157 fmap]$ 3dinfo -obliquity sub-007_ses-01_acq-rest_dir-PA_run-01_epi.nii.gz
** AFNI converts NIFTI_datatype=512 (UINT16) in file /bcbl/home/home_a-f/ccaballero/MRI_PhD_training/sub-007/ses-01/fmap/sub-007_ses-01_acq-rest_dir-PA_run-01_epi.nii.gz to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
34.806
[ccaballero@BRODMANN157 fmap]$ cd ..
[ccaballero@BRODMANN157 ses-01]$ cd func/
[ccaballero@BRODMANN157 func]$ 3dinfo -obliquity sub-007_ses-01_task-rest_run-01_echo-1_bold.nii.gz
** AFNI converts NIFTI_datatype=512 (UINT16) in file /bcbl/home/home_a-f/ccaballero/MRI_PhD_training/sub-007/ses-01/func/sub-007_ses-01_task-rest_run-01_echo-1_bold.nii.gz to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
34.806
This makes sense because these datasets were collected with the same volume and orientation. Therefore, I don't understand what the source of the error could be. Could you please help me to solve this issue or point me to a possible solution?
For your information, I 'm using the following AFNI version:
Precompiled binary linux_openmp_64: May 23 2025 (Version AFNI_25.1.11 'Maximinus'
Thanks very much