QSIprep connection error

Hello,

Starting a new post here, as I encountered new error while running a participant through qsiprep.

Summary of what happened:

Preprocessing stopped before it should.

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

singularity run --containall \
    -B /media/bids,\
/media/outputdwi,\
/home/ccc/license.txt:/opt/freesurfer/license.txt,\
/media/tmp:/tmp,\
/media/PRE:/root/work \
    qsiprep-0.22.0.sif \
    /media/bids \
    /media/outputdwi \
    participant --participant-label 220801 \
    --denoise-after-combining \
    --output-resolution 2.0 \
    --fs-license-file /opt/freesurfer/license.txt

Version:

qsiprep-0.22.0

Environment (Docker, Singularity / Apptainer, custom installation): singularity

singularity

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

Relevant log outputs (up to 20 lines):

241101-01:04:27,769 nipype.workflow IMPORTANT:
         Building QSIPrep's workflow:
           * BIDS dataset path: /media/bids.
           * Participant list: ['220801'].
           * Run identifier: 20241101-010407_698135d4-4845-4f63-92e5-9ac796f46494.
241101-01:04:27,836 nipype.workflow INFO:
         Running nonlinear normalization to template
241101-01:04:27,857 nipype.workflow INFO:
         Combining all 2 dwis within the single available session
241101-01:04:27,885 nipype.workflow INFO:
         [{'dwi_series': ['/media/bids/sub-220801/dwi/sub-220801_run-01_dwi.nii.gz', '/media/bids/sub-220801/dwi/sub-220801_run-02_dwi.nii.gz'], 'fieldmap_info': {'suffix': 'epi', 'epi': ['/media/bids/sub-220801/fmap/sub-220801_acq-single_dir-AP_epi.nii.gz', '/media/bids/sub-220801/fmap/sub-220801_acq-single_dir-PA_epi.nii.gz']}, 'dwi_series_pedir': 'j', 'concatenated_bids_name': 'sub-220801'}]
241101-01:04:28,68 nipype.workflow INFO:
         Automatically using 5, 5, 5 window for dwidenoise
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/cli/workflow.py", line 160, in build_workflow
    retval["workflow"] = workflow_builder()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/base.py", line 82, in init_qsiprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/base.py", line 352, in init_single_subject_wf
    dwi_preproc_wf = init_dwi_preproc_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/dwi/base.py", line 246, in init_dwi_preproc_wf
    pre_hmc_wf = init_dwi_pre_hmc_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/dwi/pre_hmc.py", line 238, in init_dwi_pre_hmc_wf
    merge_dwis = init_merge_and_denoise_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/dwi/merge.py", line 291, in init_merge_and_denoise_wf
    workflow.connect([
  File "/opt/conda/envs/qsiprep/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 merge_dwis has no output called out_dwi_phase

Screenshots / relevant information:


Hi @Catherine_Tang,

Is this error subject specific or for everyone? Does it persist on the most recent qsiprep version, and/or if you remove the --denoise-after-combining flag?

Unrelated, but I suggest you add -e to the singularity run preamble, as well as add a working directory to your qsiprep command.

Best,
Steven

I believe 0.22.0 is latest stable version. I haven’t tested other subjects yet, but it looks like if I remove --denoise-after-combining, the error is gone. It’s now proceeded to later stages. That’s definitely a bug then.

Thanks for the other suggestions!