Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Failing with tutorial #199

Closed
Brainarea opened this issue Jun 4, 2019 · 3 comments · Fixed by #375
Closed

Failing with tutorial #199

Brainarea opened this issue Jun 4, 2019 · 3 comments · Fixed by #375

Comments

@Brainarea
Copy link

Describe the bug
Trying to apply the anatomical tutorial pipeline to my data. I think I'm very confused about how xcpEngine deals with paths.

Cohort file
Paste cohort file between the triple backticks

id0,img
sub-0051,/Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/fmriprep/preprocessed_nofs/fmriprep/sub-0051/anat/sub-0051_desc-preproc_T1w.nii

Design File
Paste your entire design (.dsn) file between the triple backticks

#!/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=/Volumes/Orchid/Rodolphe/Toolbox/xcpEngine_designs/anat-antsct.dsn
sequence=anatomical
standard=MNI%1x1x1

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

pipeline=struc,roiquant,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 ROIQUANT
###################################################################

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

###################################################################
# 3 QCANAT
###################################################################

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

Error message
Paste your error message between the backticks

xcpengine-docker   -d /Volumes/Orchid/Rodolphe/Toolbox/xcpEngine_designs/anat-antsct.dsn   -c /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine/anat_cohort.csv   -o /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine   -t 2
['/Users/rodolphe/anaconda3/bin/xcpengine-docker', '-d', '/Volumes/Orchid/Rodolphe/Toolbox/xcpEngine_designs/anat-antsct.dsn', '-c', '/Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine/anat_cohort.csv', '-o', '/Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine', '-t', '2']
RUNNING: docker run --rm -it -v /Volumes/Orchid/Rodolphe/Toolbox/xcpEngine_designs/anat-antsct.dsn:/design/design.dsn:ro -v /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine/anat_cohort.csv:/cohort/cohort.csv:ro -v /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine:/xcpOutput pennbbl/xcpengine:latest -d /design/design.dsn -c /cohort/cohort.csv -o /xcpOutput -m s
[Detected that xcp is in a container]
Received options: -d /design/design.dsn -c /cohort/cohort.csv -o /xcpOutput -m s
$XCPEDIR is /xcpEngine

Constructing a pipeline based on user specifications
····································································
· [D][/design/design.dsn]
sed: cannot rename /design/sedgynKBh: Device or resource busy
· [C][/cohort/cohort.csv]
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
Calls: write.table -> file
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
  cannot open file '/cohort/cohort.csv': Read-only file system
Execution halted
· [O][/xcpOutput]
· [M][Executing serially]
····································································

Checking general dependencies
····································································
· Version AFNI           AFNI_19.1.01 
· Version ANTs           3.0.0.0 
· Version FSL            fsl-5.0.10 
· Version C3D            1.1.0 
· Version JQ             jq-1.5
· Version XCP Engine     xcpEngine-v1.0
· R version              3.3.3 
· R scripting front-end  3.3.3 
· · RNifti version       0.10.0
· · optparse version     1.6.2
· · pracma version       2.2.5
· · signal version       0.7.6
····································································
All general dependencies are present.

Checking environment
All environmental variables are defined.

Checking module-specific dependencies




###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
#                                                                 #
#  ⊗                      XCP ★ ★ ★ ENGINE                     ⊗  #
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################



###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
#                                                                 #
                  CURRENTLY PROCESSING MODULE:
                         ★ LOCALISER ★
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################



[Delegating control to module]



###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
#                                                                 #
#  ⊗                   XCP ENGINE LOCALISER                    ⊗  #
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################
/xcpEngine/core/parseArgsLocaliser: line 113: /Volumes/Orchid/Rodolphe/Toolbox/xcpEngine_designs/anat-antsct.dsn: No such file or directory



Current processing step:
Localising subject metadata...
····································································
· [Parsing subject identifiers]
· [Creating output directory]
· [/xcpOutput/sub-0051]
· [Initialising space mapping]
· [Initialising derivative maps]
· [Initialising atlas system]
· Ingress
· [Native space: sub-0051_native]
· [Anatomical space: sub-0051_anatomical]
fixed '' is not an image
· [Priming analytic audit]
· [Priming quality assessment]
····································································
Processing step complete:
Localising subject metadata...



Current processing step:
Localising image
····································································
· [Verifying that images are present]

· [A major error has occurred.]
· [The processing stream will now abort.]
· [Preparing diagnostics]
····································································



Module Workflow Map
····································································

· @1
· @1.1
· @1.1a
· @1.1b
· @1.2
· @1.3
· @1.4
· @1.5
· @1.5.1
· @1.5.3a
· @1.5
· @1.6
· @2
· @2.1
· ERROR
····································································



····································································
· [An error occurred while processing module localiser.]
· [The error was detected at signpost @2.1.]
· [The most recent command logged was]
· []
· [For additional details, view the processing log. For improved]
· [diagnostics, increment verbosity using the -t option.]
· []
· [The primary analyte is not a valid image: /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/fmriprep/preprocessed_nofs/fmriprep/sub-0051/anat/sub-0051_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii]
· []
· [stream abort]
····································································

Runtime Information
Using Docker.

Additional context
I have specified absolute path for every file, is this an issue?

@a3sha2
Copy link
Contributor

a3sha2 commented Jun 4, 2019

Hi @Orchid666
can you paste the code, is like there is problem with docker binding
https://xcpengine.readthedocs.io/containers/index.html#using-xcpengine-with-docker

@Brainarea
Copy link
Author

This code?
xcpengine-docker \ -d /Volumes/Orchid/Rodolphe/Toolbox/xcpEngine_designs/anat-antsct.dsn \ -c /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine/anat_cohort.csv \ -o /Volumes/Orchid/Rodolphe/Data/Epilepsy-CBD/xcpEngine \ -t 1

@Brainarea
Copy link
Author

Brainarea commented Jun 5, 2019

Any more idea? It seems that this is the origin of the problem, although an imtest directly on my file works:

Current processing step:
@2 Localising image
····································································
+ subroutine @2.1 '[Verifying' that images are 'present]'
+ signpost=@2.1
+ routine_map='
· @1
· @1.1
· @1.1a
· @1.1b
· @1.2
· @1.3
· @1.4
· @1.5
· @1.5.1
· @1.5.2a
· @1.5.3a
· @1.5
· @1.6
· @2
· @2.1'
+ shift
+ local 'subroutine_description=[Verifying that images are present]'
+ verbose
+ [[ -n 3 ]]
+ ((  3 != 0  ))
+ local 'vid=@2.1 '
+ [[ -n [Verifying that images are present] ]]
+ echo '· @2.1 [Verifying that images are present]'
· @2.1 [Verifying that images are present]
+ is_image fmriprep/sub-1/anat/sub-1_T1w_preproc.nii.gz
+ [[ -n fmriprep/sub-1/anat/sub-1_T1w_preproc.nii.gz ]]
+++ readlink -f fmriprep/sub-1/anat/sub-1_T1w_preproc.nii.gz
++ /opt/fsl-5.0.10/bin/imtest
+ ((  0 == 1  ))
+ abort_stream 'The primary analyte is not a valid image: fmriprep/sub-1/anat/sub-1_T1w_preproc.nii.gz'
+ local errdir=/data/xcpOutput/group/error
+ [[ ! -d /data/xcpOutput/group/error ]]
+ mkdir -p /data/xcpOutput/group/error
+ ERR_ROOT=/data/xcpOutput/group/error/struc-ACCELERATOR-201906051718
+ local 'error=
· [A major error has occurred.]
· [The processing stream will now abort.]
· [Preparing diagnostics]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants