Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Aug 19, 2024
1 parent 15e4d54 commit 724d98f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions qsirecon/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ def init_single_subject_recon_wf(subject_id):
name=f"{wf_name}_recon_wf",
)

file_anat_ingress_node = (
anat_ingress_node
if config.workflow.recon_input_pipeline == "qsiprep"
else anat_ingress_nodes[dwi_file]
)

# Connect the collected diffusion data (gradients, etc) to the inputnode
workflow.connect([
# The dwi data
Expand All @@ -226,15 +232,10 @@ def init_single_subject_recon_wf(subject_id):
(trait, f"inputnode.{trait}") for trait in recon_workflow_input_fields
]),

(
anat_ingress_node if config.workflow.recon_input_pipeline == "qsiprep"
else anat_ingress_nodes[dwi_file],
dwi_individual_anatomical_wfs[dwi_file],
[
(f"outputnode.{trait}", f"inputnode.{trait}")
for trait in anatomical_workflow_outputs
]
),
(file_anat_ingress_node, dwi_individual_anatomical_wfs[dwi_file], [
(f"outputnode.{trait}", f"inputnode.{trait}")
for trait in anatomical_workflow_outputs
]),
]) # fmt:skip

# Preprocessing of anatomical data (includes possible registration template)
Expand All @@ -253,7 +254,7 @@ def init_single_subject_recon_wf(subject_id):
run_without_submitting=True,
)
workflow.connect([
(anat_ingress_nodes[dwi_file], ds_report_about, [
(file_anat_ingress_node, ds_report_about, [
(('t1w_preproc', fix_multi_T1w_source_name), 'source_file'),
]),
(about, ds_report_about, [('out_report', 'in_file')]),
Expand Down

0 comments on commit 724d98f

Please sign in to comment.