Xcp_d: Some connections were not found

Hi xcp_d experts!

I am new to fMRI processing and I cannot successfully run xcp_d. Can anyone look at this and help me out, please? I have no idea what can I do.
Thanks!

Weronika

Summary of what happened:

I successfully ran fmriprep on 10 subjects. Now I am trying to run xcp_d docker version based on fmriprep outputs. Unfortunately, every time I get an exception, after which xcp_d stops and nothing is calculated (xcp_d output folder is empty). The exceptions says that “Some connections were not found”, however, I can see that there are midthickness files in the /fmriprep folder (sub-13MOZG/anat). I can just add that I tried older versions of xcp_d and different participants and I got the same exception.

Command used (and if a helper script was used, a link to the helper script or the command generated):

docker run --rm -it \
   -v /home/wmr/FMRI/FMRIPREP_out:/fmriprep:ro \
   -v /tmp/wkdir:/work:rw \
   -v /home/wmr/FMRI/xcp_d:/out:rw \
   pennlinc/xcp_d:latest \
   /fmriprep /out participant \
   --mode abcd \
   --file-format nifti \
   --warp-surfaces-native2std n \
   --despike \
   --lower-bpf 0.008 \
   --upper-bpf 0.09 \
   --smoothing 5 \
   --dummy-scans 5 \
   --motion-filter-type lp \
   --band-stop-min 6 \
   --nuisance-regressors acompcor_gsr

Version:

XCP-D version 0.10.0rc1

Environment (Docker, Singularity, custom installation):

Docker

Data formatted according to a validatable standard? Please provide the output of the validator:

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

[IMPORTANT] Collected run data for sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz:
boldmask: /fmriprep/sub-13MOZG/func/sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
boldref: /fmriprep/sub-13MOZG/func/sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_boldref.nii.gz
motion_file: /fmriprep/sub-13MOZG/func/sub-13MOZG_task-rest_run-01_desc-confounds_timeseries.tsv
motion_json: /fmriprep/sub-13MOZG/func/sub-13MOZG_task-rest_run-01_desc-confounds_timeseries.json

Not required: xcpdatlases
Not required: xcpd4s
Process Process-2:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/cli/workflow.py", line 100, in build_workflow
    retval["workflow"] = init_xcpd_wf()
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 81, in init_xcpd_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 489, in init_single_subject_wf
    workflow.connect([
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 239, in connect
    raise Exception("\n".join(["Some connections were not found"] + infostr))
Exception: Some connections were not found
Module postprocess_0_wf has no input called inputnode.lh_midthickness

Module postprocess_0_wf has no input called inputnode.rh_midthickness

Screenshots / relevant information:

directory tree:
FMRI/FMRIPREP_out:
sub-13MOZG
│ ├── anat
│ │ ├── sub-13MOZG_desc-brain_mask.json
│ │ ├── sub-13MOZG_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_desc-preproc_T1w.json
│ │ ├── sub-13MOZG_desc-preproc_T1w.nii.gz
│ │ ├── sub-13MOZG_desc-ribbon_mask.json
│ │ ├── sub-13MOZG_desc-ribbon_mask.nii.gz
│ │ ├── sub-13MOZG_dseg.nii.gz
│ │ ├── sub-13MOZG_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5
│ │ ├── sub-13MOZG_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
│ │ ├── sub-13MOZG_from-T1w_to-fsnative_mode-image_xfm.txt
│ │ ├── sub-13MOZG_from-fsnative_to-T1w_mode-image_xfm.txt
│ │ ├── sub-13MOZG_hemi-L_desc-reg_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-L_midthickness.surf.gii
│ │ ├── sub-13MOZG_hemi-L_pial.surf.gii
│ │ ├── sub-13MOZG_hemi-L_space-fsLR_desc-msmsulc_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-L_space-fsLR_desc-reg_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-L_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-L_sulc.shape.gii
│ │ ├── sub-13MOZG_hemi-L_thickness.shape.gii
│ │ ├── sub-13MOZG_hemi-L_white.surf.gii
│ │ ├── sub-13MOZG_hemi-R_desc-reg_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-R_midthickness.surf.gii
│ │ ├── sub-13MOZG_hemi-R_pial.surf.gii
│ │ ├── sub-13MOZG_hemi-R_space-fsLR_desc-msmsulc_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-R_space-fsLR_desc-reg_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-R_sphere.surf.gii
│ │ ├── sub-13MOZG_hemi-R_sulc.shape.gii
│ │ ├── sub-13MOZG_hemi-R_thickness.shape.gii
│ │ ├── sub-13MOZG_hemi-R_white.surf.gii
│ │ ├── sub-13MOZG_label-CSF_probseg.nii.gz
│ │ ├── sub-13MOZG_label-GM_probseg.nii.gz
│ │ ├── sub-13MOZG_label-WM_probseg.nii.gz
│ │ ├── sub-13MOZG_run-01_desc-preproc_T2w.json
│ │ ├── sub-13MOZG_run-01_desc-preproc_T2w.nii.gz
│ │ ├── sub-13MOZG_run-01_from-orig_to-T1w_mode-image_xfm.txt
│ │ ├── sub-13MOZG_run-02_from-orig_to-T1w_mode-image_xfm.txt
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_desc-brain_mask.json
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_desc-preproc_T1w.json
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_dseg.nii.gz
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_label-CSF_probseg.nii.gz
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_label-GM_probseg.nii.gz
│ │ └── sub-13MOZG_space-MNI152NLin2009cAsym_label-WM_probseg.nii.gz
│ ├── figures
│ │ ├── sub-13MOZG_desc-about_T1w.html
│ │ ├── sub-13MOZG_desc-conform_T1w.html
│ │ ├── sub-13MOZG_desc-reconall_T1w.svg
│ │ ├── sub-13MOZG_desc-summary_T1w.html
│ │ ├── sub-13MOZG_dseg.svg
│ │ ├── sub-13MOZG_space-MNI152NLin2009cAsym_T1w.svg
│ │ ├── sub-13MOZG_task-rest_run-01_desc-carpetplot_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-01_desc-compcorvar_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-01_desc-confoundcorr_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-01_desc-coreg_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-01_desc-rois_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-01_desc-summary_bold.html
│ │ ├── sub-13MOZG_task-rest_run-01_desc-validation_bold.html
│ │ ├── sub-13MOZG_task-rest_run-02_desc-carpetplot_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-02_desc-compcorvar_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-02_desc-confoundcorr_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-02_desc-coreg_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-02_desc-rois_bold.svg
│ │ ├── sub-13MOZG_task-rest_run-02_desc-summary_bold.html
│ │ └── sub-13MOZG_task-rest_run-02_desc-validation_bold.html
│ ├── func
│ │ ├── sub-13MOZG_task-rest_run-01_desc-brain_mask.json
│ │ ├── sub-13MOZG_task-rest_run-01_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_desc-confounds_timeseries.json
│ │ ├── sub-13MOZG_task-rest_run-01_desc-confounds_timeseries.tsv
│ │ ├── sub-13MOZG_task-rest_run-01_desc-coreg_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-01_desc-coreg_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_desc-hmc_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-01_desc-hmc_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_desc-preproc_bold.json
│ │ ├── sub-13MOZG_task-rest_run-01_desc-preproc_bold.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_from-boldref_to-T1w_mode-image_desc-coreg_xfm.json
│ │ ├── sub-13MOZG_task-rest_run-01_from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt
│ │ ├── sub-13MOZG_task-rest_run-01_from-orig_to-boldref_mode-image_desc-hmc_xfm.json
│ │ ├── sub-13MOZG_task-rest_run-01_from-orig_to-boldref_mode-image_desc-hmc_xfm.txt
│ │ ├── sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.json
│ │ ├── sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ ├── sub-13MOZG_task-rest_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_space-T1w_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-01_space-T1w_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_space-T1w_desc-brain_mask.json
│ │ ├── sub-13MOZG_task-rest_run-01_space-T1w_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-01_space-T1w_desc-preproc_bold.json
│ │ ├── sub-13MOZG_task-rest_run-01_space-T1w_desc-preproc_bold.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_desc-brain_mask.json
│ │ ├── sub-13MOZG_task-rest_run-02_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_desc-confounds_timeseries.json
│ │ ├── sub-13MOZG_task-rest_run-02_desc-confounds_timeseries.tsv
│ │ ├── sub-13MOZG_task-rest_run-02_desc-coreg_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-02_desc-coreg_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_desc-hmc_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-02_desc-hmc_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_desc-preproc_bold.json
│ │ ├── sub-13MOZG_task-rest_run-02_desc-preproc_bold.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_from-boldref_to-T1w_mode-image_desc-coreg_xfm.json
│ │ ├── sub-13MOZG_task-rest_run-02_from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt
│ │ ├── sub-13MOZG_task-rest_run-02_from-orig_to-boldref_mode-image_desc-hmc_xfm.json
│ │ ├── sub-13MOZG_task-rest_run-02_from-orig_to-boldref_mode-image_desc-hmc_xfm.txt
│ │ ├── sub-13MOZG_task-rest_run-02_space-MNI152NLin2009cAsym_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-02_space-MNI152NLin2009cAsym_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.json
│ │ ├── sub-13MOZG_task-rest_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ ├── sub-13MOZG_task-rest_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_space-T1w_boldref.json
│ │ ├── sub-13MOZG_task-rest_run-02_space-T1w_boldref.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_space-T1w_desc-brain_mask.json
│ │ ├── sub-13MOZG_task-rest_run-02_space-T1w_desc-brain_mask.nii.gz
│ │ ├── sub-13MOZG_task-rest_run-02_space-T1w_desc-preproc_bold.json
│ │ └── sub-13MOZG_task-rest_run-02_space-T1w_desc-preproc_bold.nii.gz
│ └── log
│ ├── 20241002-172102_b1ae67c2-1631-4bf6-81e1-d66a5e483217
│ │ └── fmriprep.toml
│ ├── 20241003-073516_aa190226-2a74-4016-926f-0333ac208fc5
│ │ └── fmriprep.toml
│ ├── 20241003-073737_0d2ab91f-d767-47a4-b738-4c2fe22f0cbe
│ │ └── fmriprep.toml
│ ├── 20241004-095446_d67ace7d-57d2-4d19-9224-a03a2a11e354
│ │ ├── crash-20241004-095814-root-fs_isrunning-1f517b66-12fb-4388-8b45-b50b773b941a.txt
│ │ └── fmriprep.toml
│ └── 20241005-134255_15a4931c-691d-46e0-b529-966083178862
│ └── fmriprep.toml
├── sub-13MOZG.html


Thanks for reporting this. This is a bug in XCP-D, where surface files are passed along to the NIfTI post-processing workflow even though they’re only used for CIFTI post-processing. I’ll push a fix ASAP.

Great, thank you for a quick response!