繁体   English   中英

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

[英]Why am I getting this error with 3dDeconvolve when I run my AFNI script on an Ubuntu bash shell?

我正在尝试在 OpenScience_Scripts 存储库中运行 doDecon.sh AFNI 脚本的变体,该脚本将为我正在分别分析的三个任务中的每一个处理功能性神经影像数据,但我一直遇到“3Ddeconvolve”命令错误gltsym and -fout not found, fatal error.错误代码粘贴在这里

我已尝试确保安装了所有 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   

                 

正如上面(stackoverflow)注释中所说,可能无法在多行命令中使用(shell)注释。 bash中,脚本

ls \
   # comment 
   -lrt

不工作,但线路

ls \
   -lrt

做。

在您的脚本中,该行

         -glt_label 2 ctrl -sem                       

也应该以\结尾,因为下面还有 5 个选项。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM