当我在 Ubuntu bash shell 上运行 AFNI 脚本时,为什么 3dDeconvolve 会出现此错误?

问题描述 投票:0回答:1

我正在尝试在 OpenScience_Scripts 存储库中运行 doDecon.sh AFNI 脚本的变体,该脚本将为我分别分析的三个任务中的每一个任务处理功能神经影像数据,但我不断遇到“3Ddeconvolve”命令出错,显示

gltsym
-fout
未找到,致命错误。

我已尝试确保安装了所有 AFNI 软件包,并且已将 AFNI 设置为在后台运行,但每次我尝试运行脚本时都会弹出此错误。请注意,我在带有 Linux shell 的 Windows 计算机上工作,我知道这有时会导致问题。

如果有人以前见过此错误代码或注意到我的脚本中存在任何问题,我很想听听任何想法......

#!/bin/tcsh

if ( $#argv > 0 ) then
    set subj = $argv[1]
else
    set subj = s01
endif

3dDeconvolve -input rsem_scale.nii                            \
    -mask mask/mask_func_sem.nii.gz                      \
    -polort 1                                                                \
    -xout -progress                                                     \
    -num_stimts 11                                                           \
    -stim_times 1 stimuli/sem.1D 'BLOCK(2,1)'                          \
    -stim_label 1 sem                                                  \
    -stim_times 2 stimuli/sem_ctrl.1D 'BLOCK(2,1)'                          \
    -stim_label 2 sem_ctrl                                               \
    -stim_file 3 regressors/trans_x_sem_noHead_tmp.txt'[0]' -stim_base 3 -stim_label 3 trans_x_sem   \
    -stim_file 4 regressors/trans_y_sem_noHead_tmp.txt'[0]' -stim_base 4 -stim_label 4 trans_y_sem   \
    -stim_file 5 regressors/trans_z_sem_noHead_tmp.txt'[0]' -stim_base 5 -stim_label 5 trans_z_sem   \
    -stim_file 6 regressors/rot_x_sem_noHead_tmp.txt'[0]' -stim_base 6 -stim_label 6 rot_x_sem     \
    -stim_file 7 regressors/rot_y_sem_noHead_tmp.txt'[0]' -stim_base 7 -stim_label 7 rot_y_sem     \
    -stim_file 8 regressors/rot_z_sem_noHead_tmp.txt'[0]' -stim_base 8 -stim_label 8 rot_z_sem     \
    -stim_file 9 regressors/global_signal_sem_noHead_tmp.txt'[0]' -stim_base 9 -stim_label 9 global_signal_sem     \
    -stim_file 10 regressors/csf_sem_noHead_tmp.txt'[0]' -stim_base 10 -stim_label 10 csf_sem     \
    -stim_file 11 regressors/white_matter_sem_noHead_tmp.txt'[0]' -stim_base 11 -stim_label 11 white_matter_sem     \
    -jobs 8  \
    # tells AFNI to run GLT based on label names
    -gltsym 'SYM: sem -sem_ctrl'                     \
    -glt_label 1 sem -ctrl                       \
    -gltsym 'SYM: sem_ctrl -sem'                     \
    -glt_label 2 ctrl -sem                       

    -fout -tout -rout -x1D X.xmat.1D -xjpeg X.jpg                                  \
    -x1D_uncensored X.nocensor.xmat.1D                                       \
    -fitts fitts.$subj.sem                                                       \
    -errts errts.${subj}.sem                                                     \
    -bucket stats.$subj.sem                                                   

3dDeconvolve -input rplaus_scale.nii                            \
    -mask mask/mask_func_plaus.nii.gz                        \
    -polort 1                                                                \
    -xout -progress                                                     \
    -num_stimts 11                                                           \
    -stim_times 1 stimuli/plaus.1D 'BLOCK(2,1)'                          \
    -stim_label 1 plaus                                                  \
    -stim_times 2 stimuli/plaus_ctrl.1D 'BLOCK(2,1)'                          \
    -stim_label 2 plaus_ctrl                                               \
    -stim_file 3 regressors/trans_x_plaus_noHead_tmp.txt'[0]' -stim_base 3 -stim_label 3 trans_x_plaus   \
    -stim_file 4 regressors/trans_y_plaus_noHead_tmp.txt'[0]' -stim_base 4 -stim_label 4 trans_y_plaus   \
    -stim_file 5 regressors/trans_z_plaus_noHead_tmp.txt'[0]' -stim_base 5 -stim_label 5 trans_z_plaus   \
    -stim_file 6 regressors/rot_x_plaus_noHead_tmp.txt'[0]' -stim_base 6 -stim_label 6 rot_x_plaus     \
    -stim_file 7 regressors/rot_y_plaus_noHead_tmp.txt'[0]' -stim_base 7 -stim_label 7 rot_y_plaus     \
    -stim_file 8 regressors/rot_z_plaus_noHead_tmp.txt'[0]' -stim_base 8 -stim_label 8 rot_z_plaus     \
    -stim_file 9 regressors/global_signal_plaus_noHead_tmp.txt'[0]' -stim_base 9 -stim_label 9 global_signal_plaus     \
    -stim_file 10 regressors/csf_plaus_noHead_tmp.txt'[0]' -stim_base 10 -stim_label 10 csf_plaus     \
    -stim_file 11 regressors/white_matter_plaus_noHead_tmp.txt'[0]' -stim_base 11 -stim_label 11 white_matter_plaus     \
    -jobs 8  \
    # tells AFNI to run GLT based on label names
    -gltsym 'SYM: plaus -plaus_ctrl'                     \
    -glt_label 1 plaus -ctrl                         \
    -gltsym 'SYM: plaus_ctrl -plaus'                     \
    -glt_label 2 ctrl -plaus                         \

     -fout -tout -rout -x1D X.xmat.1D -xjpeg X.jpg                                  \
    -x1D_uncensored X.nocensor.xmat.1D                                       \
    -fitts fitts.$subj.plaus                                                      \
    -errts errts.${subj}.plaus                                                    \
    -bucket stats.$subj.plaus                        
    
3dDeconvolve -input rgram_scale.nii                            \
    -mask mask/mask_func_gram.nii.gz                         \
    -polort 1                                                                \
    -xout -progress                                                     \
    -num_stimts 11                                                           \
    -stim_times 1 stimuli/gram.1D 'BLOCK(2,1)'                          \
    -stim_label 1 gram                                                  \
    -stim_times 2 stimuli/gram_ctrl.1D 'BLOCK(2,1)'                          \
    -stim_label 2 gram_ctrl                                               \
    -stim_file 3 regressors/trans_x_gram_noHead_tmp.txt'[0]' -stim_base 3 -stim_label 3 trans_x_gram   \
    -stim_file 4 regressors/trans_y_gram_noHead_tmp.txt'[0]' -stim_base 4 -stim_label 4 trans_y_gram   \
    -stim_file 5 regressors/trans_z_gram_noHead_tmp.txt'[0]' -stim_base 5 -stim_label 5 trans_z_gram   \
    -stim_file 6 regressors/rot_x_gram_noHead_tmp.txt'[0]' -stim_base 6 -stim_label 6 rot_x_gram     \
    -stim_file 7 regressors/rot_y_gram_noHead_tmp.txt'[0]' -stim_base 7 -stim_label 7 rot_y_gram     \
    -stim_file 8 regressors/rot_z_gram_noHead_tmp.txt'[0]' -stim_base 8 -stim_label 8 rot_z_gram     \
    -stim_file 9 regressors/global_signal_gram_noHead_tmp.txt'[0]' -stim_base 9 -stim_label 9 global_signal_gram     \
    -stim_file 10 regressors/csf_gram_noHead_tmp.txt'[0]' -stim_base 10 -stim_label 10 csf_gram     \
    -stim_file 11 regressors/white_matter_gram_noHead_tmp.txt'[0]' -stim_base 11 -stim_label 11 white_matter_gram     \
    -jobs 8  \
    # tells AFNI to run GLT based on label names
    -gltsym 'SYM: gram -gram_ctrl'                   \
    -glt_label 1 gram -ctrl                      \
    -gltsym 'SYM: gram_ctrl -gram'                   \
    -glt_label 2 ctrl -gram                      \

     -fout -tout -rout -x1D X.xmat.1D -xjpeg X.jpg                                  \
    -x1D_uncensored X.nocensor.xmat.1D                                       \
    -fitts fitts.$subj.gram                                                       \
    -errts errts.${subj}.gram                                                     \
    -bucket stats.$subj.gram 
tcsh nifti
1个回答
0
投票

正如上面注释中所述,可能无法在多行命令中使用 shell 注释。在

bash
中,线条

ls \
   # comment 
   -lrt

不工作,但线路

ls \
   -lrt

做。

在你的脚本中,该行

         -glt_label 2 ctrl -sem                       

还应该以

\
结尾,因为下面还有 5 个选项。

对齐这些反斜杠可能看起来不错,但是如果没有额外的空格,找到丢失的反斜杠会更容易。

© www.soinside.com 2019 - 2024. All rights reserved.