PennLINC / qsiprep

Preprocessing of diffusion MRI

Home Page:http://qsiprep.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qsirecon workflow connection error: Trying to connect anat_ingress_wf.register_fs_to_qsiprep_wf:outputnode.brain to anat_ingress_wf.outputnode:brain but input 'brain' of node 'anat_ingress_wf.outputnode' is already connected

PandaFaye opened this issue · comments

Summary

workflow connection error when doing qsirecon at the step "HSVS 5tt imaged will be registered to the QSIPrep T1w image", using the pre-configured recon_workflows "mrtrix_multishell_msmt_ACT-hsvs".
I tried different subjects and got the same error. Freesurfer results were from frmiprep-latest.

Reproducing the bug

Here is my command:

singularity run  --containall --writable-tmpfs \
-B $BIDS_DIR:/bids_dataset:ro \
-B ${DERIVS_DIR}:/output \
-B ${WORK_DIR}:/work \
-B ${derivatives_freesurfer}:/derivatives/freesurfer \
-B ${derivatives_qsiprep}:/derivatives/qsiprep \
-B ${FREESURFER_HOME}/license.txt:/opt/freesurfer/license.txt \
    ${IMAGE_DIR}/qsiprep-0.21.4.sif \
/bids_dataset /output participant \
-w /work \
-vvv --omp-nthreads 16 --nthreads ${SLURM_CPUS_PER_TASK:-1} \
--participant-label $subject \
--recon-only --recon-input /derivatives/qsiprep --skip-odf-reports \
--recon-spec mrtrix_multishell_msmt_ACT-hsvs --freesurfer-input /derivatives/freesurfer \
--fs-license-file /opt/freesurfer/license.txt \
--skip_bids_validation --stop-on-first-crash

and got the following error:

240524-14:27:43,476 nipype.workflow IMPORTANT:
	 
    Running qsirecon version 0.21.5.dev0+g36b93fe.d20240504:
      * BIDS dataset path: /bids_dataset.
      * Participant list: ['001'].
      * Run identifier: 20240524-142733_667c4495-1002-402f-a4d3-3f1d4727d32a.
    
240524-14:27:43,625 nipype.workflow INFO:
	 found ['/derivatives/qsiprep/sub-001/dwi/sub-001_space-T1w_desc-preproc_dwi.nii.gz'] in /derivatives/qsiprep
240524-14:27:43,626 nipype.workflow INFO:
	 CHECKING /derivatives/qsiprep/sub-001/anat/sub-001_desc-brain_mask.nii.gz: True
240524-14:27:43,626 nipype.workflow WARNING:
	 A Non-gzipped input nifti file was found. Consider gzipping /derivatives/qsiprep/sub-001/anat/sub-001_desc-preproc_T1w.nii
240524-14:27:43,627 nipype.workflow INFO:
	 CHECKING /derivatives/qsiprep/sub-001/anat/sub-001_desc-preproc_T1w.nii.gz: True
240524-14:27:43,627 nipype.workflow INFO:
	 Found usable QSIPrep-preprocessed T1w image and mask.
240524-14:27:43,627 nipype.workflow INFO:
	 CHECKING /derivatives/qsiprep/sub-001/anat/sub-001_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5: True
240524-14:27:43,627 nipype.workflow INFO:
	 CHECKING /derivatives/qsiprep/sub-001/anat/sub-001_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5: True
240524-14:27:43,627 nipype.workflow INFO:
	 Found high-res anatomical data in preprocessed inputs for 001.
240524-14:27:43,629 nipype.workflow INFO:
	 Freesurfer directory /derivatives/freesurfer/sub-001 exists for 001
240524-14:27:43,630 nipype.workflow INFO:
	 FreeSurfer data will be used to create a HSVS 5tt image.
240524-14:27:43,631 nipype.workflow INFO:
	 HSVS 5tt imaged will be registered to the QSIPrep T1w image.
Finished tasks with exit code 1

and

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/run.py", line 1330, in build_recon_workflow
    retval["workflow"] = init_qsirecon_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/recon/base.py", line 130, in init_qsirecon_wf
    single_subject_wf = init_single_subject_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/recon/base.py", line 262, in init_single_subject_wf
    anat_ingress_node, available_anatomical_data = init_highres_recon_anatomical_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/recon/anatomical.py", line 178, in init_highres_recon_anatomical_wf
    workflow.connect([
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 183, in connect
    raise Exception(
Exception: Trying to connect anat_ingress_wf.register_fs_to_qsiprep_wf:outputnode.brain to anat_ingress_wf.outputnode:brain but input 'brain' of node 'anat_ingress_wf.outputnode' is already
connected.

Additional details

  • QSIPrep version: 0.21.4
  • Singularity version: 3.11.1

I also checked the data shape of brain.mgz from freesurfer and desc-preproc_T1w.nii from qsiprep output, found out they are different.
What should I do ?

(closing as duplicate of #718)