Skip to content

Commit

Permalink
Update outputs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Oct 15, 2023
1 parent d815d7f commit 10379ff
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions xcp_d/workflows/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,16 +443,21 @@ def _custom_to_source(out_file):
run_without_submitting=True,
mem_gb=1,
)
# fmt:off
workflow.connect([
(inputnode, confounds_src, [("fmriprep_confounds_file", "in1")]),
(ds_temporal_mask, confounds_src, [
(("out_file", _postproc_to_source, output_dir), "in2"),
]),
])
# fmt:off
if custom_confounds_file:
confounds_src.inputs.in3 = _custom_to_source(custom_confounds_file)
workflow.connect([(inputnode, confounds_src, [("fmriprep_confounds_file", "in1")])])
if fd_thresh > 0:
# fmt:off
workflow.connect([
(ds_temporal_mask, confounds_src, [
(("out_file", _postproc_to_source, output_dir), "in2"),
]),
])
# fmt:on

if custom_confounds_file:
confounds_src.inputs.in3 = _custom_to_source(custom_confounds_file)

elif custom_confounds_file:
confounds_src.inputs.in2 = _custom_to_source(custom_confounds_file)

ds_confounds = pe.Node(
DerivativesDataSink(
Expand Down

0 comments on commit 10379ff

Please sign in to comment.