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

Multi-echo reportlet datasinks' source_file not defined in resampling mode #3253

Closed
tsalo opened this issue Mar 11, 2024 · 2 comments
Closed

Comments

@tsalo
Copy link
Collaborator

tsalo commented Mar 11, 2024

What happened?

The ds_report_t2scomp and ds_report_t2star_hist nodes of init_bold_wf fail due to a missing source_file when I process multi-echo data with --level resampling.

I think this is because the step that sets source_file for reportlet datasink nodes is defined after the workflow is returned when level is resampling:

# Fill-in datasinks of reportlets seen so far
for node in workflow.list_node_names():
if node.split('.')[-1].startswith('ds_report'):
workflow.get_node(node).inputs.base_directory = fmriprep_dir
workflow.get_node(node).inputs.source_file = bold_file

What command did you use?

singularity run --home $HOME --cleanenv \
    -B $PROJECT_DIR:/data \
    -B $LICENSE:/license.txt \
    /cbica/home/salot/open-multi-echo-data/singularity/fmriprep-23_2_1.simg \
    /data/datasets/ds002156/inputs/data \
    /data/datasets/ds002156/outputs/fmriprep \
    participant \
    --participant-label $subject \
    -w /data/work/ds002156-fmriprep \
    --nprocs 1 \
    --omp-nthreads 1 \
    --mem-mb 120000 \
    --level resampling \
    --output-spaces func T1w MNI152NLin6Asym:res-2 \
    --me-t2s-fit-method curvefit \
    --output-layout bids \
    --me-output-echos \
    --project-goodvoxels \
    --cifti-output \
    --fs-license-file /license.txt

What version of fMRIPrep are you running?

23.2.1

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 344, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 722, in _run_command
    result = self._interface.run(cwd=outdir, ignore_exception=True)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 388, in run
    self._check_mandatory_inputs()
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 275, in _check_mandatory_inputs
    raise ValueError(msg)
ValueError: DerivativesDataSink requires a value for input 'source_file'. For a list of required inputs, see DerivativesDataSink.help()

Additional information / screenshots

No response

effigies pushed a commit that referenced this issue Mar 11, 2024
Closes #3253.

## Changes proposed in this pull request

- Copy code used to fill in `source_file` and `base_directory` fields
for reportlet datasinks in `init_bold_wf` for the `full` level to the
`resampling` level as well.
- AFAICT, the only reportlets that should be generated by the resampling
level are `ds_report_t2scomp` and `ds_report_t2star_hist`, so I could
directly add these fields to those nodes, but this approach seems more
robust.
@tsalo
Copy link
Collaborator Author

tsalo commented Mar 11, 2024

Do I need to duplicate the fix in master or can I close this issue?

@effigies
Copy link
Member

This will be merged if it hasn't already been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants