Skip to content

Commit 07143af

Browse files
committed
Merge pull request #824 from satra/fix/misc
Fix/misc
2 parents abca88a + dcb4a04 commit 07143af

12 files changed

+94
-43
lines changed

nipype/interfaces/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ def _get_trait_desc(self, inputs, name, spec):
731731
desc = spec.desc
732732
xor = spec.xor
733733
requires = spec.requires
734+
argstr = spec.argstr
734735

735736
manhelpstr = ['\t%s' % name]
736737

@@ -753,6 +754,17 @@ def _get_trait_desc(self, inputs, name, spec):
753754
initial_indent='\t\t',
754755
subsequent_indent='\t\t')
755756

757+
if argstr:
758+
pos = spec.position
759+
if pos is not None:
760+
manhelpstr += wrap('flag: %s, position: %s' % (argstr, pos), 70,
761+
initial_indent='\t\t',
762+
subsequent_indent='\t\t')
763+
else:
764+
manhelpstr += wrap('flag: %s' % argstr, 70,
765+
initial_indent='\t\t',
766+
subsequent_indent='\t\t')
767+
756768
if xor:
757769
line = '%s' % ', '.join(xor)
758770
manhelpstr += wrap(line, 70,

nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ def test_ProcStreamlines_inputs():
5656
position=-1,
5757
),
5858
outputacm=dict(argstr='-outputacm',
59+
requires=['outputroot', 'seedfile'],
5960
),
6061
outputcbs=dict(argstr='-outputcbs',
62+
requires=['outputroot', 'targetfile', 'seedfile'],
6163
),
6264
outputcp=dict(argstr='-outputcp',
65+
requires=['outputroot', 'seedfile'],
6366
),
6467
outputroot=dict(argstr='-outputroot %s',
6568
),
6669
outputsc=dict(argstr='-outputsc',
70+
requires=['outputroot', 'seedfile'],
6771
),
6872
outputtracts=dict(argstr='-outputtracts',
6973
),
@@ -103,7 +107,8 @@ def test_ProcStreamlines_inputs():
103107
yield assert_equal, getattr(inputs.traits()[key], metakey), value
104108

105109
def test_ProcStreamlines_outputs():
106-
output_map = dict(proc=dict(),
110+
output_map = dict(outputroot_files=dict(),
111+
proc=dict(),
107112
)
108113
outputs = ProcStreamlines.output_spec()
109114

nipype/interfaces/fsl/tests/test_auto_DTIFit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_DTIFit_inputs():
1717
mandatory=True,
1818
position=3,
1919
),
20-
cni=dict(argstr='-cni %s',
20+
cni=dict(argstr='--cni=%s',
2121
),
2222
dwi=dict(argstr='-k %s',
2323
mandatory=True,

nipype/interfaces/fsl/tests/test_auto_Eddy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ def test_Eddy_inputs():
3333
in_mask=dict(argstr='--mask=%s',
3434
mandatory=True,
3535
),
36-
in_topup=dict(argstr='--topup=%s',
36+
in_topup_fieldcoef=dict(argstr='--topup=%s',
37+
copyfile=False,
38+
requires=['in_topup_movpar'],
39+
),
40+
in_topup_movpar=dict(copyfile=False,
41+
requires=['in_topup_fieldcoef'],
3742
),
3843
method=dict(argstr='--resamp=%s',
3944
),

nipype/interfaces/fsl/tests/test_auto_FIRST.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_FIRST_inputs():
1818
usedefault=True,
1919
),
2020
in_file=dict(argstr='-i %s',
21+
copyfile=False,
2122
mandatory=True,
2223
position=-2,
2324
),

nipype/interfaces/fsl/tests/test_auto_MELODIC.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_MELODIC_inputs():
3232
in_files=dict(argstr='-i %s',
3333
mandatory=True,
3434
position=0,
35+
sep=',',
3536
),
3637
log_power=dict(argstr='--logPower',
3738
),

nipype/interfaces/fsl/tests/test_auto_XFibres.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def test_XFibres_inputs():
2929
),
3030
fudge=dict(argstr='--fudge=%d',
3131
),
32+
gradnonlin=dict(argstr='--gradnonlin=%s',
33+
),
3234
ignore_exception=dict(nohash=True,
3335
usedefault=True,
3436
),

nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ def test_DiffusionTensorStreamlineTrack_inputs():
1616
usedefault=True,
1717
),
1818
exclude_file=dict(argstr='-exclude %s',
19-
position=2,
19+
xor=['exclude_file', 'exclude_spec'],
2020
),
21-
exclude_spec=dict(argstr='-seed %s',
21+
exclude_spec=dict(argstr='-exclude %s',
2222
position=2,
2323
sep=',',
2424
units='mm',
25+
xor=['exclude_file', 'exclude_spec'],
2526
),
2627
gradient_encoding_file=dict(argstr='-grad %s',
2728
mandatory=True,
@@ -35,12 +36,13 @@ def test_DiffusionTensorStreamlineTrack_inputs():
3536
position=-2,
3637
),
3738
include_file=dict(argstr='-include %s',
38-
position=2,
39+
xor=['include_file', 'include_spec'],
3940
),
40-
include_spec=dict(argstr='-seed %s',
41+
include_spec=dict(argstr='-include %s',
4142
position=2,
4243
sep=',',
4344
units='mm',
45+
xor=['include_file', 'include_spec'],
4446
),
4547
initial_cutoff_value=dict(argstr='-initcutoff %s',
4648
units='NA',
@@ -52,13 +54,14 @@ def test_DiffusionTensorStreamlineTrack_inputs():
5254
position=-3,
5355
usedefault=True,
5456
),
55-
mask_file=dict(argstr='-exclude %s',
56-
position=2,
57+
mask_file=dict(argstr='-mask %s',
58+
xor=['mask_file', 'mask_spec'],
5759
),
58-
mask_spec=dict(argstr='-seed %s',
60+
mask_spec=dict(argstr='-mask %s',
5961
position=2,
6062
sep=',',
6163
units='mm',
64+
xor=['mask_file', 'mask_spec'],
6265
),
6366
maximum_number_of_tracks=dict(argstr='-maxnum %d',
6467
),
@@ -74,21 +77,24 @@ def test_DiffusionTensorStreamlineTrack_inputs():
7477
no_mask_interpolation=dict(argstr='-nomaskinterp',
7578
),
7679
out_file=dict(argstr='%s',
77-
genfile=True,
80+
name_source=['in_file'],
81+
name_template='%s_tracked.tck',
82+
output_name='tracked.tck',
7883
position=-1,
7984
),
8085
seed_file=dict(argstr='-seed %s',
81-
position=2,
86+
xor=['seed_file', 'seed_spec'],
8287
),
8388
seed_spec=dict(argstr='-seed %s',
8489
position=2,
8590
sep=',',
8691
units='mm',
92+
xor=['seed_file', 'seed_spec'],
8793
),
8894
step_size=dict(argstr='-step %s',
8995
units='mm',
9096
),
91-
stop=dict(argstr='-gzip',
97+
stop=dict(argstr='-stop',
9298
),
9399
terminal_output=dict(mandatory=True,
94100
nohash=True,

nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ def test_ProbabilisticSphericallyDeconvolutedStreamlineTrack_inputs():
1616
usedefault=True,
1717
),
1818
exclude_file=dict(argstr='-exclude %s',
19-
position=2,
19+
xor=['exclude_file', 'exclude_spec'],
2020
),
21-
exclude_spec=dict(argstr='-seed %s',
21+
exclude_spec=dict(argstr='-exclude %s',
2222
position=2,
2323
sep=',',
2424
units='mm',
25+
xor=['exclude_file', 'exclude_spec'],
2526
),
2627
ignore_exception=dict(nohash=True,
2728
usedefault=True,
@@ -31,12 +32,13 @@ def test_ProbabilisticSphericallyDeconvolutedStreamlineTrack_inputs():
3132
position=-2,
3233
),
3334
include_file=dict(argstr='-include %s',
34-
position=2,
35+
xor=['include_file', 'include_spec'],
3536
),
36-
include_spec=dict(argstr='-seed %s',
37+
include_spec=dict(argstr='-include %s',
3738
position=2,
3839
sep=',',
3940
units='mm',
41+
xor=['include_file', 'include_spec'],
4042
),
4143
initial_cutoff_value=dict(argstr='-initcutoff %s',
4244
units='NA',
@@ -48,13 +50,14 @@ def test_ProbabilisticSphericallyDeconvolutedStreamlineTrack_inputs():
4850
position=-3,
4951
usedefault=True,
5052
),
51-
mask_file=dict(argstr='-exclude %s',
52-
position=2,
53+
mask_file=dict(argstr='-mask %s',
54+
xor=['mask_file', 'mask_spec'],
5355
),
54-
mask_spec=dict(argstr='-seed %s',
56+
mask_spec=dict(argstr='-mask %s',
5557
position=2,
5658
sep=',',
5759
units='mm',
60+
xor=['mask_file', 'mask_spec'],
5861
),
5962
maximum_number_of_tracks=dict(argstr='-maxnum %d',
6063
),
@@ -72,21 +75,24 @@ def test_ProbabilisticSphericallyDeconvolutedStreamlineTrack_inputs():
7275
no_mask_interpolation=dict(argstr='-nomaskinterp',
7376
),
7477
out_file=dict(argstr='%s',
75-
genfile=True,
78+
name_source=['in_file'],
79+
name_template='%s_tracked.tck',
80+
output_name='tracked.tck',
7681
position=-1,
7782
),
7883
seed_file=dict(argstr='-seed %s',
79-
position=2,
84+
xor=['seed_file', 'seed_spec'],
8085
),
8186
seed_spec=dict(argstr='-seed %s',
8287
position=2,
8388
sep=',',
8489
units='mm',
90+
xor=['seed_file', 'seed_spec'],
8591
),
8692
step_size=dict(argstr='-step %s',
8793
units='mm',
8894
),
89-
stop=dict(argstr='-gzip',
95+
stop=dict(argstr='-stop',
9096
),
9197
terminal_output=dict(mandatory=True,
9298
nohash=True,

nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ def test_SphericallyDeconvolutedStreamlineTrack_inputs():
1616
usedefault=True,
1717
),
1818
exclude_file=dict(argstr='-exclude %s',
19-
position=2,
19+
xor=['exclude_file', 'exclude_spec'],
2020
),
21-
exclude_spec=dict(argstr='-seed %s',
21+
exclude_spec=dict(argstr='-exclude %s',
2222
position=2,
2323
sep=',',
2424
units='mm',
25+
xor=['exclude_file', 'exclude_spec'],
2526
),
2627
ignore_exception=dict(nohash=True,
2728
usedefault=True,
@@ -31,12 +32,13 @@ def test_SphericallyDeconvolutedStreamlineTrack_inputs():
3132
position=-2,
3233
),
3334
include_file=dict(argstr='-include %s',
34-
position=2,
35+
xor=['include_file', 'include_spec'],
3536
),
36-
include_spec=dict(argstr='-seed %s',
37+
include_spec=dict(argstr='-include %s',
3738
position=2,
3839
sep=',',
3940
units='mm',
41+
xor=['include_file', 'include_spec'],
4042
),
4143
initial_cutoff_value=dict(argstr='-initcutoff %s',
4244
units='NA',
@@ -48,13 +50,14 @@ def test_SphericallyDeconvolutedStreamlineTrack_inputs():
4850
position=-3,
4951
usedefault=True,
5052
),
51-
mask_file=dict(argstr='-exclude %s',
52-
position=2,
53+
mask_file=dict(argstr='-mask %s',
54+
xor=['mask_file', 'mask_spec'],
5355
),
54-
mask_spec=dict(argstr='-seed %s',
56+
mask_spec=dict(argstr='-mask %s',
5557
position=2,
5658
sep=',',
5759
units='mm',
60+
xor=['mask_file', 'mask_spec'],
5861
),
5962
maximum_number_of_tracks=dict(argstr='-maxnum %d',
6063
),
@@ -70,21 +73,24 @@ def test_SphericallyDeconvolutedStreamlineTrack_inputs():
7073
no_mask_interpolation=dict(argstr='-nomaskinterp',
7174
),
7275
out_file=dict(argstr='%s',
73-
genfile=True,
76+
name_source=['in_file'],
77+
name_template='%s_tracked.tck',
78+
output_name='tracked.tck',
7479
position=-1,
7580
),
7681
seed_file=dict(argstr='-seed %s',
77-
position=2,
82+
xor=['seed_file', 'seed_spec'],
7883
),
7984
seed_spec=dict(argstr='-seed %s',
8085
position=2,
8186
sep=',',
8287
units='mm',
88+
xor=['seed_file', 'seed_spec'],
8389
),
8490
step_size=dict(argstr='-step %s',
8591
units='mm',
8692
),
87-
stop=dict(argstr='-gzip',
93+
stop=dict(argstr='-stop',
8894
),
8995
terminal_output=dict(mandatory=True,
9096
nohash=True,

0 commit comments

Comments
 (0)