Skip to content

Commit

Permalink
fix: bold native ref workflow connections
Browse files Browse the repository at this point in the history
  • Loading branch information
eilidhmacnicol committed May 9, 2023
1 parent beed49a commit d95a453
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions fprodents/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
"bold_std_ref",
"bold_mask_std",
"bold_native",
"bold_native_ref",
"confounds",
"melodic_mix",
"nonaggr_denoised_file",
Expand Down Expand Up @@ -293,6 +294,8 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
('bold_t1_ref', 'inputnode.bold_t1_ref'),
('bold_mask_t1', 'inputnode.bold_mask_t1'),
('bold_native', 'inputnode.bold_native'),
('bold_native_ref', 'inputnode.bold_native_ref'),
('bold_mask', 'inputnode.bold_mask_native'),
('confounds', 'inputnode.confounds'),
('melodic_mix', 'inputnode.melodic_mix'),
('nonaggr_denoised_file', 'inputnode.nonaggr_denoised_file'),
Expand Down Expand Up @@ -486,8 +489,8 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
)
# fmt:off
workflow.connect([
(inputnode, boldmask_to_t1w, [('ref_file', 'reference_image')]),
(bold_reg_wf, boldmask_to_t1w, [('outputnode.bold2anat', 'transforms')]),
(bold_t1_trans_wf, boldmask_to_t1w, [('outputnode.bold_mask_t1', 'reference_image')]),
(t1w_mask_bold_tfm, boldmask_to_t1w, [('output_image', 'input_image')]),
(boldmask_to_t1w, outputnode, [('output_image', 'bold_mask_t1')]),
])
Expand Down Expand Up @@ -613,7 +616,6 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
# Connect bold_bold_trans_wf
(inputnode, bold_t1_trans_wf, [('ref_file', 'inputnode.ref_bold_brain')]),
(inputnode, bold_bold_trans_wf, [('ref_file', 'inputnode.bold_ref')]),
(t1w_mask_bold_tfm, outputnode, [('output_image', 'bold_mask')]),
(t1w_mask_bold_tfm, bold_confounds_wf, [('output_image', 'inputnode.bold_mask')]),
(t1w_mask_bold_tfm, bold_bold_trans_wf, [('output_image', 'inputnode.bold_mask')]),
(t1w_mask_bold_tfm, bold_std_trans_wf, [('output_image', 'inputnode.bold_mask')]),
Expand All @@ -638,10 +640,10 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
if nonstd_spaces.intersection(("func", "run", "bold", "boldref", "sbref")):
# fmt:off
workflow.connect([
(bold_bold_trans_wf, outputnode, [('outputnode.bold', 'bold_native')]),
(bold_bold_trans_wf, func_derivatives_wf, [
('outputnode.bold_ref', 'inputnode.bold_native_ref'),
('outputnode.bold_mask', 'inputnode.bold_mask_native')]),
(bold_bold_trans_wf, outputnode, [
('outputnode.bold', 'bold_native'),
('outputnode.bold_ref', 'bold_native_ref'),
('outputnode.bold_mask', 'bold_mask')]),
])
# fmt:on
return workflow
Expand Down Expand Up @@ -718,6 +720,8 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
(sdc_report, ds_report_sdc, [("out_report", "in_file")]),
(final_boldref_wf, carpetplot_wf, [('outputnode.bold_mask', 'inputnode.bold_mask')]),
(final_boldref_wf, bold_confounds_wf, [("outputnode.bold_mask", 'inputnode.bold_mask')]),
(final_boldref_wf, outputnode, [("outputnode.ref_image", "bold_native_ref"),
("outputnode.bold_mask", "bold_mask")]),
])
# fmt:on

Expand Down

0 comments on commit d95a453

Please sign in to comment.