From 07ee9e1bcf6d4beee135f1148f88c24a44fa9b57 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Wed, 2 May 2018 18:47:10 -0700 Subject: [PATCH] workaround to ICA-AROMA chdir --- nipype/interfaces/fsl/aroma.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/fsl/aroma.py b/nipype/interfaces/fsl/aroma.py index 7967ba2f58..a86763e3e5 100644 --- a/nipype/interfaces/fsl/aroma.py +++ b/nipype/interfaces/fsl/aroma.py @@ -120,13 +120,18 @@ class ICA_AROMA(CommandLine): >>> AROMA_obj.inputs.mask = 'mask.nii.gz' >>> AROMA_obj.inputs.denoise_type = 'both' >>> AROMA_obj.inputs.out_dir = 'ICA_testout' - >>> AROMA_obj.cmdline - 'ICA_AROMA.py -den both -warp warpfield.nii -i functional.nii -m mask.nii.gz -affmat func_to_struct.mat -mc fsl_mcflirt_movpar.txt -o ICA_testout' + >>> AROMA_obj.cmdline # doctest: +ELLIPSIS + 'ICA_AROMA.py -den both -warp warpfield.nii -i functional.nii -m mask.nii.gz -affmat func_to_struct.mat -mc fsl_mcflirt_movpar.txt -o .../ICA_testout' """ _cmd = 'ICA_AROMA.py' input_spec = ICA_AROMAInputSpec output_spec = ICA_AROMAOutputSpec + def _format_arg(self, name, trait_spec, value): + if name == 'out_dir': + return trait_spec.argstr % os.path.abspath(value) + return super(ICA_AROMA, self)._format_arg(name, trait_spec, value) + def _list_outputs(self): outputs = self.output_spec().get() outputs['out_dir'] = os.path.abspath(self.inputs.out_dir)