Hi AFNI experts!
I’m now using afni_proc.py to generate the script for my resting state preprocessing. I followed example 11 and wrote them into a file named preprocess.sh. I hope to just run this file and get the script.
However, when I run this file using ./preprocess.sh or tcsh preprocess.sh, error occurs., as follows:
** error: unknown trailing arguments : [‘\r’]
** failed command (get_user_opts):
afni_proc.py -subj_id cyf
-blocks: Command not found.
-copy_anat: Command not found.
-anat_follower_ROI: Command not found.
-anat_follower_ROI: Command not found.
-anat_follower_ROI: Command not found.
-anat_follower_ROI: Command not found.
-anat_follower_erode: Command not found.
-dsets: Command not found.
-tcat_remove_first_trs: Command not found.
-tlrc_base: Command not found.
-tlrc_NL_warp: Command not found.
-volreg_align_to: Command not found.
-volreg_align_e2a: Command not found.
-volreg_tlrc_warp: Command not found.
-regress_ROI_PC: Command not found.
-regress_make_corr_vols: Command not found.
-regress_anaticor_fast: Command not found.
-regress_anaticor_label: Command not found.
-regress_censor_motion: Command not found.
-regress_censor_outliers: Command not found.
-regress_apply_mot_types: Command not found.
-regress_est_blur_epits: Command not found.
-regress_est_blur_errts: Command not found.
-regress_run_clustsim: Command not found.
However if I just copy those script contents in that file, I can get the generated scripts. They can generate a file named proc.cyf and give me the execution command: tcsh -xef proc.cyf |& tee output.proc.cyf.
I guess this is right. But why can’t I just run the script file to get this command? Could you please tell me what’s wrong?
The contents of the file I use are as follows:
afni_proc.py -subj_id cyf
-blocks despike tshift align tlrc volreg blur mask regress
-copy_anat cyf/SUMA/cyf_SurfVol.nii
-anat_follower_ROI aaseg anat cyf/SUMA/aparc.a2009s+aseg.nii
-anat_follower_ROI aeseg epi cyf/SUMA/aparc.a2009s+aseg.nii
-anat_follower_ROI FSvent epi cyf/SUMA/cyf_vent.nii
-anat_follower_ROI FSWe epi cyf/SUMA/cyf_WM.nii
-anat_follower_erode FSvent FSWe
-dsets cyf/pre_rest_cyf.nii
-tcat_remove_first_trs 10
-tlrc_base MNI_avg152T1+tlrc
-tlrc_NL_warp
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a
-volreg_tlrc_warp
-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.1
-regress_apply_mot_types demean deriv
-regress_est_blur_epits
-regress_est_blur_errts
-regress_run_clustsim no
Thank you!