@@ -218,7 +218,9 @@ class AllineateInputSpec(AFNICommandInputSpec):
218218 out_file = File (
219219 desc = 'output file from 3dAllineate' ,
220220 argstr = '-prefix %s' ,
221- genfile = True ,
221+ name_template = '%s_allineate' ,
222+ name_source = 'in_file' ,
223+ hash_files = False ,
222224 xor = ['allcostx' ])
223225 out_param_file = File (
224226 argstr = '-1Dparam_save %s' ,
@@ -424,11 +426,11 @@ class AllineateInputSpec(AFNICommandInputSpec):
424426 _dirs = ['X' , 'Y' , 'Z' , 'I' , 'J' , 'K' ]
425427 nwarp_fixmot = traits .List (
426428 traits .Enum (* _dirs ),
427- argstr = '-nwarp_fixmot%s' ,
429+ argstr = '-nwarp_fixmot%s... ' ,
428430 desc = 'To fix motion along directions.' )
429431 nwarp_fixdep = traits .List (
430432 traits .Enum (* _dirs ),
431- argstr = '-nwarp_fixdep%s' ,
433+ argstr = '-nwarp_fixdep%s... ' ,
432434 desc = 'To fix non-linear warp dependency along directions.' )
433435 verbose = traits .Bool (
434436 argstr = '-verb' , desc = 'Print out verbose progress reports.' )
@@ -465,31 +467,29 @@ class Allineate(AFNICommand):
465467 '3dAllineate -source functional.nii -prefix functional_allineate.nii -1Dmatrix_apply cmatrix.mat'
466468 >>> res = allineate.run() # doctest: +SKIP
467469
468- >>> from nipype.interfaces import afni
469470 >>> allineate = afni.Allineate()
470471 >>> allineate.inputs.in_file = 'functional.nii'
471472 >>> allineate.inputs.reference = 'structural.nii'
472473 >>> allineate.inputs.allcostx = 'out.allcostX.txt'
473474 >>> allineate.cmdline
474475 '3dAllineate -source functional.nii -base structural.nii -allcostx |& tee out.allcostX.txt'
475476 >>> res = allineate.run() # doctest: +SKIP
477+
478+ >>> allineate = afni.Allineate()
479+ >>> allineate.inputs.in_file = 'functional.nii'
480+ >>> allineate.inputs.reference = 'structural.nii'
481+ >>> allineate.inputs.nwarp_fixmot = ['X', 'Y']
482+ >>> allineate.cmdline
483+ '3dAllineate -source functional.nii -nwarp_fixmotX -nwarp_fixmotY -prefix functional_allineate -base structural.nii'
484+ >>> res = allineate.run() # doctest: +SKIP
476485 """
477486
478487 _cmd = '3dAllineate'
479488 input_spec = AllineateInputSpec
480489 output_spec = AllineateOutputSpec
481490
482- def _format_arg (self , name , trait_spec , value ):
483- if name == 'nwarp_fixmot' or name == 'nwarp_fixdep' :
484- arg = ' ' .join ([trait_spec .argstr % v for v in value ])
485- return arg
486- return super (Allineate , self )._format_arg (name , trait_spec , value )
487-
488491 def _list_outputs (self ):
489- outputs = self .output_spec ().get ()
490-
491- if self .inputs .out_file :
492- outputs ['out_file' ] = op .abspath (self .inputs .out_file )
492+ outputs = super (Allineate , self )._list_outputs ()
493493
494494 if self .inputs .out_weight_file :
495495 outputs ['out_weight_file' ] = op .abspath (
@@ -512,16 +512,10 @@ def _list_outputs(self):
512512 outputs ['out_param_file' ] = op .abspath (
513513 self .inputs .out_param_file )
514514
515- if isdefined (self .inputs .allcostx ):
516- outputs ['allcostX' ] = os .path .abspath (
517- os .path .join (os .getcwd (), self .inputs .allcostx ))
515+ if self .inputs .allcostx :
516+ outputs ['allcostX' ] = os .path .abspath (self .inputs .allcostx )
518517 return outputs
519518
520- def _gen_filename (self , name ):
521- if name == 'out_file' :
522- return self ._list_outputs ()[name ]
523- return None
524-
525519
526520class AutoTcorrelateInputSpec (AFNICommandInputSpec ):
527521 in_file = File (
@@ -2510,7 +2504,7 @@ class TProjectInputSpec(AFNICommandInputSpec):
25102504 rather than the value stored in the dataset header.""" ,
25112505 argstr = '-TR %g' )
25122506 mask = File (
2513- exist = True ,
2507+ exists = True ,
25142508 desc = """Only operate on voxels nonzero in the mset dataset.
25152509 ++ Voxels outside the mask will be filled with zeros.
25162510 ++ If no masking option is given, then all voxels
0 commit comments