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

Looking in the wrong location for anatomicals #216

Open araikes opened 5 years ago

araikes commented 5 years ago

Describe the bug I was attempting to run XCP Engine on a multi-session dataset. My target was the MNI152NLin2009 space. It appears that XCP (at least as far as mine is running) is looking in the wrong spot for anatomical data in a multi-session fMRIPrep tree. I am aware of the potential issues with the multiple template spaces. However, XCP Engine isn't even looking in the correct folder for the anatomical.

As shown below, XCP is attempting to find the anatomical in fmriprep/subj/session/anat (e.g., fmriprep/sub-BLMTBI104/ses-bline/anat/*MNI152NLin2009*). However, the fMRIPrep structure has that file at subj/anat (e.g., fmriprep/sub-BLMTBI104/anat).

I've test this with and without the id1 column in the cohort file and it makes no difference. The same error occurs.

Cohort file

id0,id1,img
sub-BLMTBI104,ses-bline,sub-BLMTBI104/ses-bline/func/sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-BLMTBI104,ses-ptx,sub-BLMTBI104/ses-ptx/func/sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz

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 neuroimage processing pipeline. You may
# execute the analysis specified in this design file by calling
# (in any v4 or higher 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.
# * MODULE VARIABLES are used during one stage of the analysis.
#                  These are typically array variables with array
#                  indices equal to the index of the module that
#                  calls them.
# * OUTPUT VARIABLES may be used at all stages of the analysis.
#                  These are typically 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=fc_$(whoami)
design=/data/xcpengine/design_files/2019-08-01_fc-36p_despike.dsn
sequence=anatomical
standard=MNI%2x2x2

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

pipeline=prestats,confound2,regress,fcon,reho,alff,roiquant,norm,qcfc

###################################################################
# 1 PRESTATS
###################################################################

prestats_rerun[1]=0
prestats_cleanup[1]=1
prestats_process[1]=FMP-NST

###################################################################
# 2 CONFOUND2
###################################################################

confound2_rps[2]=1
confound2_rms[2]=0
confound2_wm[2]=1
confound2_csf[2]=1
confound2_gsr[2]=1
confound2_acompcor[2]=0
confound2_tcompcor[2]=0
confound2_aroma[2]=0
confound2_past[2]=0
confound2_dx[2]=1
confound2_sq[2]=2
confound2_custom[2]=
confound2_censor[2]=0
confound2_censor_contig[2]=0
confound2_framewise[2]=fds:0.25,dv:2 #TR 2s so fds = 0.25 should be equivalent to fds = 0.167 with TR 3s
confound2_rerun[2]=1
confound2_cleanup[2]=1

###################################################################
# 3  REGRESS
###################################################################

regress_tmpf[3]=butterworth
regress_hipass[3]=0.01
regress_lopass[3]=0.08
regress_tmpf_order[3]=1
regress_tmpf_pass[3]=2
regress_tmpf_ripple[3]=0.5
regress_tmpf_ripple2[3]=20
regress_dmdt[3]=2
regress_1ddt[3]=1
regress_smo[3]=6
regress_sptf[3]=susan
regress_usan[3]=default
regress_usan_space[3]=
regress_rerun[3]=0
regress_cleanup[3]=1
regress_process[3]=DMT-DSP-TMP-REG

###################################################################
# 4 FCON
###################################################################

fcon_atlas[4]=all
fcon_metric[4]=corrcoef
fcon_thr[4]=N
fcon_rerun[4]=0
fcon_cleanup[4]=1

###################################################################
# 5 REHO
###################################################################

reho_nhood[5]=vertices
reho_roikw[5]=0 # does nothing at the moment
reho_sptf[5]=susan
reho_smo[5]=6
reho_rerun[5]=0
reho_cleanup[5]=1

###################################################################
# 6 ALFF
###################################################################

alff_hipass[6]=0.01
alff_lopass[6]=0.08
alff_sptf[6]=susan
alff_smo[6]=6
alff_rerun[6]=0
alff_cleanup[6]=1

###################################################################
# 7 ROIQUANT
###################################################################

roiquant_atlas[7]=all
roiquant_globals[7]=1
roiquant_vol[7]=0
roiquant_rerun[7]=0
roiquant_cleanup[7]=1

###################################################################
# 8 NORM
###################################################################
norm_primary[8]=1
norm_rerun[8]=0
norm_cleanup[8]=1

##################################################################
# 9 QCFC
###################################################################
qcfc_atlas[9]=glasser360,schaeffer400
qcfc_sig[9]=fdr
qcfc_rerun[9]=0
qcfc_cleanup[9]=1

Error message Paste your error message between the backticks

/xcpEngine/xcpEngine: line 12: activate: No such file or directory
[Detected that xcp is in a container]
Received options: -c /data/xcpengine/cohort_files/test.csv -d /data/xcpengine/design_files/2019-08-01_fc-36p_despike.dsn -o /data/xcpengine/resting_state -r /data/fmriprep-1.4.1/fmriprep -t 1
$XCPEDIR is /xcpEngine

Constructing a pipeline based on user specifications
····································································
· [D][/data/xcpengine/design_files/2019-08-01_fc-36p_despike.dsn]
· [C][/data/xcpengine/cohort_files/test.csv]
· [O][/data/xcpengine/resting_state]
· [M][Executing serially]
····································································

Checking general dependencies
····································································
· Version AFNI           AFNI_19.1.18
· 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                    ⊗  #
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################

Current processing step:
@1 Localising subject metadata...
····································································
· @1.1 [Parsing subject identifiers]
· @1.1a [Creating output directory]
· @1.1b [/data/xcpengine/resting_state/sub-BLMTBI104/ses-bline]
· @1.2 [Initialising space mapping]
· @1.3 [Initialising derivative maps]
· @1.4 [Initialising atlas system]
· @1.5 Ingress
· @1.5.1 [Native space: sub-BLMTBI104_ses-bline_anatomical]
· @1.5.2a [Standard space: MNI]
· @1.5.3a [Anatomical space: sub-BLMTBI104_ses-bline_anatomical]
source space map '' is not an image
· @1.5 [Priming analytic audit]
· @1.6 [Priming quality assessment]
····································································
Processing step complete:
Localising subject metadata...

Current processing step:
@2 Localising image
····································································
· @2.1 [Verifying that images are present]
· @2.2 [Conforming and localising images]
····································································
Processing step complete:
Localising image

Current processing step:
@3 Localising design
····································································
· @3.1 [Writing localised design]
· @3.2 [Evaluating subject variables]
····································································
Processing step complete:
Localising design

Localiser complete

###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
#                                                                 #
#  ⊗                   XCP ENGINE LOCALISER                    ⊗  #
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################

Current processing step:
@1 Localising subject metadata...
····································································
· @1.1 [Parsing subject identifiers]
· @1.1a [Creating output directory]
· @1.1b [/data/xcpengine/resting_state/sub-BLMTBI104/ses-ptx]
· @1.2 [Initialising space mapping]
· @1.3 [Initialising derivative maps]
· @1.4 [Initialising atlas system]
· @1.5 Ingress
· @1.5.1 [Native space: sub-BLMTBI104_ses-ptx_anatomical]
· @1.5.2a [Standard space: MNI]
· @1.5.3a [Anatomical space: sub-BLMTBI104_ses-ptx_anatomical]
source space map '' is not an image
· @1.5 [Priming analytic audit]
· @1.6 [Priming quality assessment]
····································································
Processing step complete:
Localising subject metadata...

Current processing step:
@2 Localising image
····································································
· @2.1 [Verifying that images are present]
· @2.2 [Conforming and localising images]
····································································
Processing step complete:
Localising image

Current processing step:
@3 Localising design
····································································
· @3.1 [Writing localised design]
· @3.2 [Evaluating subject variables]
····································································
Processing step complete:
Localising design

Localiser complete

###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
#                                                                 #
                  CURRENTLY PROCESSING MODULE:
                         ★ prestats ★
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################

[Delegating control to module]

###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
#                                                                 #
#  ⊗                 FMRI PREPROCESSING MODULE                 ⊗  #
#                                                                 #
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################

[I][/data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/sub-BLMTBI104_ses-bline.nii.gz]
[O][/data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats]
                             -   -   -
>> rln /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/sub-BLMTBI104_ses-bline.nii.gz /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~.nii.gz
                             -   -   -
>> 7-5-1
                             -   -   -
>> 7-1

Current processing step:
@0 Ensure matching orientation
····································································
· @0.1a Input: /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~.nii.gz
· @0.1b Template: /xcpEngine/space/MNI/MNI-2x2x2.nii.gz
· @0.1c Output root:
· @0.1d checking the orientation of img and template
                             -   -   -
>> 3dinfo -orient /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~.nii.gz
                             -   -   -
>> 3dinfo -orient /xcpEngine/space/MNI/MNI-2x2x2.nii.gz
NATIVE:LPI TEMPLATE:RPI
· @0.1e img and template orientation are not the same
· @0.1f make it: LPI -> RPI
                             -   -   -
>> 3dresample -orient RPI -inset /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~.nii.gz -prefix /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~_RPI.nii.gz
                             -   -   -
>> immv /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~_RPI.nii.gz /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~.nii.gz
· @0.1

Current processing step:
@ getting data from fmriprep directory
····································································
                             -   -   -
>> immv /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~ /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline~TEMP~_FMP
                             -   -   -
>> cp /data/fmriprep-1.4.1/fmriprep/sub-BLMTBI104/ses-bline/func/sub-BLMTBI104_ses-bline_task-rest_run-001_desc-confounds_regressors.tsv /data/xcpengine/resting_state/sub-BLMTBI104/ses-bline/prestats/sub-BLMTBI104_ses-bline_fmriconf.tsv
ls: cannot access '/data/fmriprep-1.4.1/fmriprep/sub-BLMTBI104/ses-bline/anat/*MNI152NLin2009cAsym*desc-preproc_T1w.nii.gz': No such file or directory
ls: cannot access '/data/fmriprep-1.4.1/fmriprep/sub-BLMTBI104/ses-bline/anat/*MNI152NLin2009cAsym*dseg.nii.gz': No such file or directory
ls: cannot access '/data/fmriprep-1.4.1/fmriprep/sub-BLMTBI104/ses-bline/anat/*MNI152NLin2009cAsym*desc-brain_mask.nii.gz': No such file or directory
· @ checking refvolume and structural orientation

Runtime Information Docker tag latest (Dockerhub release 6 days ago)

Additional context Docker call

docker run --rm -it \
-v /data/BL2_clean/derivatives:/data \
pennbbl/xcpengine:latest \
-c /data/xcpengine/cohort_files/test.csv \
-d /data/xcpengine/design_files/2019-08-01_fc-36p_despike.dsn \
-o /data/xcpengine/resting_state \
-r /data/fmriprep-1.4.1/fmriprep \
-t 1"

fMIRPrep File Structure

sub-BLMTBI104
 |-ses-bline
 | |-anat
 | | |-sub-BLMTBI104_ses-bline_run-001_from-orig_to-T1w_mode-image_xfm.txt
 | |-func
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-aparcaseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-aseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-aparcaseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-aseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_desc-aparcaseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_desc-aseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-brain_mask.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_desc-brain_mask.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_desc-brain_mask.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-brain_mask.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-brain_mask.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-preproc_bold.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-preproc_bold.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_boldref.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_desc-preproc_bold.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_desc-preproc_bold.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_boldref.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-T1w_boldref.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-fsaverage_hemi-L.func.gii
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-fsaverage_hemi-R.func.gii
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_desc-MELODIC_mixing.tsv
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_AROMAnoiseICs.csv
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_desc-confounds_regressors.tsv
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_desc-confounds_regressors.json
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-001_space-MNI152NLin2009cAsym_desc-smoothAROMAnonaggr_bold.nii.gz
 | |-figures
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-sdc_bold.svg
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-bbregister_bold.svg
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-rois_bold.svg
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-compcorvar_bold.svg
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-carpetplot_bold.svg
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-confoundcorr_bold.svg
 | | |-sub-BLMTBI104_ses-bline_task-rest_run-1_desc-aroma_bold.svg
 |-ses-ptx
 | |-anat
 | | |-sub-BLMTBI104_ses-ptx_run-001_from-orig_to-T1w_mode-image_xfm.txt
 | |-func
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-aparcaseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-aseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-aparcaseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-aseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_desc-aparcaseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_desc-aseg_dseg.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-brain_mask.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-brain_mask.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-brain_mask.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_desc-brain_mask.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_desc-brain_mask.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-preproc_bold.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-preproc_bold.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_boldref.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_desc-preproc_bold.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_desc-preproc_bold.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_boldref.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-T1w_boldref.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-fsaverage_hemi-L.func.gii
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-fsaverage_hemi-R.func.gii
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_desc-MELODIC_mixing.tsv
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_AROMAnoiseICs.csv
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_desc-confounds_regressors.tsv
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_desc-confounds_regressors.json
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-001_space-MNI152NLin2009cAsym_desc-smoothAROMAnonaggr_bold.nii.gz
 | |-figures
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-sdc_bold.svg
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-bbregister_bold.svg
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-rois_bold.svg
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-compcorvar_bold.svg
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-carpetplot_bold.svg
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-confoundcorr_bold.svg
 | | |-sub-BLMTBI104_ses-ptx_task-rest_run-1_desc-aroma_bold.svg
 |-anat
 | |-sub-BLMTBI104_from-T1w_to-fsnative_mode-image_xfm.txt
 | |-sub-BLMTBI104_desc-preproc_T1w.nii.gz
 | |-sub-BLMTBI104_desc-preproc_T1w.json
 | |-sub-BLMTBI104_desc-aparcaseg_dseg.nii.gz
 | |-sub-BLMTBI104_desc-aseg_dseg.nii.gz
 | |-sub-BLMTBI104_desc-brain_mask.nii.gz
 | |-sub-BLMTBI104_desc-brain_mask.json
 | |-sub-BLMTBI104_label-CSF_probseg.nii.gz
 | |-sub-BLMTBI104_label-GM_probseg.nii.gz
 | |-sub-BLMTBI104_label-WM_probseg.nii.gz
 | |-sub-BLMTBI104_dseg.nii.gz
 | |-sub-BLMTBI104_hemi-L_smoothwm.surf.gii
 | |-sub-BLMTBI104_hemi-R_smoothwm.surf.gii
 | |-sub-BLMTBI104_hemi-L_pial.surf.gii
 | |-sub-BLMTBI104_hemi-R_pial.surf.gii
 | |-sub-BLMTBI104_hemi-L_inflated.surf.gii
 | |-sub-BLMTBI104_hemi-R_inflated.surf.gii
 | |-sub-BLMTBI104_hemi-L_midthickness.surf.gii
 | |-sub-BLMTBI104_hemi-R_midthickness.surf.gii
 | |-sub-BLMTBI104_from-MNI152Lin_to-T1w_mode-image_xfm.h5
 | |-sub-BLMTBI104_from-T1w_to-MNI152Lin_mode-image_xfm.h5
 | |-sub-BLMTBI104_space-MNI152Lin_desc-preproc_T1w.nii.gz
 | |-sub-BLMTBI104_space-MNI152Lin_desc-preproc_T1w.json
 | |-sub-BLMTBI104_space-MNI152Lin_desc-brain_mask.nii.gz
 | |-sub-BLMTBI104_space-MNI152Lin_desc-brain_mask.json
 | |-sub-BLMTBI104_space-MNI152Lin_label-CSF_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152Lin_label-GM_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152Lin_label-WM_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152Lin_dseg.nii.gz
 | |-sub-BLMTBI104_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5
 | |-sub-BLMTBI104_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_desc-preproc_T1w.json
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_desc-brain_mask.json
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_label-CSF_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_label-GM_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_label-WM_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_dseg.nii.gz
 | |-sub-BLMTBI104_from-MNI152NLin6Asym_to-T1w_mode-image_xfm.h5
 | |-sub-BLMTBI104_from-T1w_to-MNI152NLin6Asym_mode-image_xfm.h5
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_desc-preproc_T1w.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_desc-preproc_T1w.json
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_desc-brain_mask.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_desc-brain_mask.json
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_label-CSF_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_label-GM_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_label-WM_probseg.nii.gz
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_dseg.nii.gz
 |-figures
 | |-sub-BLMTBI104_dseg.svg
 | |-sub-BLMTBI104_space-MNI152Lin_T1w.svg
 | |-sub-BLMTBI104_space-MNI152NLin2009cAsym_T1w.svg
 | |-sub-BLMTBI104_space-MNI152NLin6Asym_T1w.svg
 | |-sub-BLMTBI104_desc-reconall_T1w.svg
a3sha2 commented 5 years ago

Hi @araikes yes, you used current fmriprep version 1.4x with different output-spaces. we currently updated the xcpengine as well to match the current fmriprep outputs with different template. you can pull for new docker/singularity image.

araikes commented 5 years ago

Hi @a3sha2, As I noted in my post, I have the current version from Dockerhub. I just double checked this. I have both the 1.0 tag and the latest tag and they are up to date. Do I need to pull straight from the repo and build the Docker image?

Assuming that it was a template spaces issue, I would expect it to be looking in the correct file location but have trouble identifying the correct MNI file to use. Instead, it's looking for the correct string *MNI152NLin2009cAsym* but it's not looking in the correct location for a multi-session study.

a3sha2 commented 5 years ago

Yes, we have not change the volume number but it has been updated. You can pull for new one. it will work fine

araikes commented 5 years ago

Hi @a3sha2, Please forgive me. I feel like I'm not communicating this clearly.

I have the current version of XCP Engine. I pulled it yesterday and tried again this morning before I responded earlier, just to confirm. The version on which I'm having this issue is the most current version.

a3sha2 commented 5 years ago

thanks @araikes pls pull for new docker image

araikes commented 5 years ago

Pulled it and it appears to be working as expected. I'll keep an eye on it and let you know.

araikes commented 5 years ago

I am now running into a new issue, though I can't fully tell if it is problematic. Steps up until fcon work just fine. However, the following error is thrown:

Current processing step:
@1 Functional connectome: HarvardOxford
····································································
· @1.2 Mapping network to image space
· @1.2.2
                             -   -   -
>> fslstats /xcpEngine/atlas/HarvardOxford/HarvardOxfordMNI.nii.gz -R
                             -   -   -
>> 8058.000000<=1
Error in parse_args(OptionParser(option_list = option_list)) :
  Error in getopt(spec = spec, opt = args) : flag "e" requires an argument
Execution halted
                             -   -   -
>> rln /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/sub-BLMTBI104_ses-bline_atlas/sub-BLMTBI104_ses-bline_HarvardOxford.nii.gz /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford.nii.gz
                             -   -   -
>> 8-5-1
                             -   -   -
>> 8-1
· @1.3 Computing network timeseries
                             -   -   -
>> rm -f /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford_ts.1D
                             -   -   -
>> ${XCPEDIR}/utils/roi2ts.R -i /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/sub-BLMTBI104_ses-bline.nii.gz -r /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/sub-BLMTBI104_ses-bline_atlas/sub-BLMTBI104_ses-bline_HarvardOxford.nii.gz -l /xcpEngine/atlas/HarvardOxford/HarvardOxfordNodeIndex.1D
· @1.4 Computing adjacency matrix
                             -   -   -
>> rm -f /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford_network.txt
                             -   -   -
>> rm -f /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford.net
                             -   -   -
>> rm -f /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford_missing.txt
                             -   -   -
>> ${XCPEDIR}/utils/ts2adjmat.R -t /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford_ts.1D
                             -   -   -
>> ${XCPEDIR}/utils/adjmat2pajek.R -a /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford_network.txt -t N
· @1.5 Determining node coverage
                             -   -   -
>> ${XCPEDIR}/utils/missingIdx.R -i /data/xcpengine/mni-aligned/sub-BLMTBI104/ses-bline/fcon/HarvardOxford/sub-BLMTBI104_ses-bline_HarvardOxford_network.txt

This happens for all atlases. Is this functioning as intended (spurious error) or is it skipping something and jumping to computing subroutine 1.3?

a3sha2 commented 5 years ago

Hi @araikes

There is subroutine 1.2.3 or 1.2.6 that is compulsory which look like it doesn't run that is why there was error. that subroutine is necessary when your bold is not in MNI (or template) space. it is missing some transformation files from fmriprep ouput. You have no problem if your bold is in MNI space but it will be nice to know what is going on. Can you share with us the full log file and the _space.json

Also try to rerun with prestats_rerun[1]=1

araikes commented 5 years ago

Hi @a3sha2,

So I went back and did a clean processing and it appears to work. That particular error only shows up if I have to restart/rerun due to failure (we had some network failures leading to early processing termination).

However, if I start from scratch or presumably if I do prestats_rerun[1]=1, it shouldn't throw an issue.

a3sha2 commented 5 years ago

setting prestats_rerun[1]=1 will ensures that the inputs are the same with previous and read all the transformation files needed. We will make sure it is default in all the design file #221

araikes commented 5 years ago

Hi @a3sha2, Everything appears to be working well for the anatomical processing stream now.

I do have one further question: In fMRIPrep, one of the preprocessing steps is N4BiasCorrection. XCP Engine appears to also be running N4 correction. Is this double correction potentially problematic?

a3sha2 commented 5 years ago

It may be problematic honestly. Running N4 twice or many time can increase or decrease voxel intensity in some regions. The best is to use use raw image ( from bids) as input. Look at difference between N4 (once) and N4(twice)

Screen Shot 2019-09-05 at 10 17 45 PM

araikes commented 5 years ago

I figured that would be the case. The documentation should probably be revised to reflect using the original images rather than the fMRIPrep'd ones. Currently, users are instructed to use the post-fMRIPrep files prior to running one of the Anatomical pipelines (see image below).

Also, from the way that the Functional pipelines currently work, would using the original BIDS images pose any problems if the anatomical stream was run first to pipe into the functional stream? I can see it may pose issues if longitudinal/multi-session T1s are merged in fMRIPrep. Maybe post-fMRIPrep T1s need a flag/option to skip N4.

xcp_instructions

a3sha2 commented 5 years ago

thank you very much. we will make correction

araikes commented 4 years ago

Hi @a3sha2, I'm just getting back around to this. I looked at the update to the documentation (#228), and that file isn't part of the fMRIPrep output tree. If the intent is to use the original T1w, then the listed path shouldn't be under the fMRIPrep derivative.

Additionally, I tried using the raw T1w image and it does not work correctly. My cohort file uses the original T1 in my BIDS nifti directory and the following is the sub-xxx_ses-xxx_struct_report.svg generated:

g1667

a3sha2 commented 4 years ago

pls share me the logs files pls