Hello,
I am having issues with the alignment step of the afniproc.py script for 5 of 25 subjects. I’m attaching the script I use and an example of the misalignment in a subject.
#!/bin/tcsh -f
set subjects = “sub028”
foreach s ( $subjects )
cd $s
afni_proc.py -subj_id $s
-script proc.s -scr_overwrite \
-blocks tshift despike align tlrc volreg blur mask scale regress \
-copy_anat {s}t1.nii \
-tcat_remove_first_trs 2 \
-tcat_remove_last_trs 19 \
-dsets \
${s}_scene1.nii \
${s}_scene2.nii \
-volreg_align_to third \
-volreg_align_e2a \
-volreg_tlrc_warp \
-blur_size 5.0 \
-blur_in_automask \
-align_opts_aea -giant_move \
-regress_stim_times \
scene.1d \
-regress_stim_labels \
Scenes \
-regress_basis_multi \
'BLOCK(12)' \
-regress_stim_types times \
-regress_apply_mot_types demean \
-mask_segment_anat yes \
-regress_ROI CSFe WMe \
-regress_censor_motion 0.3 \
-regress_censor_outliers 0.1 \
-regress_est_blur_errts \
-regress_run_clustsim no \
-regress_opts_3dD \
#-num_glt 4 \
#-gltsym 'SYM: -S +Nature' \
#-glt_label 1 Nature-Urban \
#-gltsym 'SYM: +Urban -Nature' \
#-glt_label 2 Urban-Nature \
-bucket stats.${s}.basic \
-jobs 30 \
-write_3dD_script 3dd.block08 \
-write_3dD_prefix basis.block08 \
-regress_3dD_stop \
-regress_reml_exec \
-execute
cd …
end
The 19noAlign.jpg is the output of the above code
Next, I tried different functions for alignment with align_epi_anat.py, specifically:
align_epi_anat.py -epi2anat
-epi pb02.sub002.r01.despike+orig
-anat sub002t1_ns+orig
-epi_base 0 -volreg off -tshift off
-giant_move
-cost lpc -multi_cost lpa lpc+ZZ mi
My alignment isn’t good for any of the cost functions but for this subject al_lpa was the closest. I’ve found too that different subjects have functions that work better but none work perfectly.
Any suggestions on what’s going on or what I should do differently?