Skip to content

Commit

Permalink
FIX: Ensure connections and names make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 15, 2023
1 parent d2fcd38 commit 4564048
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
7 changes: 5 additions & 2 deletions fmriprep/workflows/bold/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ def init_bold_fit_wf(
# fmt:off
workflow.connect([
(hmcref_buffer, outputnode, [("boldref", "hmc_boldref")]),
(regref_buffer, outputnode, [("boldref", "coreg_boldref"),
("boldmask", "bold_mask")]),
(regref_buffer, outputnode, [
("boldref", "coreg_boldref"),
("boldmask", "bold_mask"),
]),
(fmapreg_buffer, outputnode, [("boldref2fmap_xfm", "boldref2fmap_xfm")]),
(hmc_buffer, outputnode, [("hmc_xforms", "motion_xfm")]),
(inputnode, func_fit_reports_wf, [
Expand Down Expand Up @@ -556,6 +558,7 @@ def init_bold_native_wf(
fields=[
# BOLD fit
"boldref",
"bold_mask",
"motion_xfm",
"fmapreg_xfm",
"dummy_scans",
Expand Down
20 changes: 10 additions & 10 deletions fmriprep/workflows/bold/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def init_ds_bold_native_wf(
workflow.connect(inputnode, 'source_files', raw_sources, 'in_files')

Check warning on line 588 in fmriprep/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/outputs.py#L586-L588

Added lines #L586 - L588 were not covered by tests

if bold_output:
ds_bold_native = pe.Node(
ds_bold = pe.Node(

Check warning on line 591 in fmriprep/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/outputs.py#L590-L591

Added lines #L590 - L591 were not covered by tests
DerivativesDataSink(
base_directory=output_dir,
desc='preproc',
Expand All @@ -598,36 +598,36 @@ def init_ds_bold_native_wf(
dismiss_entities=("echo",),
**timing_parameters,
),
name='ds_bold_native',
name='ds_bold',
run_without_submitting=True,
mem_gb=DEFAULT_MEMORY_MIN_GB,
)
workflow.connect([

Check warning on line 605 in fmriprep/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/outputs.py#L605

Added line #L605 was not covered by tests
(inputnode, ds_bold_native, [
(inputnode, ds_bold, [
('source_files', 'source_file'),
('bold_native', 'in_file'),
('bold', 'in_file'),
]),
]) # fmt:skip

if bold_output or echo_output:
ds_bold_mask_native = pe.Node(
ds_bold_mask = pe.Node(

Check warning on line 613 in fmriprep/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/outputs.py#L612-L613

Added lines #L612 - L613 were not covered by tests
DerivativesDataSink(
base_directory=output_dir,
desc='brain',
suffix='mask',
compress=True,
dismiss_entities=("echo",),
),
name='ds_bold_mask_native',
name='ds_bold_mask',
run_without_submitting=True,
mem_gb=DEFAULT_MEMORY_MIN_GB,
)
workflow.connect([

Check warning on line 625 in fmriprep/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/outputs.py#L625

Added line #L625 was not covered by tests
(inputnode, ds_bold_mask_native, [
(inputnode, ds_bold_mask, [
('source_files', 'source_file'),
('bold_mask_native', 'in_file'),
('bold_mask', 'in_file'),
]),
(raw_sources, ds_bold_mask_native, [('out', 'RawSources')]),
(raw_sources, ds_bold_mask, [('out', 'RawSources')]),
]) # fmt:skip

if bold_output and multiecho:
Expand Down Expand Up @@ -676,7 +676,7 @@ def init_ds_bold_native_wf(
workflow.connect([

Check warning on line 676 in fmriprep/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/outputs.py#L675-L676

Added lines #L675 - L676 were not covered by tests
(inputnode, ds_bold_echos, [
('source_files', 'source_file'),
('bold_echos_native', 'in_file'),
('bold_echos', 'in_file'),
]),
]) # fmt:skip

Expand Down

0 comments on commit 4564048

Please sign in to comment.