Skip to content

Commit 1a8050e

Browse files
committed
Merge pull request #621 from poldrack/master
added handling of output in case where FEAT creates an ica directory rat...
2 parents 66ea1c2 + f380f5b commit 1a8050e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nipype/interfaces/fsl/model.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,17 @@ class FEAT(FSLCommand):
383383

384384
def _list_outputs(self):
385385
outputs = self._outputs().get()
386-
outputs['feat_dir'] = glob(os.path.join(os.getcwd(), '*feat'))[0]
386+
is_ica = False
387+
with open(self.inputs.fsf_file, 'rt') as fp:
388+
text = fp.read()
389+
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+
387397
return outputs
388398

389399

0 commit comments

Comments
 (0)