From 595f9184f51702395bcc8a29c3c4e83c5058e600 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 3 Apr 2018 15:13:45 +0200 Subject: [PATCH 1/4] fix catmatvec hash and output --- nipype/interfaces/afni/utils.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 9f306c7b85..af454f8d24 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -564,8 +564,11 @@ class CatMatvecInputSpec(AFNICommandInputSpec): argstr="%s", position=-2) out_file = File( - desc="File to write concattenated matvecs to", argstr=" > %s", + name_template='%s_cat.aff12.1D', + name_source='in_file', + keep_extension=False, + desc="File to write concattenated matvecs to", position=-1, mandatory=True) matrix = traits.Bool( @@ -616,6 +619,13 @@ def _format_arg(self, name, spec, value): for i in value])) return super(CatMatvec, self)._format_arg(name, spec, value) + def _list_outputs(self): + outputs = self.output_spec().get() + + if self.inputs.out_file: + outputs['out_file'] = op.abspath(self.inputs.out_file) + return outputs + class CenterMassInputSpec(CommandLineInputSpec): in_file = File( From dca0426f115dc1f08c0861c87b72f081ee298d38 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 3 Apr 2018 15:26:05 +0200 Subject: [PATCH 2/4] update test --- nipype/interfaces/afni/tests/test_auto_CatMatvec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py index dc1c981bb3..df0ac34e09 100644 --- a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py +++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py @@ -38,7 +38,10 @@ def test_CatMatvec_inputs(): ), out_file=dict( argstr=' > %s', + keep_extension=False, mandatory=True, + name_source='in_file', + name_template='%s_cat.aff12.1D', position=-1, ), outputtype=dict(), From fb2aaf47a1eb5c3532ff314460c41d121c849570 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 3 Apr 2018 21:59:30 +0200 Subject: [PATCH 3/4] remove useless _list_outputs --- nipype/interfaces/afni/utils.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index af454f8d24..bbddc150b9 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -619,14 +619,6 @@ def _format_arg(self, name, spec, value): for i in value])) return super(CatMatvec, self)._format_arg(name, spec, value) - def _list_outputs(self): - outputs = self.output_spec().get() - - if self.inputs.out_file: - outputs['out_file'] = op.abspath(self.inputs.out_file) - return outputs - - class CenterMassInputSpec(CommandLineInputSpec): in_file = File( desc='input file to 3dCM', From 694d85591d402d33eb287e0e8933d4739716bc83 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 3 Apr 2018 22:05:27 +0200 Subject: [PATCH 4/4] add removed line --- nipype/interfaces/afni/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index bbddc150b9..cb01ae4a2b 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -619,6 +619,7 @@ def _format_arg(self, name, spec, value): for i in value])) return super(CatMatvec, self)._format_arg(name, spec, value) + class CenterMassInputSpec(CommandLineInputSpec): in_file = File( desc='input file to 3dCM',