internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: nipy/nipype

Issue:
typo in trait name of AFNI CatMatvec interface
### Summary
typo in `afni.Catmatvec`: trait name is `fourxfour` not `fourXfour`
https://github.com/nipy/nipype/blob/master/nipype/interfaces/afni/utils.py#L610

### Actual behavior
```Python
from nipype.interfaces import afni

cat_matvec = afni.CatMatvec()
cat_matvec.inputs.oneline = True
```
throws 
```Python
AttributeError: 'CatMatvecInputSpec' object has no attribute 'fourXfour'
```

### Platform details:

Please paste the output of: `python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"`

{'nibabel_version': '2.1.0', 'sys_executable': '/home/salma/anaconda2/bin/python', 'networkx_version': '1.11', 'numpy_version': '1.13.1', 'sys_platform': 'linux2', 'sys_version': '2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]', 'commit_source': u'repository', 'commit_hash': '7ead69d', 'pkg_path': 'nipype', 'nipype_version': u'1.0.0-dev+g7ead69d', 'traits_version': '4.6.0', 'scipy_version': '0.19.1'}
1.0.0-dev+g7ead69d



Discussion:

Resolving patch:
diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py
--- a/nipype/interfaces/afni/utils.py
+++ b/nipype/interfaces/afni/utils.py
@@ -602,12 +602,12 @@ class CatMatvecInputSpec(AFNICommandInputSpec):
                "This feature could be used, with clever scripting, to input"
                "a matrix directly on the command line to program 3dWarp.",
         argstr="-MATRIX",
-        xor=['oneline','fourXfour'])
+        xor=['oneline', 'fourxfour'])
     oneline = traits.Bool(
         descr="indicates that the resulting matrix"
               "will simply be written as 12 numbers on one line.",
         argstr="-ONELINE",
-        xor=['matrix','fourXfour'])
+        xor=['matrix', 'fourxfour'])
     fourxfour = traits.Bool(
         descr="Output matrix in augmented form (last row is 0 0 0 1)"
               "This option does not work with -MATRIX or -ONELINE",


Test patch:
diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py
--- a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py
+++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py
@@ -23,11 +23,11 @@ def test_CatMatvec_inputs():
     ),
     matrix=dict(argstr='-MATRIX',
     descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.",
-    xor=['oneline', 'fourXfour'],
+    xor=['oneline', 'fourxfour'],
     ),
     oneline=dict(argstr='-ONELINE',
     descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.',
-    xor=['matrix', 'fourXfour'],
+    xor=['matrix', 'fourxfour'],
     ),
     out_file=dict(argstr=' > %s',
     descr='File to write concattenated matvecs to',
Repository: nipy/nipype

Issue:
Modelgen SpecifyModel TypeError: apply_along_axis()
@effigies 
SpecifyModel rises an error with the new function from
commit cd49748be5d7a8201496548922d85f63bb4034dc

modelgen.py line 399ff

With numpy 1.8.2 I get
TypeError: apply_along_axis() got an unexpected keyword argument 'source'
Interface SpecifyModel failed to run

Joerg



Discussion:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.apply_along_axis.html
kwargs : any
    Additional named arguments to func1d.
    New in version 1.9.0.

nipype require  numpy >= 1.6.2 

I see. Thanks for finding this. I'll submit a PR to update the minimum numpy version.

Resolving patch:
diff --git a/nipype/info.py b/nipype/info.py
--- a/nipype/info.py
+++ b/nipype/info.py
@@ -98,7 +98,7 @@ def get_nipype_gitversion():
 # versions
 NIBABEL_MIN_VERSION = '2.1.0'
 NETWORKX_MIN_VERSION = '1.9'
-NUMPY_MIN_VERSION = '1.8.2'
+NUMPY_MIN_VERSION = '1.9.0'
 SCIPY_MIN_VERSION = '0.14'
 TRAITS_MIN_VERSION = '4.6'
 DATEUTIL_MIN_VERSION = '2.2'


Test patch:
Repository: nipy/nipype

Issue:
[Bug] Type error in afni's CenterMass
```Python
from nipype.interfaces import afni
a = afni.CenterMass()
a.inputs.in_file = 'anat.nii.gz'
a.inputs.cm_file = 'cm.txt'
a.run()
```
throws an error because single line file `cm.txt` is not loaded in an array of length one
```
TypeError: 'numpy.float64' object is not iterable
```


Discussion:

Resolving patch:
diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py
--- a/nipype/interfaces/afni/utils.py
+++ b/nipype/interfaces/afni/utils.py
@@ -694,10 +694,8 @@ class CenterMassOutputSpec(TraitedSpec):
         desc='output file')
     cm_file = File(
         desc='file with the center of mass coordinates')
-    cm = traits.Either(
+    cm = traits.List(
         traits.Tuple(traits.Float(), traits.Float(), traits.Float()),
-        traits.List(traits.Tuple(traits.Float(), traits.Float(),
-                                 traits.Float())),
         desc='center of mass')
 
 
@@ -734,11 +732,8 @@ def _list_outputs(self):
         outputs = super(CenterMass, self)._list_outputs()
         outputs['out_file'] = os.path.abspath(self.inputs.in_file)
         outputs['cm_file'] = os.path.abspath(self.inputs.cm_file)
-        sout = np.loadtxt(outputs['cm_file'])  # pylint: disable=E1101
-        if len(sout) > 1:
-            outputs['cm'] = [tuple(s) for s in sout]
-        else:
-            outputs['cm'] = tuple(sout)
+        sout = np.loadtxt(outputs['cm_file'], ndmin=2)  # pylint: disable=E1101
+        outputs['cm'] = [tuple(s) for s in sout]
         return outputs
 
 


Test patch:
Repository: nipy/nipype

Issue:
New terminal/log output is grammatically incorrect
### Summary

I just pulled github master and see that there's some new, more informative, node-level terminal output. However, it doesn't fully account for the subtleties of English:

### Actual behavior

e.g. `Running node "crop_image" (a "ApplyMask" interface)`

### Expected behavior

e.g. `Running node "crop_image" (an "ApplyMask" interface)`



Discussion:
perhaps we can be more programmatic and say: 

` Running node "crop_image" (interface nipype.interfaces.fsl.ApplyMask)`

this way we take out redundant interface names as well.
or simply:

`Running node "crop_image" (nipype.interfaces.fsl.ApplyMask)`
I think that would be fine.

Resolving patch:
diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py
--- a/nipype/pipeline/engine/nodes.py
+++ b/nipype/pipeline/engine/nodes.py
@@ -633,7 +633,7 @@ def _run_command(self, execute, copyfiles=True):
             if copyfiles:
                 self._copyfiles_to_wd(cwd, execute)
 
-            message = 'Running node "%s" (a "%s" interface)'
+            message = 'Running node "%s" ("%s.%s")'
             if issubclass(self._interface.__class__, CommandLine):
                 try:
                     cmd = self._interface.cmdline
@@ -644,7 +644,7 @@ def _run_command(self, execute, copyfiles=True):
                 with open(cmdfile, 'wt') as fd:
                     print(cmd + "\n", file=fd)
                 message += ', a CommandLine Interface with command:\n%s' % cmd
-            logger.info(message + '.', self.name,
+            logger.info(message + '.', self.name, self._interface.__module__,
                         self._interface.__class__.__name__)
             try:
                 result = self._interface.run()


Test patch:
Repository: nipy/nipype

Issue:
[BUG] MultiProc crashes are not correctly handled
### Summary
Since the latest refactor, MultiProc calls `self._report_crash` with a `traceback` argument and such function is not defined:

```
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/workflows.py", line 591, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/base.py", line 182, in run
self._send_procs_to_workers(updatehash=updatehash, graph=graph)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 250, in _send_procs_to_workers
self._report_crash(self.procs[jobid], traceback=traceback)
TypeError: _report_crash() got an unexpected keyword argument 'traceback'
```

I'll propose a fix today.


Discussion:

Resolving patch:
diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py
--- a/nipype/pipeline/plugins/multiproc.py
+++ b/nipype/pipeline/plugins/multiproc.py
@@ -238,8 +238,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
                     num_subnodes = self.procs[jobid].num_subnodes()
                 except Exception:
                     traceback = format_exception(*sys.exc_info())
-                    self._report_crash(self.procs[jobid], traceback=traceback)
-                    self._clean_queue(jobid, graph)
+                    self._clean_queue(
+                        jobid, graph,
+                        result={'result': None, 'traceback': traceback}
+                    )
                     self.proc_pending[jobid] = False
                     continue
                 if num_subnodes > 1:
@@ -275,10 +277,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
                 logger.debug('Running node %s on master thread',
                              self.procs[jobid])
                 try:
-                    self.procs[jobid].run()
+                    self.procs[jobid].run(updatehash=updatehash)
                 except Exception:
                     traceback = format_exception(*sys.exc_info())
-                    self._report_crash(self.procs[jobid], traceback=traceback)
+                    self._clean_queue(
+                        jobid, graph,
+                        result={'result': None, 'traceback': traceback}
+                    )
 
                 # Release resources
                 self._task_finished_cb(jobid)


Test patch:
Repository: nipy/nipype

Issue:
Environment canonicalization bugs
line 1346
for key, val in env:
I don't think this works, because you cannot iterate dict like this, you have to write like this ：
for key, val in env.items()     rights?

(Edit by @effigies):
From #2327:

> line 1350:
> val = key.encode('utf-8')
> ????  I think it should be:
> val = val.encode('utf-8')


Discussion:
Thanks for the reports. Collapsing into a single report with a descriptive title.

Resolving patch:
diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py
--- a/nipype/interfaces/base.py
+++ b/nipype/interfaces/base.py
@@ -1343,11 +1343,11 @@ def _canonicalize_env(env):
         return env
 
     out_env = {}
-    for key, val in env:
+    for key, val in env.items():
         if not isinstance(key, bytes):
             key = key.encode('utf-8')
         if not isinstance(val, bytes):
-            val = key.encode('utf-8')
+            val = val.encode('utf-8')
         out_env[key] = val
     return out_env
 


Test patch:
Repository: nipy/nipype

Issue:
FreeSurferSource doesn't check subjects_dir
### Summary
`FreeSurferSource` doesn't check `subjects_dir` is an existing path.

### How to replicate the behavior

```
from nipype.interfaces.io import FreeSurferSource
fs = FreeSurferSource()
fs.inputs.subjects_dir = 'path/to/no/existing/directory'
fs.inputs.subject_id = 'sub-01'
res = fs.run()
```

### Actual behavior
Doesn't give an error.

### Expected behavior
Should check if directory exists (and possibly if there are files for `subject_id` ?).




Discussion:
Seems reasonable to add `exists=True` to `subjects_dir`, but I'd think enforcing a valid subject ID would be more trouble than it's worth.

Resolving patch:
diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py
--- a/nipype/interfaces/io.py
+++ b/nipype/interfaces/io.py
@@ -1555,16 +1555,12 @@ def _list_outputs(self):
 
 
 class FSSourceInputSpec(BaseInterfaceInputSpec):
-    subjects_dir = Directory(
-        mandatory=True, desc='Freesurfer subjects directory.')
-    subject_id = Str(
-        mandatory=True, desc='Subject name for whom to retrieve data')
-    hemi = traits.Enum(
-        'both',
-        'lh',
-        'rh',
-        usedefault=True,
-        desc='Selects hemisphere specific outputs')
+    subjects_dir = Directory(exists=True, mandatory=True,
+                             desc='Freesurfer subjects directory.')
+    subject_id = Str(mandatory=True,
+                     desc='Subject name for whom to retrieve data')
+    hemi = traits.Enum('both', 'lh', 'rh', usedefault=True,
+                       desc='Selects hemisphere specific outputs')
 
 
 class FSSourceOutputSpec(TraitedSpec):


Test patch:
diff --git a/nipype/interfaces/tests/test_io.py b/nipype/interfaces/tests/test_io.py
--- a/nipype/interfaces/tests/test_io.py
+++ b/nipype/interfaces/tests/test_io.py
@@ -16,7 +16,7 @@
 import pytest
 import nipype
 import nipype.interfaces.io as nio
-from nipype.interfaces.base import Undefined
+from nipype.interfaces.base import Undefined, TraitError
 
 # Check for boto
 noboto = False
@@ -498,6 +498,12 @@ def test_freesurfersource():
     assert fss.inputs.subjects_dir == Undefined
 
 
+def test_freesurfersource_incorrectdir():
+    fss = nio.FreeSurferSource()
+    with pytest.raises(TraitError) as err:
+        fss.inputs.subjects_dir = 'path/to/no/existing/directory'
+
+
 def test_jsonsink_input():
 
     ds = nio.JSONFileSink()
Repository: nipy/nipype

Issue:
different error message from SPM interaces 
### Summary
#1949 introduced `ImageFileSPM` that gives a nice error message, when input file is `nii.gz`, but `Realign` gives still the old error message " the path  '/data/ds000114/sub-03/func/sub-03_task-fingerfootlips_bold.nii.gz' does not exist."

### How to replicate the behavior
Compare these two codes:

```
from nipype.interfaces.spm import Smooth
smooth = Smooth(in_files='/existing/file.nii.gz')
smooth.run()
```

and

```
from nipype.interfaces.spm import Realign
realign = Realign(in_files='/existing/file.nii.gz')
realign.run()
```

### Actual behavior
The first code gives a nice error:
`TraitError: /existing/file.nii.gz is not included in allowed types: .img, .nii, .hdr`
the second gives:
`TraitError: Each element of the 'in_files' trait of a RealignInputSpec instance must be a list of items which are an existing file name or an existing file name, but a value of '/existing/file.nii.gz' <class 'str'> was specified.`

### Expected behavior

Both examples should give the same error.



Discussion:
[`spm.RealignInputSpec.in_files`](https://github.com/nipy/nipype/blob/master/nipype/interfaces/spm/preprocess.py#L122) is using way too many trait calls - it should really just be simplified similar to [`spm.SmoothInputSpec.in_files`](https://github.com/nipy/nipype/blob/master/nipype/interfaces/spm/preprocess.py#L1100)

```
InputMultiPath(ImageFileSPM(exists=True), ...
```

Resolving patch:
diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py
--- a/nipype/interfaces/spm/preprocess.py
+++ b/nipype/interfaces/spm/preprocess.py
@@ -125,8 +125,7 @@ def _list_outputs(self):
 
 class RealignInputSpec(SPMCommandInputSpec):
     in_files = InputMultiPath(
-        traits.Either(
-            traits.List(ImageFileSPM(exists=True)), ImageFileSPM(exists=True)),
+        ImageFileSPM(exists=True),
         field='data',
         mandatory=True,
         copyfile=True,


Test patch:
Repository: nipy/nipype

Issue:
ICC: Cannot set the undefined 'sessions_F_map' attribute of a 'ICCOutputSpec' object
### Summary

Trying to run ICC raises a `TraitError` with the following description: "TraitError: Cannot set the undefined 'sessions_F_map' attribute of a 'ICCOutputSpec' object."
I may be doing things wrong, in which case a more informative error message would be welcome. Please look at the code snippet under _Script/Workflow Details_.

_Note:_ I do get maps (icc_map.nii, session_var_map.nii, subject_var_map.nii) as an output in my `os.getcwd()`.

### Actual behavior
ICC triggers an exception.

### Expected behavior
ICC runs smoothly.

### How to replicate the behavior
```bash
mkdir /Users/user/test
mv mask.nii.gz sub-{01,02}_ses-{01,02}.nii.gz /Users/user/test
# Where these niftis are sensible "ICC compatible" files
# And now run code pasted below
```
### Script/Workflow details

Please put URL to code or code here (if not too long).
```python
import os.path
from nipype.algorithms import icc

project_dir = '/Users/user/test/'

def fname(sub, ses):
    return os.path.join(project_dir, f'sub-{sub}_ses-{ses}.nii.gz')

lst = [[fname(1, 1), fname(1, 2)], 
       [fname(2, 1), fname(2, 2)]]
mask = os.path.join(project_dir, 'mask.nii.gz')

x = icc.ICC(subjects_sessions=lst, mask=mask)
x.run()
```

### Platform details:

Please paste the output of: `python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"`

```python
{'commit_hash': '%h',
 'commit_source': 'archive substitution',
 'networkx_version': '2.0',
 'nibabel_version': '2.2.1',
 'nipype_version': '1.0.0',
 'numpy_version': '1.13.3',
 'pkg_path': '/Users/user/anaconda3/lib/python3.6/site-packages/nipype',
 'scipy_version': '1.0.0',
 'sys_executable': '/Users/user/anaconda3/bin/python',
 'sys_platform': 'darwin',
 'sys_version': '3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]',
 'traits_version': '4.6.0'}

```

### Execution environment

Choose one
- My python environment outside container



Discussion:

Resolving patch:
diff --git a/nipype/algorithms/icc.py b/nipype/algorithms/icc.py
--- a/nipype/algorithms/icc.py
+++ b/nipype/algorithms/icc.py
@@ -80,7 +80,6 @@ def _run_interface(self, runtime):
     def _list_outputs(self):
         outputs = self._outputs().get()
         outputs['icc_map'] = os.path.abspath('icc_map.nii')
-        outputs['sessions_F_map'] = os.path.abspath('sessions_F_map.nii')
         outputs['session_var_map'] = os.path.abspath('session_var_map.nii')
         outputs['subject_var_map'] = os.path.abspath('subject_var_map.nii')
         return outputs


Test patch:
Repository: nipy/nipype

Issue:
Mrtrix3 `dwi2response` - bad algorithm argument position
### Summary

Th Mrtrix3 `dwi2response` CL wrapper generates the following runtime error:
```shell
dwi2response:
mrinfo: [ERROR] no diffusion encoding information found in image "<DWI_FILE>"
dwi2response: [ERROR] Script requires diffusion gradient table: either in image header, or using -grad / -fslgrad option
```
It turns out that the command generated by `nipype` does not respect (my version of) the Mrtrix3 CL format.

### Actual behavior

Generated command (not runnable):
```shell
dwi2response -fslgrad <BVEC_FILE> <BVAL_FILE> -mask <MASK_FILE> tournier <WM_FILE>
```

### Expected behavior

Runnable command:
```shell
dwi2response tournier -fslgrad <BVEC_FILE> <BVAL_FILE> -mask <MASK_FILE> <WM_FILE>
```

### Environment

- `MRtrix 3.0_RC2-117-gf098f097    dwi2response     bin version: 3.0_RC2-117-gf098f097`
- `Python 2.7.12`
- `nipype v1.0.0`
 

### Quick and dirty solution

I'm really not sure how clean it is, but it worked for me; in the `ResponseSDInputSpec` class, I changed `position=-6` to `position=1` in the `algorithm` traits.




Discussion:
@jguillon yeah - looks like if any of the inherited inputs:
https://github.com/nipy/nipype/blob/2c35800c5609c7e85bb0bc15e250adc8719effaf/nipype/interfaces/mrtrix3/base.py#L28-L50
are defined, the position of `algorithm` is shifted - would you mind submitting a PR with this fix?

Resolving patch:
diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py
--- a/nipype/interfaces/mrtrix3/preprocess.py
+++ b/nipype/interfaces/mrtrix3/preprocess.py
@@ -27,7 +27,7 @@ class ResponseSDInputSpec(MRTrix3BaseInputSpec):
         'tournier',
         'tax',
         argstr='%s',
-        position=-6,
+        position=1,
         mandatory=True,
         desc='response estimation algorithm (multi-tissue)')
     in_file = File(
@@ -74,7 +74,7 @@ class ResponseSD(MRTrix3Base):
     >>> resp.inputs.algorithm = 'tournier'
     >>> resp.inputs.grad_fsl = ('bvecs', 'bvals')
     >>> resp.cmdline                               # doctest: +ELLIPSIS
-    'dwi2response -fslgrad bvecs bvals tournier dwi.mif wm.txt'
+    'dwi2response tournier -fslgrad bvecs bvals dwi.mif wm.txt'
     >>> resp.run()                                 # doctest: +SKIP
     """
 


Test patch:
diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py
--- a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py
+++ b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py
@@ -8,7 +8,7 @@ def test_ResponseSD_inputs():
         algorithm=dict(
             argstr='%s',
             mandatory=True,
-            position=-6,
+            position=1,
         ),
         args=dict(argstr='%s', ),
         bval_scale=dict(argstr='-bvalue_scaling %s', ),
Repository: nipy/nipype

Issue:
NiftyReg's RegTools is missing interpolation order argument



Discussion:

Resolving patch:
diff --git a/nipype/interfaces/niftyreg/regutils.py b/nipype/interfaces/niftyreg/regutils.py
--- a/nipype/interfaces/niftyreg/regutils.py
+++ b/nipype/interfaces/niftyreg/regutils.py
@@ -122,7 +122,7 @@ class RegResample(NiftyRegCommand):
     # Need this overload to properly constraint the interpolation type input
     def _format_arg(self, name, spec, value):
         if name == 'inter_val':
-            inter_val = {'NN': 0, 'LIN': 1, 'CUB': 3, 'SINC': 5}
+            inter_val = {'NN': 0, 'LIN': 1, 'CUB': 3, 'SINC': 4}
             return spec.argstr % inter_val[value]
         else:
             return super(RegResample, self)._format_arg(name, spec, value)
@@ -295,6 +295,15 @@ class RegToolsInputSpec(NiftyRegCommandInputSpec):
         desc=desc,
         argstr='-smoG %f %f %f')
 
+    # Interpolation type
+    inter_val = traits.Enum(
+        'NN',
+        'LIN',
+        'CUB',
+        'SINC',
+        desc='Interpolation order to use to warp the floating image',
+        argstr='-interp %d')
+
 
 class RegToolsOutputSpec(TraitedSpec):
     """ Output Spec for RegTools. """
@@ -326,6 +335,14 @@ class RegTools(NiftyRegCommand):
     output_spec = RegToolsOutputSpec
     _suffix = '_tools'
 
+    # Need this overload to properly constraint the interpolation type input
+    def _format_arg(self, name, spec, value):
+        if name == 'inter_val':
+            inter_val = {'NN': 0, 'LIN': 1, 'CUB': 3, 'SINC': 4}
+            return spec.argstr % inter_val[value]
+        else:
+            return super(RegTools, self)._format_arg(name, spec, value)
+
 
 class RegAverageInputSpec(NiftyRegCommandInputSpec):
     """ Input Spec for RegAverage. """


Test patch:
diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py b/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py
--- a/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py
+++ b/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py
@@ -24,6 +24,7 @@ def test_RegTools_inputs():
             argstr='-in %s',
             mandatory=True,
         ),
+        inter_val=dict(argstr='-interp %d', ),
         iso_flag=dict(argstr='-iso', ),
         mask_file=dict(argstr='-nan %s', ),
         mul_val=dict(argstr='-mul %s', ),