Duplicate node name error
Opened this issue · 7 comments
Hi,
I have been trying to preprocess a sample rat from a longitudinal multi-echo fMRI study (4 time points) using the rodent fMRIPrep docker. The pipeline does start running, but and optimally combines the the echoes for the first timepoint, but then fails on the second timepoint raising the error of a "duplicate node name "epi_reference_wf" ".
Running fMRIPREP version 0.0.2+43.ga6409ca.dirty:
* BIDS dataset path: /data.
* Participant list: ['JWD14'].
* Run identifier: 20220901-204740_f554503d-2e60-4c6b-9f5f-a3d2279e5583.
* Output spaces: Fischer344:res-native.
220901-20:48:20,629 nipype.workflow INFO:
No single-band-reference found for sub-JWD14_ses-PND20_task-rest_echo-1_bold.nii.
220901-20:48:20,791 nipype.workflow IMPORTANT:
Generating T2* map and optimally combined ME-EPI time series.
220901-20:48:21,190 nipype.workflow INFO:
No single-band-reference found for sub-JWD14_ses-PND200_task-rest_echo-1_bold.nii.
220901-20:48:21,309 nipype.workflow IMPORTANT:
Generating T2* map and optimally combined ME-EPI time series.
Process Process-2:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/lib/python3.8/site-packages/fprodents/cli/workflow.py", line 81, in build_workflow
retval["workflow"] = init_fmriprep_wf()
File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 50, in init_fmriprep_wf
single_subject_wf = init_single_subject_wf(subject_id)
File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 321, in init_single_subject_wf
workflow.connect([
File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/workflows.py", line 158, in connect
self._check_nodes(newnodes)
File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/workflows.py", line 766, in _check_nodes
raise IOError('Duplicate node name "%s" found.' % node.name)
OSError: Duplicate node name "epi_reference_wf" found.
In order to understand what is going on, I have:
- removed timepoints (I.e. included only timepoint 2,3,4): this revealed that apparently, there is nothing wrong with any specific timepoint, but rather the pipeline can process the first timepoint (whichever that may be) and then fails with the same error on the second one.
- run the same command as above on the fMRIPrep (not fMRIPrep-rodent) docker. The pipeline appears to run without issues when using the 'original' fMRIPrep docker.
My question is: Do I have to change the way I am running this when using the rodent docker? How do I avoid the error I am receiving?
Thank you very much,
Lena
Hi Lena -
Thanks for raising this.
fMRIPrep-rodents is in a very early stage of development and has not been tested on longitudinal data yet. This is good to know and we can work towards addressing this.
Out of curiosity, which version of fMRIPrep docker did you use? A previous version of fMRIPrep served as the base for this repo, but one of the downsides of splitting off this project is that it has been difficult to integrate the most recent advances in fMRIPrep while working on optimising the workflow for rodents, and so the two repos have diverged slightly. For example, the new multi-echo processing in fMRIPrep v21.0.0 has not been implemented here, although it is something we plan to incorporate once we're content with the fundamental changes that are necessary to work with rodent data. I think it's fair to say that we have yet to decide whether it is better to incorporate fMRIPrep-rodents back into fMRIPrep at some later stage or to come up with a better strategy to incorporate updates to fMRIPrep here.
Hi Eilidh,
Thanks for getting back to me!
I am using the latest version of the docker.
How would you recommend I proceed to process our images? Can you think of a way I can work around this problem?
Thanks a lot!
Hi @eilidhmacnicol,
I was wondering if you had any advice on how to proceed?
Thanks a lot,
Lena
Hi @LenaDorfschmidt. Sorry to keep you waiting: I'm currently on leave and haven't had time to look into this yet.
As I mentioned before, fMRIPrep-rodents is still in a very early stage of development and there are only a few of us working on it (in addition to other projects). If you would like to help us track down the issue, we would very warmly welcome your contribution. Otherwise, I can look into this when I'm back, but unfortunately, I don't have any advice except from building a docker image locally from the most up-to-date version of the repository rather than using one from DockerHub. However, I'm not confident that will solve your problems, as there are still outstanding development milestones to be achieved before a new version of fMRIPrep-rodents (and therefore the docker image) will be released.
Thanks for your thoughts, @eilidhmacnicol! I tried your suggestion and re-build the docker myself. It's progress in the sense that now I get a different error message ;)
Process Process-2:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/lib/python3.8/site-packages/fprodents/cli/workflow.py", line 81, in build_workflow
retval["workflow"] = init_fmriprep_wf()
File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 50, in init_fmriprep_wf
single_subject_wf = init_single_subject_wf(subject_id)
File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 128, in init_single_subject_wf
raise RuntimeError(
RuntimeError: No BOLD images found for participant <JWD14> and task <all>. All workflows require BOLD images
My dataset does pass the BIDS validator (it gets a warning for a missing README, and missing slice time codes, but no errors. This is what it looks like:
dataset_description.json
derivatives
participants.tsv
sub-JWD14
ses-PND20
anat
sub-JWD14_ses-PND20_T1w.nii
func
sub-JWD14_ses-PND20_task-rest_echo-1_bold.json
sub-JWD14_ses-PND20_task-rest_echo-2_bold.json
sub-JWD14_ses-PND20_task-rest_echo-2_bold.nii
sub-JWD14_ses-PND20_task-rest_echo-3_bold.json
sub-JWD14_ses-PND20_task-rest_echo-3_bold.nii
ses-PND35
anat
sub-JWD14_ses-PND35_T1w.nii
func
sub-JWD14_ses-PND35_task-rest_echo-1_bold.json
sub-JWD14_ses-PND35_task-rest_echo-1_bold.nii
sub-JWD14_ses-PND35_task-rest_echo-2_bold.json
sub-JWD14_ses-PND35_task-rest_echo-2_bold.nii
sub-JWD14_ses-PND35_task-rest_echo-3_bold.json
sub-JWD14_ses-PND35_task-rest_echo-3_bold.nii
....
Am I overlooking something in my file naming that would create this error? Again, fmriprep (non-rodent) doesn't complain.
Thanks a lot,
Lena
Hi @LenaDorfschmidt, we will try to address this issue as soon as possible. However, we are very limited in resources at this point -- do you feel like becoming a new contributor to fMRIPrep-rodents?
If so, we will be very happy to help debug this issue.
Hi, I am also experiencing this issue with a dataset containing 2 sessions (T1w, rs-fMRI and fmap) by subject. The acquisition were performed on mice using a Bruker BioSpec 70/30 USR machine.
Thanks for your thoughts, @eilidhmacnicol! I tried your suggestion and re-build the docker myself. It's progress in the sense that now I get a different error message ;)
Process Process-2: Traceback (most recent call last): File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/opt/conda/lib/python3.8/site-packages/fprodents/cli/workflow.py", line 81, in build_workflow retval["workflow"] = init_fmriprep_wf() File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 50, in init_fmriprep_wf single_subject_wf = init_single_subject_wf(subject_id) File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 128, in init_single_subject_wf raise RuntimeError( RuntimeError: No BOLD images found for participant <JWD14> and task <all>. All workflows require BOLD images
My dataset does pass the BIDS validator (it gets a warning for a missing README, and missing slice time codes, but no errors. This is what it looks like:
dataset_description.json derivatives participants.tsv sub-JWD14 ses-PND20 anat sub-JWD14_ses-PND20_T1w.nii func sub-JWD14_ses-PND20_task-rest_echo-1_bold.json sub-JWD14_ses-PND20_task-rest_echo-2_bold.json sub-JWD14_ses-PND20_task-rest_echo-2_bold.nii sub-JWD14_ses-PND20_task-rest_echo-3_bold.json sub-JWD14_ses-PND20_task-rest_echo-3_bold.nii ses-PND35 anat sub-JWD14_ses-PND35_T1w.nii func sub-JWD14_ses-PND35_task-rest_echo-1_bold.json sub-JWD14_ses-PND35_task-rest_echo-1_bold.nii sub-JWD14_ses-PND35_task-rest_echo-2_bold.json sub-JWD14_ses-PND35_task-rest_echo-2_bold.nii sub-JWD14_ses-PND35_task-rest_echo-3_bold.json sub-JWD14_ses-PND35_task-rest_echo-3_bold.nii ....
Am I overlooking something in my file naming that would create this error? Again, fmriprep (non-rodent) doesn't complain.
Thanks a lot, Lena
I have reference this error in issue #50 and provided a fix in PR #51