Skip to content

Commit ec84dbe

Browse files
committed
Merge pull request #940 from satra/fix/misc
Fix/misc
2 parents 9ce39c6 + e3df0e1 commit ec84dbe

File tree

11 files changed

+122
-73
lines changed

11 files changed

+122
-73
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'numpy_ext.numpydoc',
4040
'matplotlib.sphinxext.plot_directive',
4141
'matplotlib.sphinxext.only_directives',
42-
'matplotlib.sphinxext.ipython_directive',
42+
'IPython.sphinxext.ipython_directive',
4343
'ipython_console_highlighting'
4444
]
4545

nipype/algorithms/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,8 +1164,8 @@ def normalize_tpms(in_files, in_mask=None, out_files=[]):
11641164

11651165
return out_files
11661166

1167+
# Deprecated interfaces ------------------------------------------------------
11671168

1168-
# Deprecated interfaces ---------------------------------------------------------
11691169
class Distance(nam.Distance):
11701170
"""Calculates distance between two volumes.
11711171

nipype/algorithms/tests/test_auto_Overlap.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

nipype/interfaces/afni/preprocess.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ def _overload_extension(self, value):
19351935

19361936
def _gen_filename(self, name):
19371937
return os.path.abspath(super(AFNItoNIFTI, self)._gen_filename(name))
1938-
1938+
19391939
class EvalInputSpec(AFNICommandInputSpec):
19401940
in_file_a = File(desc='input file to 1deval',
19411941
argstr='-a %s', position=0, mandatory=True, exists=True)
@@ -1955,15 +1955,15 @@ class EvalInputSpec(AFNICommandInputSpec):
19551955
requires=['start_idx'])
19561956
single_idx = traits.Int(desc='volume index for in_file_a')
19571957
other = File(desc='other options', argstr='')
1958-
1958+
19591959
class Eval(AFNICommand):
19601960
"""Evaluates an expression that may include columns of data from one or more text files
19611961
19621962
see AFNI Documentation: <http://afni.nimh.nih.gov/pub/dist/doc/program_help/1deval.html>
1963-
1963+
19641964
Examples
19651965
========
1966-
1966+
19671967
>>> from nipype.interfaces import afni as afni
19681968
>>> eval = afni.Eval()
19691969
>>> eval.inputs.in_file_a = 'seed.1D'
@@ -1996,7 +1996,7 @@ def _parse_inputs(self, skip=None):
19961996
"""
19971997
return super(Eval, self)._parse_inputs(
19981998
skip=('start_idx', 'stop_idx', 'out1D', 'other'))
1999-
1999+
20002000
class MeansInputSpec(AFNICommandInputSpec):
20012001
in_file_a = File(desc='input file to 3dMean',
20022002
argstr='%s',

nipype/interfaces/afni/svm.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@
2424

2525
warn = warnings.warn
2626
warnings.filterwarnings('always', category=UserWarning)
27-
27+
2828
class SVMTrainInputSpec(AFNICommandInputSpec):
2929
#training options
30-
ttype = traits.Str(desc='tname: classification or regression',
30+
ttype = traits.Str(desc='tname: classification or regression',
3131
argstr='-type %s',
3232
mandatory=True)
3333
in_file = File(desc='A 3D+t AFNI brik dataset to be used for training.',
3434
argstr='-trainvol %s',
3535
mandatory=True,
3636
exists=True,
3737
copyfile=False)
38-
out_file = File(name_template="%s_vectors",
38+
out_file = File(name_template="%s_vectors",
3939
desc='output sum of weighted linear support vectors file name',
4040
argstr='-bucket %s',
41-
suffix='_bucket',
41+
suffix='_bucket',
4242
name_source="in_file")
4343
model = File(name_template="%s_model",
4444
desc='basename for the brik containing the SVM model',
4545
argstr='-model %s',
46-
suffix='_model',
47-
name_source="in_file")
48-
alphas = File(name_template="%s_alphas",
46+
suffix='_model',
47+
name_source="in_file")
48+
alphas = File(name_template="%s_alphas",
4949
desc='output alphas file name',
5050
argstr='-alpha %s',
5151
suffix='_alphas',
@@ -62,20 +62,20 @@ class SVMTrainInputSpec(AFNICommandInputSpec):
6262
exists=True)
6363
censor = File(desc='.1D censor file that allows the user to ignore certain samples in the training data.',
6464
argstr='-censor %s',
65-
exists=True)
65+
exists=True)
6666
kernel = traits.Str(desc='string specifying type of kernel function:linear, polynomial, rbf, sigmoid',
6767
argstr='-kernel %s')
6868
max_iterations = traits.Int(desc='Specify the maximum number of iterations for the optimization.',
6969
argstr='-max_iterations %d')
7070
w_out = traits.Bool(desc='output sum of weighted linear support vectors',
7171
argstr='-wout')
7272
options = traits.Str(desc='additional options for SVM-light', argstr='%s')
73-
73+
7474
class SVMTrainOutputSpec(TraitedSpec):
7575
out_file = File(desc='sum of weighted linear support vectors file name')
7676
model = File(desc='brik containing the SVM model file name')
7777
alphas = File(desc='output alphas file name')
78-
78+
7979
class SVMTrain(AFNICommand):
8080
"""Temporally predictive modeling with the support vector machine
8181
SVM Train Only
@@ -109,7 +109,6 @@ class SVMTestInputSpec(AFNICommandInputSpec):
109109
#testing options
110110
model = traits.Str(desc='modname is the basename for the brik containing the SVM model',
111111
argstr='-model %s',
112-
exists=True,
113112
mandatory=True)
114113
in_file = File(desc='A 3D or 3D+t AFNI brik dataset to be used for testing.',
115114
argstr='-testvol %s',
@@ -130,7 +129,7 @@ class SVMTestInputSpec(AFNICommandInputSpec):
130129
multiclass = traits.Bool(desc='Specifies multiclass algorithm for classification',
131130
argstr='-multiclass %s')
132131
options = traits.Str(desc='additional options for SVM-light', argstr='%s')
133-
132+
134133
class SVMTest(AFNICommand):
135134
"""Temporally predictive modeling with the support vector machine
136135
SVM Test Only

nipype/interfaces/afni/tests/test_auto_SVMTest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def test_SVMTest_inputs():
1717
mandatory=True,
1818
),
1919
model=dict(argstr='-model %s',
20-
exists=True,
2120
mandatory=True,
2221
),
2322
multiclass=dict(argstr='-multiclass %s',
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.ants.segmentation import antsCorticalThickness
4+
5+
def test_antsCorticalThickness_inputs():
6+
input_map = dict(anatomical_image=dict(argstr='-a %s',
7+
mandatory=True,
8+
),
9+
args=dict(argstr='%s',
10+
),
11+
b_spline_smoothing=dict(argstr='-v',
12+
),
13+
brain_probability_mask=dict(argstr='-m %s',
14+
copyfile=False,
15+
mandatory=True,
16+
),
17+
brain_template=dict(argstr='-e %s',
18+
mandatory=True,
19+
),
20+
cortical_label_image=dict(),
21+
debug=dict(argstr='-z 1',
22+
),
23+
dimension=dict(argstr='-d %d',
24+
usedefault=True,
25+
),
26+
environ=dict(nohash=True,
27+
usedefault=True,
28+
),
29+
extraction_registration_mask=dict(argstr='-f %s',
30+
),
31+
ignore_exception=dict(nohash=True,
32+
usedefault=True,
33+
),
34+
image_suffix=dict(argstr='-s %s',
35+
usedefault=True,
36+
),
37+
keep_temporary_files=dict(argstr='-k %d',
38+
),
39+
label_propagation=dict(argstr='-l %s',
40+
),
41+
max_iterations=dict(argstr='-i %d',
42+
),
43+
num_threads=dict(nohash=True,
44+
usedefault=True,
45+
),
46+
out_prefix=dict(argstr='-o %s',
47+
usedefault=True,
48+
),
49+
posterior_formulation=dict(argstr='-b %s',
50+
),
51+
prior_segmentation_weight=dict(argstr='-w %f',
52+
),
53+
quick_registration=dict(argstr='-q 1',
54+
),
55+
segmentation_iterations=dict(argstr='-n %d',
56+
),
57+
segmentation_priors=dict(argstr='-p %s',
58+
mandatory=True,
59+
),
60+
t1_registration_template=dict(argstr='-t %s',
61+
mandatory=True,
62+
),
63+
terminal_output=dict(mandatory=True,
64+
nohash=True,
65+
),
66+
use_floatingpoint_precision=dict(argstr='-j %d',
67+
),
68+
use_random_seeding=dict(argstr='-u %d',
69+
),
70+
)
71+
inputs = antsCorticalThickness.input_spec()
72+
73+
for key, metadata in input_map.items():
74+
for metakey, value in metadata.items():
75+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
76+
77+
def test_antsCorticalThickness_outputs():
78+
output_map = dict(BrainExtractionMask=dict(),
79+
BrainSegmentation=dict(),
80+
BrainSegmentationN4=dict(),
81+
BrainSegmentationPosteriorsCSF=dict(),
82+
BrainSegmentationPosteriorsDGM=dict(),
83+
BrainSegmentationPosteriorsGM=dict(),
84+
BrainSegmentationPosteriorsWM=dict(),
85+
CorticalThickness=dict(),
86+
SubjectToTemplate0GenericAffine=dict(),
87+
SubjectToTemplate1Warp=dict(),
88+
TemplateToSubject0Warp=dict(),
89+
TemplateToSubject1GenericAffine=dict(),
90+
TemplateToSubjectLogJacobian=dict(),
91+
)
92+
outputs = antsCorticalThickness.output_spec()
93+
94+
for key, metadata in output_map.items():
95+
for metakey, value in metadata.items():
96+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
97+

nipype/interfaces/camino/connectivity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ConmatInputSpec(CommandLineInputSpec):
3737
desc=("Tract statistic to use. See TractStats for other options."),
3838
requires=['scalar_file'],xor=['tract_prop'])
3939

40-
tract_prop = traits.Enum("length", "endpointsep", argstr='-tractstat %s',
40+
tract_prop = traits.Enum("length", "endpointsep", argstr='-tractstat %s',
4141
units='NA', xor=['tract_stat'],
4242
desc=('Tract property average to compute in the connectivity matrix. '
4343
'See TractStats for details.'))

nipype/interfaces/dcmstack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class DcmStackInputSpec(NiftiGeneratorBaseInputSpec):
8585
"any default exclude filters")
8686
include_regexes = traits.List(desc="Meta data to include, overriding any "
8787
"exclude filters")
88-
force_read = traits.Bool(True, usedefault=True,
88+
force_read = traits.Bool(True, usedefault=True,
8989
desc=('Force reading files without DICM marker'))
9090

9191

nipype/interfaces/dipy/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Denoise(BaseInterface):
127127
"""
128128
input_spec = DenoiseInputSpec
129129
output_spec = DenoiseOutputSpec
130-
130+
131131
def _run_interface(self, runtime):
132132
out_file = op.abspath(self._gen_outfilename())
133133

0 commit comments

Comments
 (0)