"follows unknown arg"- error from afni_proc.py

Hello AFNI experts,

I got the following “follows unknown arg” error when running afni_proc.py but could not figure out the reason. Could you please help.
(I am using AFNI 17.0.18 and afni_proc.py 5.13)

Thank you,
Duong

++++++++++++++++++++ SCRIPT +++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/tcsh -xef

Include all sections, or some particular sections, of data here. Folder names are the same as those copied from ‘/Users/papageor/Desktop/data/indcm’

set datasets = (‘20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917’)
set dataset_num = (count -digits 1 1 ${#datasets})

Params - Make sure to check epi run indices. Defaults = runs 3 and 4

set inprefix = ‘001_’
set anat_run_ind = ‘000002_’
set epi_run_ind = (‘000003_’ ‘000004_’)
set epi_run_num = (count -digits 1 1 ${#epi_run_ind})
set dicomFolder = ‘indcm’
set epiFolder = ‘funcHeadBrik’
set anatFolder = ‘anatHeadBrik’
set epi_outprefix = ‘epi’
set anat_outprefix = ‘anat’

set numSlices = 33
set sliceOrder = ‘alt+z’
set TR = 2.0

Afni_proc.py

foreach dat ($dataset_num)
foreach runInd ($epi_run_num)
set subj = $datasets[$dat]
afni_proc.py -subj_id $subj
-script ./proc_r$runInd.sh
-out_dir $subj.results
-dsets ./$datasets[$dat]/$epiFolder/epi.r?+orig.HEAD
-blocks despike tshift volreg align tlrc blur mask scale regress
-anat_has_skull yes
-tcat_remove_first_trs 6
-tcat_remove_last_trs 4
-tshift_opts_ts -tpattern $sliceOrder
-tshift_align_to -slice 17
-copy_anat ./$datasets[$dat]/$anatFolder/anat.r1+orig
-volreg_align_to first
-volreg_align_e2a
-volreg_tlrc_warp
-align_opts_aea -giant_move
-tlrc_opts_at -init_xform AUTO_CENTER
-blur_size 7
-regress_stim_times ./stim_times/run$runInd/baseline.txt
./stim_times/run$runInd/left.txt
./stim_times/run$runInd/right.txt
./stim_times/run$runInd/up.txt
./stim_times/run$runInd/down.txt
-regress_stim_labels b
L
R
U
D
-regress_local_times
-regress_reml_exec
-regress_est_blur_epits
-regress_est_blur_errts
-regress_basis ‘BLOCK(12,1)’
‘BLOCK(30,1)’
‘BLOCK(30,1)’
‘BLOCK(30,1)’
‘BLOCK(30,1)’
-regress_censor_outliers 0.1
-regress_censor_motion 0.3
-regress_opts_3dD
-num_glt 4
-gltsym ‘SYM: +L -b’ -glt_label 1 L-b
-gltsym ‘SYM: +R -b’ -glt_label 2 R-b
-gltsym ‘SYM: +L -R’ -glt_label 3 L-R
-gltsym ‘SYM: +U -D’ -glt_label 3 U-D
-jobs 4
-execute
end
end
+++++++++++++++++++++++++++++++++ END SCRIPT ++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++ WHAT I GOT +++++++++++++++++++++++++++++++++++++++++++++++++
set datasets = ( 20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917 )
set dataset_num = ( count -digits 1 1 ${#datasets} )
count -digits 1 1 1
set inprefix = 001_
set anat_run_ind = 000002_
set epi_run_ind = ( 000003_ 000004_ )
set epi_run_num = ( count -digits 1 1 ${#epi_run_ind} )
count -digits 1 1 2
set dicomFolder = indcm
set epiFolder = funcHeadBrik
set anatFolder = anatHeadBrik
set epi_outprefix = epi
set anat_outprefix = anat
set numSlices = 33
set sliceOrder = alt+z
set TR = 2.0
foreach dat ( 1 )
foreach runInd ( 1 2 )
set subj = 20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917
afni_proc.py -subj_id 20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917 -script ./proc_r1.sh -out_dir 20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917.results -dsets ./20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917/funcHeadBrik/epi.r1+orig.HEAD ./20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917/funcHeadBrik/epi.r2+orig.HEAD -blocks despike tshift volreg align tlrc blur mask scale regress -anat_has_skull yes -tcat_remove_first_trs 6 -tcat_remove_last_trs 4 -tshift_opts_ts -tpattern alt+z -tshift_align_to -slice 17 -copy_anat ./20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917/anatHeadBrik/anat.r1+orig -volreg_align_to first -volreg_align_e2a -volreg_tlrc_warp -align_opts_aea -giant_move -tlrc_opts_at -init_xform AUTO_CENTER -blur_size 7 -regress_stim_times ./stim_times/run1/baseline.txt ./stim_times/run1/left.txt ./stim_times/run1/right.txt ./stim_times/run1/up.txt ./stim_times/run1/down.txt -regress_stim_labels b L R U D -regress_local_times -regress_reml_exec -regress_est_blur_epits -regress_est_blur_errts -regress_basis BLOCK(12,1) BLOCK(30,1) BLOCK(30,1) BLOCK(30,1) BLOCK(30,1) -regress_censor_outliers 0.1 -regress_censor_motion 0.3 -regress_opts_3dD -num_glt 4 -gltsym SYM: +L -b -glt_label 1 L-b -gltsym SYM: +R -b -glt_label 2 R-b -gltsym SYM: +L -R -glt_label 3 L-R -gltsym SYM: +U -D -glt_label 3 U-D -jobs 4 -execute
** error: option -regress_censor_outliers follows unknown arg #63 (BLOCK(30,1))

** failed command (get_user_opts):

afni_proc.py -subj_id
20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917
-script ./proc_r1.sh -out_dir
20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917.results
-dsets
./20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917/funcHeadBrik/epi.r1+orig.HEAD
./20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917/funcHeadBrik/epi.r2+orig.HEAD
-blocks despike tshift volreg align tlrc blur mask scale regress
-anat_has_skull yes -tcat_remove_first_trs 6 -tcat_remove_last_trs 4
-tshift_opts_ts -tpattern alt+z -tshift_align_to -slice 17 -copy_anat
./20170309.pt001_rtfMRI_1Trn3Tst_GD_030917.pt001_rtfMRI_1Trn3Tst_GD_030917/anatHeadBrik/anat.r1+orig
-volreg_align_to first -volreg_align_e2a -volreg_tlrc_warp
-align_opts_aea -giant_move -tlrc_opts_at -init_xform AUTO_CENTER
-blur_size 7 -regress_stim_times ./stim_times/run1/baseline.txt
./stim_times/run1/left.txt ./stim_times/run1/right.txt
./stim_times/run1/up.txt ./stim_times/run1/down.txt
-regress_stim_labels b L R U D -regress_local_times -regress_reml_exec
-regress_est_blur_epits -regress_est_blur_errts -regress_basis
‘BLOCK(12,1)’ ‘BLOCK(30,1)’ ‘BLOCK(30,1)’ ‘BLOCK(30,1)’ ‘BLOCK(30,1)’
-regress_censor_outliers 0.1 -regress_censor_motion 0.3
-regress_opts_3dD -num_glt 4 -gltsym ‘SYM: +L -b’ -glt_label 1 L-b
-gltsym ‘SYM: +R -b’ -glt_label 2 R-b -gltsym ‘SYM: +L -R’ -glt_label 3
L-R -gltsym ‘SYM: +U -D’ -glt_label 3 U-D -jobs 4 -execute

Hi Duong,

Specifying a list of basis functions is done via
-regress_basis_multi instead of just -regress_basis.
That is all I see at the moment, though having a
‘baseline’ timing file is suspicious.

  • rick

Rick,

Thank you for your response. That was what caused the error.

I am pretty new to fMRI analysis; I just wanted to also include the baseline as though it were another active condition. This means that the boxcar function for the baseline condition will then also be convolved with an HRF before fitting to the data. This seems incorrect. However, since I suspect the subject might do something else during the baseline condition (not a complete rest), I wanted to see if there is any effect. Do you think this is a problem practically?

Thanks again,
Duong

Yes, that would likely be a problem. Every condition
is effectively compared against the (implicit, in AFNI’s
case) baseline, so you cannot really say what the
subject is “doing” during the baseline condition. It is
only contrasted against some other condition.

And practically, including an explicit baseline in
3dDeconvolve should lead the multi-collinearity, or
at least very close to it.

  • rick

I understand.
Thank you again, Rick.

Duong