Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate node name error #858

Open
jhauneuro opened this issue Nov 8, 2024 · 2 comments
Open

Duplicate node name error #858

jhauneuro opened this issue Nov 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jhauneuro
Copy link

jhauneuro commented Nov 8, 2024

Summary

I am trying to run qsiprep on a subject with multiple scan sessions and more than one dwi sequence collected in each session but it crashed with the following error:

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 117, in build_workflow
    retval["workflow"] = init_qsiprep_wf()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/base.py", line 85, in init_qsiprep_wf
    single_subject_wf = init_single_subject_wf(subject_id, session_ids)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/base.py", line 380, 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 200, in init_merge_and_denoise_wf
    workflow.connect([
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 161, in connect
    self._check_nodes(newnodes)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 769, in _check_nodes
    raise IOError('Duplicate node name "%s" found.' % node.name)
OSError: Duplicate node name "dwi_denoise_ses_sdsu1_acq_2shell93dir_dir_AP_dwi_wf" found.

My dataset is bids valid and I used the acq label to distinguish multiple dwi sequences within a session. I have an acq label that is the same across different sessions (e.g., ses-A_acq-2shell93dir, ses-B_acq-2shell93dir) and I am wondering if that might be causing an issue?

Additional details

  • QSIPrep version: unstable (0.23.1)
  • Docker version: 27.3.1

Command I used to run qsiprep:

docker run -ti --rm --gpus "device=0" \
			-v /usr/local/freesurfer/7.4.1/license.txt:/opt/freesurfer/license.txt:ro \
			-v "$bids_dir":/data:ro \
			-v "$bids_filter_file":/sngl/bids_filter_config.json \
			-v "$eddy_config_file":/sngl/eddy/eddy_config.json:ro \
			-v "$out_dir":/out \
			-v "$work_dir":/scratch \
			pennbbl/qsiprep:unstable /data /out participant \
			--eddy-config /sngl/eddy/eddy_config.json \
			--bids-filter-file /sngl/bids_filter_config.json \
			--output-resolution "$res" --pepolar-method TOPUP \
			--bids-database-dir "$bids_dir" -w /scratch \
			--omp-nthreads 1 --nprocs 4 --mem 600 \
			--stop-on-first-crash --participant-label "$subj" \
			--subject-anatomical-reference sessionwise"
@jhauneuro jhauneuro added the bug Something isn't working label Nov 8, 2024
@tsalo
Copy link
Member

tsalo commented Nov 11, 2024

The node name includes the session ID, so I don't think that's the problem. Can you share your dataset tree- at least for the failing subject? I can try to reproduce the dataset structure and see if I can get the same error.

@jhauneuro
Copy link
Author

Here is the dataset tree for the subject it failed on:

sub-ts001
	ses-cfmri1
		anat
			sub-ts001_ses-cfmri1_acq-fspgr_T1w.json
			sub-ts001_ses-cfmri1_acq-fspgr_T1w.nii.gz
			sub-ts001_ses-cfmri1_acq-mprage_T1w.json
			sub-ts001_ses-cfmri1_acq-mprage_T1w.nii.gz
			sub-ts001_ses-cfmri1_T2w.json
			sub-ts001_ses-cfmri1_T2w.nii.gz
		dwi
			sub-ts001_ses-cfmri1_acq-1shell61dir_dir-PA_dwi.bval
			sub-ts001_ses-cfmri1_acq-1shell61dir_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri1_acq-1shell61dir_dir-PA_dwi.json
			sub-ts001_ses-cfmri1_acq-1shell61dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-AP_dwi.bval
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-AP_dwi.bvec
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-AP_dwi.json
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-PA_dwi.bval
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-PA_dwi.json
			sub-ts001_ses-cfmri1_acq-2shell93dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-cfmri1_acq-3shell45dir_dir-PA_dwi.bval
			sub-ts001_ses-cfmri1_acq-3shell45dir_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri1_acq-3shell45dir_dir-PA_dwi.json
			sub-ts001_ses-cfmri1_acq-3shell45dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-cfmri1_acq-abcd_dir-PA_dwi.bval
			sub-ts001_ses-cfmri1_acq-abcd_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri1_acq-abcd_dir-PA_dwi.json
			sub-ts001_ses-cfmri1_acq-abcd_dir-PA_dwi.nii.gz
		fmap
			sub-ts001_ses-cfmri1_acq-2mm_dir-AP_epi.json
			sub-ts001_ses-cfmri1_acq-2mm_dir-AP_epi.nii.gz
			sub-ts001_ses-cfmri1_acq-17mm_dir-AP_epi.json
			sub-ts001_ses-cfmri1_acq-17mm_dir-AP_epi.nii.gz
			sub-ts001_ses-cfmri1_acq-25mm_dir-AP_epi.json
			sub-ts001_ses-cfmri1_acq-25mm_dir-AP_epi.nii.gz
	ses-cfmri2
		anat
			sub-ts001_ses-cfmri2_acq-fspgr_T1w.json
			sub-ts001_ses-cfmri2_acq-fspgr_T1w.nii.gz
			sub-ts001_ses-cfmri2_acq-mprage_T1w.json
			sub-ts001_ses-cfmri2_acq-mprage_T1w.nii.gz
			sub-ts001_ses-cfmri2_T2w.json
			sub-ts001_ses-cfmri2_T2w.nii.gz
		dwi
			sub-ts001_ses-cfmri2_acq-1shell61dir_dir-PA_dwi.bval
			sub-ts001_ses-cfmri2_acq-1shell61dir_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri2_acq-1shell61dir_dir-PA_dwi.json
			sub-ts001_ses-cfmri2_acq-1shell61dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-AP_dwi.bval
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-AP_dwi.bvec
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-AP_dwi.json
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-PA_dwi.bval
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-PA_dwi.json
			sub-ts001_ses-cfmri2_acq-2shell93dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-cfmri2_acq-3shell45dir_dir-PA_dwi.bval
			sub-ts001_ses-cfmri2_acq-3shell45dir_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri2_acq-3shell45dir_dir-PA_dwi.json
			sub-ts001_ses-cfmri2_acq-3shell45dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-cfmri2_acq-abcd_dir-PA_dwi.bval
			sub-ts001_ses-cfmri2_acq-abcd_dir-PA_dwi.bvec
			sub-ts001_ses-cfmri2_acq-abcd_dir-PA_dwi.json
			sub-ts001_ses-cfmri2_acq-abcd_dir-PA_dwi.nii.gz
		fmap
			sub-ts001_ses-cfmri2_acq-2mm_dir-AP_epi.json
			sub-ts001_ses-cfmri2_acq-2mm_dir-AP_epi.nii.gz
			sub-ts001_ses-cfmri2_acq-17mm_dir-AP_epi.json
			sub-ts001_ses-cfmri2_acq-17mm_dir-AP_epi.nii.gz
			sub-ts001_ses-cfmri2_acq-25mm_dir-AP_epi.json
			sub-ts001_ses-cfmri2_acq-25mm_dir-AP_epi.nii.gz
	ses-sdsu1
		anat
			sub-ts001_ses-sdsu1_acq-mprage_T1w.json
			sub-ts001_ses-sdsu1_acq-mprage_T1w.nii.gz
			sub-ts001_ses-sdsu1_T2w.json
			sub-ts001_ses-sdsu1_T2w.nii.gz
		dwi
			sub-ts001_ses-sdsu1_acq-2shell93dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu1_acq-2shell93dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu1_acq-2shell93dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu1_acq-2shell93dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu1_acq-4shell96dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu1_acq-4shell96dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu1_acq-4shell96dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu1_acq-4shell96dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-PA_dwi.bval
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-PA_dwi.bvec
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-PA_dwi.json
			sub-ts001_ses-sdsu1_acq-hcplifespan98dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-PA_dwi.bval
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-PA_dwi.bvec
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-PA_dwi.json
			sub-ts001_ses-sdsu1_acq-hcplifespan99dir_dir-PA_dwi.nii.gz
		fmap
			sub-ts001_ses-sdsu1_acq-18mm_dir-PA_epi.json
			sub-ts001_ses-sdsu1_acq-18mm_dir-PA_epi.nii.gz
	ses-sdsu2
		anat
			sub-ts001_ses-sdsu2_acq-mprage_T1w.json
			sub-ts001_ses-sdsu2_acq-mprage_T1w.nii.gz
			sub-ts001_ses-sdsu2_T2w.json
			sub-ts001_ses-sdsu2_T2w.nii.gz
		dwi
			sub-ts001_ses-sdsu2_acq-2shell93dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu2_acq-2shell93dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu2_acq-2shell93dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu2_acq-2shell93dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu2_acq-4shell96dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu2_acq-4shell96dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu2_acq-4shell96dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu2_acq-4shell96dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-PA_dwi.bval
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-PA_dwi.bvec
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-PA_dwi.json
			sub-ts001_ses-sdsu2_acq-hcplifespan98dir_dir-PA_dwi.nii.gz
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-AP_dwi.bval
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-AP_dwi.bvec
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-AP_dwi.json
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-AP_dwi.nii.gz
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-PA_dwi.bval
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-PA_dwi.bvec
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-PA_dwi.json
			sub-ts001_ses-sdsu2_acq-hcplifespan99dir_dir-PA_dwi.nii.gz
		fmap
			sub-ts001_ses-sdsu2_acq-18mm_dir-PA_epi.json
			sub-ts001_ses-sdsu2_acq-18mm_dir-PA_epi.nii.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants