diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 1d53aac98c..faff6aa8ad 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -283,6 +283,9 @@ class AllineateInputSpec(AFNICommandInputSpec): ) out_matrix = File( argstr="-1Dmatrix_save %s", + name_template='%s_allineated.aff12.1D', + name_source='in_file', + keep_extension=False, desc="Save the transformation matrix for each volume.", xor=["in_matrix", "allcostx"], ) @@ -576,7 +579,8 @@ class Allineate(AFNICommand): >>> allineate.inputs.reference = 'structural.nii' >>> allineate.inputs.nwarp_fixmot = ['X', 'Y'] >>> allineate.cmdline - '3dAllineate -source functional.nii -nwarp_fixmotX -nwarp_fixmotY -prefix functional_allineate -base structural.nii' + '3dAllineate -source functional.nii -nwarp_fixmotX -nwarp_fixmotY -prefix functional_allineate \ +-1Dmatrix_save functional_allineated.aff12 -base structural.nii' >>> res = allineate.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index 356e7d52a0..2438dd2cae 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -58,7 +58,12 @@ def test_Allineate_inputs(): xor=["allcostx"], ), out_matrix=dict( - argstr="-1Dmatrix_save %s", extensions=None, xor=["in_matrix", "allcostx"], + argstr="-1Dmatrix_save %s", + extensions=None, + keep_extension=False, + name_source="in_file", + name_template="%s_allineated.aff12.1D", + xor=["in_matrix", "allcostx"], ), out_param_file=dict( argstr="-1Dparam_save %s",