We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fb85ef commit f380f5bCopy full SHA for f380f5b
nipype/interfaces/fsl/model.py
@@ -383,12 +383,17 @@ class FEAT(FSLCommand):
383
384
def _list_outputs(self):
385
outputs = self._outputs().get()
386
- try:
387
- outputs['feat_dir'] = glob(os.path.join(os.getcwd(), '*feat'))[0]
388
- except:
389
- # in case FEAT was used to run an ICA job
+ is_ica = False
+ with open(self.inputs.fsf_file, 'rt') as fp:
+ text = fp.read()
+ if "set fmri(inmelodic) 1" in text:
390
+ is_ica = True
391
+
392
+ if is_ica:
393
outputs['feat_dir'] = glob(os.path.join(os.getcwd(), '*ica'))[0]
-
394
+ else:
395
+ outputs['feat_dir'] = glob(os.path.join(os.getcwd(), '*feat'))[0]
396
397
return outputs
398
399
0 commit comments