Skip to content

Commit e2c047b

Browse files
author
Shoshana Berleant
committed
fix fast??
1 parent ca65037 commit e2c047b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nipype/interfaces/fsl/preprocess.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,15 @@ def _format_arg(self, name, spec, value):
315315
formated = "-S %d %s" % (len(value), formated)
316316
return formated
317317

318+
def _parse_inputs(self, skip=None):
319+
''' ensures out_basename (argstring -o) always exists, otherwise fast
320+
puts the outputs in the same folder as the inputs '''
321+
arg_list = super(FAST, self)._parse_inputs(skip)
322+
if not ('-o ' in [arg[:3] for arg in arg_list]
323+
or '--out ' in [arg[:6] for arg in arg_list]):
324+
arg_list.insert(0, '-o {}'.format(self._gen_fname(self.inputs.in_files[-1])))
325+
return arg_list
326+
318327
def _list_outputs(self):
319328
outputs = self.output_spec().get()
320329
if not isdefined(self.inputs.number_classes):

0 commit comments

Comments
 (0)