Skip to content

Commit

Permalink
Try patching connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Oct 10, 2023
1 parent a54afa9 commit e6395c3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 2 deletions.
2 changes: 2 additions & 0 deletions xcp_d/tests/data/test_ds001419_cifti_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-interpolate
xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-interpolated_bold.json
xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-linc_qc.csv
xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_reho.dscalar.nii
xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_reho.json
xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-dcan_qc.hdf5
xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.json
xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.tsv
Expand Down Expand Up @@ -277,6 +278,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-interpolate
xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-interpolated_bold.json
xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-linc_qc.csv
xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_reho.dscalar.nii
xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_reho.json
xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_den-91k_timeseries.ptseries.nii
xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_timeseries.tsv
xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S152Parcels_den-91k_timeseries.ptseries.nii
Expand Down
1 change: 1 addition & 0 deletions xcp_d/tests/data/test_pnc_cifti_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,5 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-interpolated_bold.json
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-linc_qc.csv
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_reho.dscalar.nii
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_reho.json
xcp_d/sub-1648798153_ses-PNC1_executive_summary.html
1 change: 1 addition & 0 deletions xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,5 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-interpolated_bold.json
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-linc_qc.csv
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_reho.dscalar.nii
xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_reho.json
xcp_d/sub-1648798153_ses-PNC1_executive_summary.html
5 changes: 4 additions & 1 deletion xcp_d/workflows/bold.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,10 @@ def init_postprocess_nifti_wf(

# fmt:off
workflow.connect([
(inputnode, postproc_derivatives_wf, [("atlas_names", "inputnode.atlas_names")]),
(inputnode, postproc_derivatives_wf, [
("fmriprep_confounds_file", "inputnode.fmriprep_confounds_file"),
("atlas_names", "inputnode.atlas_names"),
]),
(prepare_confounds_wf, postproc_derivatives_wf, [
("outputnode.confounds_file", "inputnode.confounds_file"),
("outputnode.filtered_motion", "inputnode.filtered_motion"),
Expand Down
5 changes: 4 additions & 1 deletion xcp_d/workflows/cifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,10 @@ def init_postprocess_cifti_wf(

# fmt:off
workflow.connect([
(inputnode, postproc_derivatives_wf, [("atlas_names", "inputnode.atlas_names")]),
(inputnode, postproc_derivatives_wf, [
("fmriprep_confounds_file", "fmriprep_confounds_file"),
("atlas_names", "inputnode.atlas_names"),
]),
(denoise_bold_wf, postproc_derivatives_wf, [
("outputnode.interpolated_filtered_bold", "inputnode.interpolated_filtered_bold"),
("outputnode.censored_denoised_bold", "inputnode.censored_denoised_bold"),
Expand Down
20 changes: 20 additions & 0 deletions xcp_d/workflows/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ def init_postproc_derivatives_wf(
)
preprocessed_bold_sources.inputs.in1 = name_source

preprocessed_confounds_sources = pe.Node(
InferBIDSURIs(
numinputs=1,
dataset_name="preprocessed",
dataset_path=fmri_dir,
),
name="preprocessed_confounds_sources",
run_without_submitting=True,
mem_gb=1,
)
preprocessed_confounds_sources.inputs.in1 = name_source

ds_temporal_mask = pe.Node(
DerivativesDataSink(
base_directory=output_dir,
Expand Down Expand Up @@ -828,6 +840,14 @@ def init_postproc_derivatives_wf(
]),
])
# fmt:on
else:
# fmt:off
workflow.connect([
(inputnode, outputnode, [
("interpolated_filtered_bold", "interpolated_filtered_bold"),
]),
])
# fmt:on

if bandpass_filter and (fd_thresh <= 0):
# fmt:off
Expand Down

0 comments on commit e6395c3

Please sign in to comment.