Skip to content

Commit

Permalink
fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Nov 15, 2023
1 parent abc4e99 commit 1f079de
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion aslprep/workflows/asl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def init_asl_preproc_wf(
(refine_mask, plot_cbf_wf, [("out_mask", "inputnode.asl_mask")]),
(asl_confounds_wf, plot_cbf_wf, [
("outputnode.crown_mask", "inputnode.crown_mask"),
(("outputnode.acompcor_masks", _select_last_in_list), "inputnode.acompcor_mask"),
("outputnode.acompcor_masks", "inputnode.acompcor_masks"),
]),
])
# fmt:on
Expand Down
20 changes: 13 additions & 7 deletions aslprep/workflows/asl/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,20 @@ def init_carpetplot_wf(

# fmt:off
workflow.connect([
(inputnode, mrg_xfms, [("t1_bold_xform", "in1"),
("std2anat_xfm", "in2")]),
(inputnode, mrg_xfms, [
("t1_bold_xform", "in1"),
("std2anat_xfm", "in2"),
]),
(inputnode, resample_parc, [("bold_mask", "reference_image")]),
(inputnode, parcels, [("crown_mask", "crown_mask")]),
(inputnode, parcels, [("acompcor_mask", "acompcor_mask")]),
(inputnode, conf_plot, [("bold", "in_nifti"),
("confounds_file", "confounds_file"),
("dummy_scans", "drop_trs")]),
(inputnode, parcels, [
("crown_mask", "crown_mask"),
("acompcor_mask", "acompcor_mask"),
]),
(inputnode, conf_plot, [
("bold", "in_nifti"),
("confounds_file", "confounds_file"),
("dummy_scans", "drop_trs"),
]),
(mrg_xfms, resample_parc, [("out", "transforms")]),
(resample_parc, parcels, [("output_image", "segmentation")]),
(parcels, conf_plot, [("out", "in_segm")]),
Expand Down
7 changes: 4 additions & 3 deletions aslprep/workflows/asl/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from aslprep.interfaces.ants import ApplyTransforms
from aslprep.interfaces.confounds import GatherCBFConfounds
from aslprep.interfaces.plotting import CBFByTissueTypePlot, CBFSummary
from aslprep.utils.misc import _select_last_in_list
from aslprep.workflows.asl.confounds import init_carpetplot_wf


Expand Down Expand Up @@ -47,7 +48,7 @@ def init_plot_cbf_wf(
"std2anat_xfm",
# If plot_timeseries is True
"crown_mask",
"acompcor_mask",
"acompcor_masks",
# CBF outputs
"mean_cbf",
# Single-delay outputs
Expand Down Expand Up @@ -124,7 +125,7 @@ def init_plot_cbf_wf(
workflow.connect([
(inputnode, merge_rois, [
("asl_mask", "in1"),
("acompcor_mask", "in2"),
("acompcor_masks", "in2"),
]),
(inputnode, signals, [("cbf_ts", "in_file")]),
(merge_rois, signals, [("out", "label_files")]),
Expand Down Expand Up @@ -169,7 +170,7 @@ def init_plot_cbf_wf(
("asl_mask", "inputnode.bold_mask"),
("anat_to_aslref_xfm", "inputnode.t1_bold_xform"),
("crown_mask", "inputnode.crown_mask"),
("acompcor_mask", "inputnode.acompcor_mask"),
(("acompcor_mask", _select_last_in_list), "inputnode.acompcor_mask"),
]),
(create_cbf_confounds, carpetplot_wf, [
("confounds_file", "inputnode.confounds_file"),
Expand Down

0 comments on commit 1f079de

Please sign in to comment.