nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
635 stars 293 forks source link

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

Closed tsalo closed 7 months ago

tsalo commented 7 months ago

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:

https://github.com/nipreps/fmriprep/blob/c46c8930751895f0048160fe6715f37f4a290c35/fmriprep/workflows/bold/base.py#L699-L703

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

tsalo commented 7 months ago

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

effigies commented 7 months ago

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