diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 0d56f2dbb5..c17a50c51d 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -293,11 +293,14 @@ def _list_outputs(self): outputs['x1D'] = self._gen_fname( suffix='.xmat.1D', **_gen_fname_opts) + if isdefined(self.inputs.cbucket): + outputs['cbucket'] = os.path.abspath(self.inputs.cbucket) + outputs['reml_script'] = self._gen_fname( suffix='.REML_cmd', **_gen_fname_opts) # remove out_file from outputs if x1d_stop set to True if self.inputs.x1D_stop: - del outputs['out_file'] + del outputs['out_file'], outputs['cbucket'] else: outputs['out_file'] = os.path.abspath(self.inputs.out_file) @@ -652,3 +655,12 @@ class Synthesize(AFNICommand): _cmd = '3dSynthesize' input_spec = SynthesizeInputSpec output_spec = AFNICommandOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + + for key in outputs.keys(): + if isdefined(self.inputs.get()[key]): + outputs[key] = os.path.abspath(self.inputs.get()[key]) + + return outputs diff --git a/nipype/interfaces/afni/tests/test_extra_Deconvolve.py b/nipype/interfaces/afni/tests/test_extra_Deconvolve.py index b80af90cf5..93adc3b748 100644 --- a/nipype/interfaces/afni/tests/test_extra_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_extra_Deconvolve.py @@ -7,4 +7,5 @@ def test_x1dstop(): deconv.inputs.out_file = 'file.nii' assert 'out_file' in deconv._list_outputs() deconv.inputs.x1D_stop = True - assert not 'out_file' in deconv._list_outputs() \ No newline at end of file + assert 'out_file' not in deconv._list_outputs() + assert 'cbucket' not in deconv._list_outputs()