PennLINC / xcpEngine

Official public repository for the XCP Engine. This tool is deprecated in favor of XCP-D and ASLPrep.
MIT License
66 stars 42 forks source link

((: == 1 : syntax error: operand expected (error token is "== 1 ") & no such file or directory #414

Closed njheimbach closed 3 years ago

njheimbach commented 3 years ago

Describe the bug I want to run the anatomical pipeline in order to continue with the fc pipeline. So far the anatomical pipeline has a few errors ( and cannots). The errors seem occur quite late in the log-file .

Cohort file

id0,img
sub-AKTIV1101,sub-AKTIV1101/anat/sub-AKTIV1101_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
sub-AKTIV1102,sub-AKTIV1102/anat/sub-AKTIV1102_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
sub-AKTIV1103,sub-AKTIV1103/anat/sub-AKTIV1103_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
sub-AKTIV1104,sub-AKTIV1104/anat/sub-AKTIV1104_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
[...]

Design File

#!/usr/bin/env bash

###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################

###################################################################
# This design file stores the values of all variables required to
# execute a complete task-free functional connectivity pipeline.
# You may execute the analysis specified in this design file by
# calling (in any bash terminal):
#
# xcpEngine -d <design> -c <cohort> -o <output> <options>
#
# Variables fall into five general categories:
# * ANALYSIS VARIABLES are used at all stages of this analysis.
# * PIPELINE specifies the modules that comprise the analysis.
# * GLOBAL VARIABLES are used at all stages of all analyses.
# * MODULE VARIABLES are used during one stage of the analysis.
#                  These are typically array variables with array
#                  indices equal to the index of the analysis
#                  stage during which they are used.
# * OUTPUT VARIABLES may be used at all stages of the analysis.
#                  These are sometimes array variables with array
#                  indices equal to the value of the primary
#                  subject identifier. They will appear only in
#                  localised design files.
###################################################################

###################################################################
# ANALYSIS VARIABLES
###################################################################

analysis=struc-ACCELERATOR
design=${XCPEDIR}/designs/anat-antsct.dsn
sequence=anatomical
standard=MNI%1x1x1

###################################################################
# PIPELINE
###################################################################

pipeline=struc,gmd,jlf,roiquant,norm,qcanat

###################################################################
# 1 STRUC
###################################################################

struc_denoise_anat[1]=0
struc_prior_weight[1]=0.25
struc_posterior_formulation[1]='Socrates[1]'
struc_keepBEImages[1]=0
struc_floating_point[1]=0
struc_random_seed[1]=0
struc_bspline[1]=0
struc_fit[1]=0.3
struc_quick[1]=0
struc_seg_priors[1]=1
struc_rerun[1]=0
struc_cleanup[1]=1
struc_process[1]=ACT

###################################################################
# 2 GMD
###################################################################

gmd_rerun[2]=0
gmd_cleanup[2]=1

###################################################################
# 3 JLF
###################################################################

jlf_extract[3]=1 
jlf_keep_warps[3]=1
jlf_quick[3]=0
jlf_cohort[3]=Older18
jlf_ncpu[3]=4
jlf_parallel[3]=2
jlf_rerun[3]=0
jlf_cleanup[3]=1

###################################################################
# 4 ROIQUANT
###################################################################

roiquant_atlas[4]=all
roiquant_vol[4]=1
roiquant_rerun[4]=0
roiquant_cleanup[4]=1

###################################################################
# 5 NORM
###################################################################

norm_primary[5]=1
norm_rerun[5]=0
norm_cleanup[5]=1

###################################################################
# 6 qcanat
###################################################################

qcanat_gm[6]=Y
qcanat_gm_val[6]=2,4
qcanat_wm[6]=Y
qcanat_wm_val[6]=3
qcanat_csf[6]=Y
qcanat_csf_val[6]=1
qcanat_cort[6]=Y
qcanat_cort_val[6]=4
qcanat_rerun[6]=0

Error message

>> antsJointLabelFusion.sh -d 3 -q 0 -f 0 -j 4 -k 1 -t /mnt/beegfs/home/heimbach/data/AKTIV/derivatives/ses-A/xcp_output/sub-AKTIV1103/sub-AKTIV1103.nii.gz -o /mnt/beegfs/home/heimbach/data/AKTIV/derivatives/ses-A/xcp_output/sub-AKTIV1103/jlf/sub-AKTIV1103_ -c 2 -x or -g /xcpEngine/thirdparty/oasis30/Brains/1001.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1001.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1006.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1006.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1010.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1010.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1013.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1013.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1014.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1014.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1003.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1003.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1004.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1004.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1005.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1005.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1019.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1019.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1104.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1104.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1107.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1107.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1110.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1110.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1113.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1113.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1116.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1116.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1119.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1119.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1122.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1122.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1125.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1125.nii.gz -g /xcpEngine/thirdparty/oasis30/Brains/1128.nii.gz -l /xcpEngine/thirdparty/oasis30/MICCAI2012ChallengeLabels/1128.nii.gz
mkdir: cannot create directory ‘/mnt/beegfs/home/heimbach/data/AKTIV/derivatives/ses-A/xcp_output/sub-AKTIV1103/jlf’: File exists
[...]
/xcpEngine/modules/roiquant/roiquant.mod: line 100: ((: == 1 : syntax error: operand expected (error token is "== 1 ")
[...]
>> rm /mnt/beegfs/home/heimbach/data/AKTIV/derivatives/ses-A/xcp_output/sub-AKTIV1103/qcanat/sub-AKTIV1103_mniCoords.sclib
rm: cannot remove '/mnt/beegfs/home/heimbach/data/AKTIV/derivatives/ses-A/xcp_output/sub-AKTIV1103/qcanat/sub-AKTIV1103_mniCoords.sclib': No such file or directory
· @2.2 Warp failed -- computing affine alignment to MNI
[...]
· FINISH
····································································
/xcpEngine/core/functions/cleanup: line 3: ((: == 1 : syntax error: operand expected (error token is "== 1 ")

Module complete
generating report
ls: cannot access '/mnt/beegfs/home/heimbach/data/AKTIV/derivatives/ses-A/xcp_output/sub-AKTIV1103/regress/*svg': No such file or directory
/usr/local/miniconda/lib/python3.7/site-packages/nilearn/plotting/displays.py:99: UserWarning: No contour levels were found within the data range.
  **kwargs)
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
[...]

Runtime Information I use:

Additional context

a3sha2 commented 3 years ago

@njheimbach these error messages wont affect the required outputs. Some of the error messages are due to multiple runs. However, you dont need to run anatomical pipeline before fc pipeline, xcp will use fmriprep anatomical outputs

njheimbach commented 3 years ago

Okay thanks a lot @a3sha2 !