Dear AFNI experts,

I ran below which generated align_tlrc.jpg attached. For this, both anat (T1) and epi files were generated as tlrc format.
-anat T1w_acpc_dc_restore.nii.gz
-epi ${subj}_REST1_LR+orig
-epi_base 0
-volreg off
-cost lpa+ZZ

Therefore, when running run the , it showed the error below, which is the same as here (3dBucket error: output dataset name 'filename" conflicts with existing file)

3dbucket -prefix subj_T1.nii.gz
++ 3dbucket: AFNI version=AFNI_19.0.06 (Feb 4 2019) [64-bit]
** ERROR: output dataset name ‘subj_T1.nii.gz’ conflicts with existing file
** ERROR: dataset NOT written to disk!

Here is the proc py script I used.
-blocks despike align tlrc blur mask regress
-copy_anat /Volumes/Elements/RS/{subj}/sub_T1.nii.gz \ -anat_follower_ROI aaseg anat /Volumes/Elements/RS/{subj}/aparc.a2009s+aseg.nii.gz
-anat_follower_ROI aeseg epi /Volumes/Elements/RS/{subj}/aparc.a2009s+aseg.nii.gz \ -anat_follower_ROI FSvent epi /Volumes/Elements/RS/{subj}/vent.nii.gz
-anat_follower_ROI FSWm epi /Volumes/Elements/RS/{subj}/wm.nii.gz \ -anat_follower_erode FSvent FSWm \ -dsets /Volumes/Elements/RS/8/{subj}/{subj}_REST+orig \ -out_dir Proc_results_R2LR \ -script py_result_{subj}_script
-subj_id ${subj}_V1_MR
-align_opts_aea -cost lpa -cost lpa+ZZ -giant_move
-tlrc_base MNI152_T1_2009c+tlrc
-tlrc_NL_awpy_rm no
-regress_ROI_PC FSvent 3
-regress_make_corr_vols aeseg FSvent
-regress_anaticor_label FSWm
-regress_censor_motion 0.2
-regress_censor_outliers 0.1
-regress_apply_mot_types demean deriv

According to the suggestion from RIck in this thread (3dBucket error: output dataset name 'filename" conflicts with existing file), I changed the view to orig using this command line: setenv AFNI_NIFTI_VIEW orig

After that when running using the same script, the alignment of the anat (T1) and epi files in orig are not as good as tlrc. (attached files including align orig_1). Could you please advise how to resolve this issue?



I’m a little confused. Did you first run, and now you are separately running in the same directory? If so, I was wondering why you are running this separately, after the analysis is complete?

Separately, in this line of the command:

-align_opts_aea -cost lpa -cost lpa+ZZ -giant_move \

… “-cost …” should not be specified twice. Also, generally neither lpa or lpa+ZZ should be used for EPI-anatomical alignment, because those two volumes have opposite tissue contrasts (NB: if a subject has an injection, sometimes that can change the relative EPI contrast, but such cases are rare). We would generally recommend using “lpc” or “lpc+ZZ” there, instead.

For your FreeSurfer follower ROIs, please check out this helpful page:
In general, the REN datasets would be preferred to the “aparc.a2009s+aseg.nii.gz” ones. Also, there are WM and ventricle maps created for users in the output SUMA/ directory.

It is a little odd not to see a ‘volreg’ block, for motion estimation and reduction. I am not sure what this line:

-regress_apply_mot_types demean deriv \

… will do then, since there aren’t motion regressors to demean or derivatize?


Hi pt,

Thank you so much for the help! align epi anat was performed prior to the proc py. volreg was removed since using epi_al+tlrc generated an error message that volre should be removed in the proc py script.

I realized that SUMA on the freesurfer outputs wasn’t administered so performed SUMA and the alignment looks good. Thanks!