Skip to content

Commit ab4e15a

Browse files
committed
modified afni's cat_matvec to accept empty string opposed to opkey
1 parent 460c1bb commit ab4e15a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

nipype/interfaces/afni/utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,15 @@ class CatMatvec(AFNICommand):
617617

618618
def _format_arg(self, name, spec, value):
619619
if name == 'in_file':
620-
return spec.argstr % (' '.join([i[0] + ' -' + i[1]
621-
for i in value]))
620+
xfm_args=''
621+
for v in value:
622+
if len(v[1])>0:
623+
xfm_args += ' ' + v[0] + ' -' + v[1] + ' '
624+
else:
625+
xfm_args += ' ' + v[0] + ' '
626+
return spec.argstr % (xfm_args)
622627
return super(CatMatvec, self)._format_arg(name, spec, value)
623628

624-
625629
class CenterMassInputSpec(CommandLineInputSpec):
626630
in_file = File(
627631
desc='input file to 3dCM',

0 commit comments

Comments
 (0)