Skip to content

Commit fe12b42

Browse files
committed
improve cli heuristics
1 parent feff67b commit fe12b42

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

fmriprep/cli/run.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,19 @@ def build_workflow(opts, retval):
573573
* Run identifier: {uuid}.
574574
""".format
575575

576-
output_spaces = opts.output_space or []
576+
# Reduce to unique space identifiers
577+
output_spaces = sorted(set(opts.output_space))
578+
579+
# If FS is not run, drop all fs* output spaces
580+
if not opts.run_reconall:
581+
output_spaces = [item for item in output_spaces if not item.startswith('fs')]
582+
583+
# Map fsaverage to fsaverage6
584+
if 'fsaverage' in output_spaces:
585+
logger.warning('Selected "fsaverage" output space has been mapped to "fsaverage6"')
586+
output_spaces.remove('fsaverage')
587+
if 'fsaverage6' not in output_spaces:
588+
output_spaces = sorted(output_spaces + ['fsaverage6'])
577589

578590
# Validity of some inputs
579591
# ERROR check if use_aroma was specified, but the correct template was not

0 commit comments

Comments
 (0)