Skip to content

Commit

Permalink
FIX: Add datasink fill-in step to resampling level (#3254)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tsalo authored Mar 11, 2024
1 parent e9b0840 commit d8ab59b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fmriprep/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ def init_bold_wf(
]) # fmt:skip

if config.workflow.level == "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
return workflow

# Resample to anatomical space
Expand Down

0 comments on commit d8ab59b

Please sign in to comment.