Skip to content

Commit 07ee9e1

Browse files
committed
workaround to ICA-AROMA chdir
1 parent 347c4b4 commit 07ee9e1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nipype/interfaces/fsl/aroma.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,18 @@ class ICA_AROMA(CommandLine):
120120
>>> AROMA_obj.inputs.mask = 'mask.nii.gz'
121121
>>> AROMA_obj.inputs.denoise_type = 'both'
122122
>>> AROMA_obj.inputs.out_dir = 'ICA_testout'
123-
>>> AROMA_obj.cmdline
124-
'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'
123+
>>> AROMA_obj.cmdline # doctest: +ELLIPSIS
124+
'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'
125125
"""
126126
_cmd = 'ICA_AROMA.py'
127127
input_spec = ICA_AROMAInputSpec
128128
output_spec = ICA_AROMAOutputSpec
129129

130+
def _format_arg(self, name, trait_spec, value):
131+
if name == 'out_dir':
132+
return trait_spec.argstr % os.path.abspath(value)
133+
return super(ICA_AROMA, self)._format_arg(name, trait_spec, value)
134+
130135
def _list_outputs(self):
131136
outputs = self.output_spec().get()
132137
outputs['out_dir'] = os.path.abspath(self.inputs.out_dir)

0 commit comments

Comments
 (0)