Skip to content

Commit 2c35800

Browse files
authored
Merge pull request #2398 from emdupre/afni-synthesize
[FIX] Bug fixes for afni.model
2 parents 03ac155 + dffae4f commit 2c35800

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

nipype/interfaces/afni/model.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,14 @@ def _list_outputs(self):
293293
outputs['x1D'] = self._gen_fname(
294294
suffix='.xmat.1D', **_gen_fname_opts)
295295

296+
if isdefined(self.inputs.cbucket):
297+
outputs['cbucket'] = os.path.abspath(self.inputs.cbucket)
298+
296299
outputs['reml_script'] = self._gen_fname(
297300
suffix='.REML_cmd', **_gen_fname_opts)
298301
# remove out_file from outputs if x1d_stop set to True
299302
if self.inputs.x1D_stop:
300-
del outputs['out_file']
303+
del outputs['out_file'], outputs['cbucket']
301304
else:
302305
outputs['out_file'] = os.path.abspath(self.inputs.out_file)
303306

@@ -652,3 +655,12 @@ class Synthesize(AFNICommand):
652655
_cmd = '3dSynthesize'
653656
input_spec = SynthesizeInputSpec
654657
output_spec = AFNICommandOutputSpec
658+
659+
def _list_outputs(self):
660+
outputs = self.output_spec().get()
661+
662+
for key in outputs.keys():
663+
if isdefined(self.inputs.get()[key]):
664+
outputs[key] = os.path.abspath(self.inputs.get()[key])
665+
666+
return outputs

nipype/interfaces/afni/tests/test_extra_Deconvolve.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ def test_x1dstop():
77
deconv.inputs.out_file = 'file.nii'
88
assert 'out_file' in deconv._list_outputs()
99
deconv.inputs.x1D_stop = True
10-
assert not 'out_file' in deconv._list_outputs()
10+
assert 'out_file' not in deconv._list_outputs()
11+
assert 'cbucket' not in deconv._list_outputs()

0 commit comments

Comments
 (0)