Skip to content

Commit

Permalink
RF: l1_metadata node no longer required
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Dec 19, 2018
1 parent 7a1d128 commit fbbfb4d
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions fitlins/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
from ..interfaces.utils import MergeAll


def join_dict(base_dict, dict_list):
return [{**base_dict, **iter_dict} for iter_dict in dict_list]


def init_fitlins_wf(bids_dir, derivatives, out_dir, space, exclude_pattern=None,
include_pattern=None, model=None, participants=None,
base_dir=None, name='fitlins_wf'):
Expand Down Expand Up @@ -55,13 +51,6 @@ def init_fitlins_wf(bids_dir, derivatives, out_dir, space, exclude_pattern=None,
'type': 'preproc', 'suffix': 'bold', 'space': space}),
name='getter')

# Accumulate metadata
l1_metadata = pe.MapNode(
niu.Function(function=join_dict),
iterfield=['base_dict', 'dict_list'],
name='l1_metadata',
run_without_submitting=True)

l1_model = pe.MapNode(
FirstLevelModel(),
iterfield=['session_info', 'contrast_info', 'bold_file', 'mask_file'],
Expand Down Expand Up @@ -130,8 +119,6 @@ def init_fitlins_wf(bids_dir, derivatives, out_dir, space, exclude_pattern=None,
(loader, l1_model, [('session_info', 'session_info')]),
(getter, l1_model, [('bold_files', 'bold_file'),
('mask_files', 'mask_file')]),
(getter, l1_metadata, [('entities', 'base_dict')]),
(l1_model, l1_metadata, [('contrast_metadata', 'dict_list')]),
(l1_model, plot_design, [('design_matrix', 'data')]),
])

Expand Down Expand Up @@ -195,7 +182,7 @@ def init_fitlins_wf(bids_dir, derivatives, out_dir, space, exclude_pattern=None,
(loader, select_entities, [('entities', 'inlist')]),
(select_entities, getter, [('out', 'entities')]),
(select_entities, ds_model_warnings, [('out', 'entities')]),
(l1_metadata, collate, [('out', 'contrast_metadata')]),
(l1_model, collate, [('contrast_metadata', 'contrast_metadata')]),
(select_entities, ds_design, [('out', 'entities')]),
(plot_design, ds_design, [('figure', 'in_file')]),
(select_contrasts, plot_l1_contrast_matrix, [('out', 'contrast_info')]),
Expand All @@ -213,7 +200,7 @@ def init_fitlins_wf(bids_dir, derivatives, out_dir, space, exclude_pattern=None,

wf.connect([
(models[-1], model, [('contrast_maps', 'stat_files')]),
(l1_metadata, model, [('out', 'stat_metadata')]),
(l1_model, model, [('contrast_metadata', 'stat_metadata')]),
(model, collate, [('contrast_metadata', 'contrast_metadata')]),
])

Expand Down

0 comments on commit fbbfb4d

Please sign in to comment.