Skip to content

Commit cae5b4b

Browse files
committed
Merge pull request #1133 from nipy/master
Update to master
2 parents c425a35 + a10080b commit cae5b4b

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Next release
5656
* FIX: Add QA output for TSNR to resting workflow (https://github.com/nipy/nipype/pull/1088)
5757
* FIX: Change N4BiasFieldCorrection to use short tag for dimensionality (backward compatible) (https://github.com/nipy/nipype/pull/1096)
5858
* ENH: Added -newgrid input to Warp in AFNI (3dWarp wrapper) (https://github.com/nipy/nipype/pull/1128)
59+
* FIX: Fixed AFNI Copy interface to use positional inputs as required (https://github.com/nipy/nipype/pull/1131)
5960

6061
Release 0.10.0 (October 10, 2014)
6162
============

nipype/interfaces/afni/preprocess.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ class CopyInputSpec(AFNICommandInputSpec):
676676
exists=True,
677677
copyfile=False)
678678
out_file = File(name_template="%s_copy", desc='output image file name',
679-
argstr='-prefix %s', name_source="in_file")
679+
argstr='%s', position=-1, name_source="in_file")
680680

681681

682682
class Copy(AFNICommand):
@@ -690,11 +690,26 @@ class Copy(AFNICommand):
690690
========
691691
692692
>>> from nipype.interfaces import afni as afni
693-
>>> copy = afni.Copy()
694-
>>> copy.inputs.in_file = 'functional.nii'
695-
>>> copy.inputs.out_file = 'new_func.nii'
696-
>>> res = copy.run() # doctest: +SKIP
697-
693+
>>> copy3d = afni.Copy()
694+
>>> copy3d.inputs.in_file = 'functional.nii'
695+
>>> copy3d.cmdline
696+
'3dcopy functional.nii functional_copy'
697+
698+
>>> from copy import deepcopy
699+
>>> copy3d_2 = deepcopy(copy3d)
700+
>>> copy3d_2.inputs.outputtype = 'NIFTI'
701+
>>> copy3d_2.cmdline
702+
'3dcopy functional.nii functional_copy.nii'
703+
704+
>>> copy3d_3 = deepcopy(copy3d)
705+
>>> copy3d_3.inputs.outputtype = 'NIFTI_GZ'
706+
>>> copy3d_3.cmdline
707+
'3dcopy functional.nii functional_copy.nii.gz'
708+
709+
>>> copy3d_4 = deepcopy(copy3d)
710+
>>> copy3d_4.inputs.out_file = 'new_func.nii'
711+
>>> copy3d_4.cmdline
712+
'3dcopy functional.nii new_func.nii'
698713
"""
699714

700715
_cmd = '3dcopy'

nipype/interfaces/afni/tests/test_auto_Copy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ def test_Copy_inputs():
1616
mandatory=True,
1717
position=-2,
1818
),
19-
out_file=dict(argstr='-prefix %s',
19+
out_file=dict(argstr='%s',
2020
name_source='in_file',
2121
name_template='%s_copy',
22+
position=-1,
2223
),
2324
outputtype=dict(),
2425
terminal_output=dict(nohash=True,

0 commit comments

Comments
 (0)