Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions niworkflows/interfaces/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,7 @@ def _run_interface(self, runtime):
if custom_entities:
# Example: f"{key}-{{{key}}}" -> "task-{task}"
custom_pat = '_'.join(f'{key}-{{{key}}}' for key in sorted(custom_entities))
patterns = [
pat.replace('_{suffix', '_'.join(('', custom_pat, '{suffix'))) for pat in patterns
]
patterns = [pat.replace('_{suffix', f'_{custom_pat}_{{suffix') for pat in patterns]

# Build the output path(s)
dest_files = build_path(out_entities, path_patterns=patterns)
Expand Down Expand Up @@ -1108,9 +1106,7 @@ def _run_interface(self, runtime):
if custom_entities:
# Example: f"{key}-{{{key}}}" -> "task-{task}"
custom_pat = '_'.join(f'{key}-{{{key}}}' for key in sorted(custom_entities))
patterns = [
pat.replace('_{suffix', '_'.join(('', custom_pat, '{suffix'))) for pat in patterns
]
patterns = [pat.replace('_{suffix', f'_{custom_pat}_{{suffix') for pat in patterns]

# Prepare SimpleInterface outputs object
self._results['out_file'] = []
Expand Down
2 changes: 1 addition & 1 deletion niworkflows/utils/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def __call__(self, parser, namespace, values, option_string=None):
# relevant discussions:
# https://github.com/nipreps/niworkflows/pull/457#discussion_r375510227
# https://github.com/nipreps/niworkflows/pull/494
val = ':'.join((val, 'res-native'))
val = f'{val}:res-native'
for sp in Reference.from_string(val):
spaces.add(sp)
setattr(namespace, self.dest, spaces)
Expand Down
Loading