niwrap-mrtrix 0.6.3__py3-none-any.whl → 0.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of niwrap-mrtrix might be problematic. Click here for more details.
- niwrap_mrtrix/mrtrix/__init__.py +133 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +59 -68
- niwrap_mrtrix/mrtrix/amp2response.py +72 -77
- niwrap_mrtrix/mrtrix/amp2sh.py +109 -74
- niwrap_mrtrix/mrtrix/connectome2tck.py +77 -79
- niwrap_mrtrix/mrtrix/connectomeedit.py +52 -62
- niwrap_mrtrix/mrtrix/connectomestats.py +117 -104
- niwrap_mrtrix/mrtrix/dcmedit.py +68 -73
- niwrap_mrtrix/mrtrix/dcminfo.py +67 -72
- niwrap_mrtrix/mrtrix/dirflip.py +56 -66
- niwrap_mrtrix/mrtrix/dirgen.py +68 -75
- niwrap_mrtrix/mrtrix/dirmerge.py +56 -66
- niwrap_mrtrix/mrtrix/dirorder.py +53 -64
- niwrap_mrtrix/mrtrix/dirsplit.py +56 -66
- niwrap_mrtrix/mrtrix/dirstat.py +70 -75
- niwrap_mrtrix/mrtrix/dwi2adc.py +67 -74
- niwrap_mrtrix/mrtrix/dwi2fod.py +141 -96
- niwrap_mrtrix/mrtrix/dwi2mask.py +70 -76
- niwrap_mrtrix/mrtrix/dwi2response.py +238 -157
- niwrap_mrtrix/mrtrix/dwi2tensor.py +87 -88
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +97 -95
- niwrap_mrtrix/mrtrix/dwidenoise.py +67 -74
- niwrap_mrtrix/mrtrix/dwiextract.py +143 -99
- niwrap_mrtrix/mrtrix/dwigradcheck.py +89 -91
- niwrap_mrtrix/mrtrix/fixel2peaks.py +77 -51
- niwrap_mrtrix/mrtrix/fixel2sh.py +54 -65
- niwrap_mrtrix/mrtrix/fixel2tsf.py +56 -66
- niwrap_mrtrix/mrtrix/fixel2voxel.py +62 -70
- niwrap_mrtrix/mrtrix/fixelcfestats.py +145 -93
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +62 -70
- niwrap_mrtrix/mrtrix/fixelconvert.py +136 -69
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +61 -69
- niwrap_mrtrix/mrtrix/fixelcrop.py +53 -64
- niwrap_mrtrix/mrtrix/fixelfilter.py +139 -71
- niwrap_mrtrix/mrtrix/fixelreorient.py +53 -64
- niwrap_mrtrix/mrtrix/fod2dec.py +70 -75
- niwrap_mrtrix/mrtrix/fod2fixel.py +84 -85
- niwrap_mrtrix/mrtrix/label2colour.py +58 -67
- niwrap_mrtrix/mrtrix/label2mesh.py +53 -64
- niwrap_mrtrix/mrtrix/labelconvert.py +58 -67
- niwrap_mrtrix/mrtrix/labelstats.py +53 -63
- niwrap_mrtrix/mrtrix/maskdump.py +52 -64
- niwrap_mrtrix/mrtrix/maskfilter.py +93 -61
- niwrap_mrtrix/mrtrix/mesh2voxel.py +53 -64
- niwrap_mrtrix/mrtrix/meshconvert.py +66 -73
- niwrap_mrtrix/mrtrix/meshfilter.py +59 -68
- niwrap_mrtrix/mrtrix/mraverageheader.py +62 -70
- niwrap_mrtrix/mrtrix/mrcalc.py +522 -397
- niwrap_mrtrix/mrtrix/mrcat.py +59 -68
- niwrap_mrtrix/mrtrix/mrcentroid.py +53 -63
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +58 -67
- niwrap_mrtrix/mrtrix/mrclusterstats.py +119 -105
- niwrap_mrtrix/mrtrix/mrcolour.py +62 -70
- niwrap_mrtrix/mrtrix/mrconvert.py +275 -173
- niwrap_mrtrix/mrtrix/mrdegibbs.py +66 -73
- niwrap_mrtrix/mrtrix/mrdump.py +55 -66
- niwrap_mrtrix/mrtrix/mredit.py +97 -94
- niwrap_mrtrix/mrtrix/mrfilter.py +124 -81
- niwrap_mrtrix/mrtrix/mrgrid.py +131 -88
- niwrap_mrtrix/mrtrix/mrhistmatch.py +64 -71
- niwrap_mrtrix/mrtrix/mrhistogram.py +64 -71
- niwrap_mrtrix/mrtrix/mrinfo.py +160 -137
- niwrap_mrtrix/mrtrix/mrmath.py +65 -73
- niwrap_mrtrix/mrtrix/mrmetric.py +69 -73
- niwrap_mrtrix/mrtrix/mrregister.py +263 -212
- niwrap_mrtrix/mrtrix/mrstats.py +66 -72
- niwrap_mrtrix/mrtrix/mrthreshold.py +80 -81
- niwrap_mrtrix/mrtrix/mrtransform.py +162 -109
- niwrap_mrtrix/mrtrix/mtnormalise.py +85 -88
- niwrap_mrtrix/mrtrix/peaks2amp.py +51 -63
- niwrap_mrtrix/mrtrix/peaks2fixel.py +54 -65
- niwrap_mrtrix/mrtrix/responsemean.py +51 -62
- niwrap_mrtrix/mrtrix/sh2amp.py +98 -65
- niwrap_mrtrix/mrtrix/sh2peaks.py +81 -83
- niwrap_mrtrix/mrtrix/sh2power.py +53 -64
- niwrap_mrtrix/mrtrix/sh2response.py +62 -70
- niwrap_mrtrix/mrtrix/shbasis.py +51 -62
- niwrap_mrtrix/mrtrix/shconv.py +78 -52
- niwrap_mrtrix/mrtrix/tck2connectome.py +93 -88
- niwrap_mrtrix/mrtrix/tck2fixel.py +57 -65
- niwrap_mrtrix/mrtrix/tckconvert.py +99 -65
- niwrap_mrtrix/mrtrix/tckdfc.py +82 -83
- niwrap_mrtrix/mrtrix/tckedit.py +240 -122
- niwrap_mrtrix/mrtrix/tckgen.py +364 -207
- niwrap_mrtrix/mrtrix/tckglobal.py +127 -115
- niwrap_mrtrix/mrtrix/tckinfo.py +50 -61
- niwrap_mrtrix/mrtrix/tckmap.py +121 -79
- niwrap_mrtrix/mrtrix/tckresample.py +97 -93
- niwrap_mrtrix/mrtrix/tcksample.py +62 -69
- niwrap_mrtrix/mrtrix/tcksift.py +102 -97
- niwrap_mrtrix/mrtrix/tcksift2.py +119 -107
- niwrap_mrtrix/mrtrix/tckstats.py +72 -78
- niwrap_mrtrix/mrtrix/tcktransform.py +53 -64
- niwrap_mrtrix/mrtrix/tensor2metric.py +93 -94
- niwrap_mrtrix/mrtrix/transformcalc.py +53 -64
- niwrap_mrtrix/mrtrix/transformcompose.py +74 -48
- niwrap_mrtrix/mrtrix/transformconvert.py +53 -64
- niwrap_mrtrix/mrtrix/tsfdivide.py +53 -64
- niwrap_mrtrix/mrtrix/tsfinfo.py +53 -63
- niwrap_mrtrix/mrtrix/tsfmult.py +51 -63
- niwrap_mrtrix/mrtrix/tsfsmooth.py +54 -65
- niwrap_mrtrix/mrtrix/tsfthreshold.py +55 -65
- niwrap_mrtrix/mrtrix/tsfvalidate.py +50 -61
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +54 -65
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +69 -75
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +51 -62
- niwrap_mrtrix/mrtrix/v_5ttedit.py +73 -79
- niwrap_mrtrix/mrtrix/v_5ttgen.py +132 -86
- niwrap_mrtrix/mrtrix/vectorstats.py +92 -88
- niwrap_mrtrix/mrtrix/voxel2fixel.py +54 -63
- niwrap_mrtrix/mrtrix/voxel2mesh.py +56 -66
- niwrap_mrtrix/mrtrix/warp2metric.py +71 -77
- niwrap_mrtrix/mrtrix/warpconvert.py +61 -69
- niwrap_mrtrix/mrtrix/warpcorrect.py +61 -71
- niwrap_mrtrix/mrtrix/warpinit.py +51 -63
- niwrap_mrtrix/mrtrix/warpinvert.py +56 -66
- niwrap_mrtrix-0.7.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.7.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.7.0.dist-info/WHEEL +4 -0
- niwrap_mrtrix-0.6.3.dist-info/METADATA +0 -8
- niwrap_mrtrix-0.6.3.dist-info/RECORD +0 -119
- niwrap_mrtrix-0.6.3.dist-info/WHEEL +0 -4
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
TSFTHRESHOLD_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="220d3f902e017234312aae91150846c6019a24c8.boutiques",
|
|
10
10
|
name="tsfthreshold",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,34 @@ TSFTHRESHOLD_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
TsfthresholdConfigParameters = typing.TypedDict('TsfthresholdConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
TsfthresholdConfigParametersTagged = typing.TypedDict('TsfthresholdConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
TsfthresholdParameters = typing.TypedDict('TsfthresholdParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/tsfthreshold"]],
|
|
30
|
+
"invert": bool,
|
|
31
|
+
"info": bool,
|
|
32
|
+
"quiet": bool,
|
|
33
|
+
"debug": bool,
|
|
34
|
+
"force": bool,
|
|
35
|
+
"nthreads": typing.NotRequired[int | None],
|
|
36
|
+
"config": typing.NotRequired[list[TsfthresholdConfigParameters] | None],
|
|
37
|
+
"help": bool,
|
|
38
|
+
"version": bool,
|
|
39
|
+
"input": InputPathType,
|
|
40
|
+
"T": float,
|
|
41
|
+
"output": str,
|
|
42
|
+
})
|
|
43
|
+
TsfthresholdParametersTagged = typing.TypedDict('TsfthresholdParametersTagged', {
|
|
44
|
+
"@type": typing.Literal["mrtrix/tsfthreshold"],
|
|
25
45
|
"invert": bool,
|
|
26
46
|
"info": bool,
|
|
27
47
|
"quiet": bool,
|
|
@@ -35,45 +55,12 @@ TsfthresholdParameters = typing.TypedDict('TsfthresholdParameters', {
|
|
|
35
55
|
"T": float,
|
|
36
56
|
"output": str,
|
|
37
57
|
})
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def dyn_cargs(
|
|
41
|
-
t: str,
|
|
42
|
-
) -> typing.Any:
|
|
43
|
-
"""
|
|
44
|
-
Get build cargs function by command type.
|
|
45
|
-
|
|
46
|
-
Args:
|
|
47
|
-
t: Command type.
|
|
48
|
-
Returns:
|
|
49
|
-
Build cargs function.
|
|
50
|
-
"""
|
|
51
|
-
return {
|
|
52
|
-
"tsfthreshold": tsfthreshold_cargs,
|
|
53
|
-
"config": tsfthreshold_config_cargs,
|
|
54
|
-
}.get(t)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def dyn_outputs(
|
|
58
|
-
t: str,
|
|
59
|
-
) -> typing.Any:
|
|
60
|
-
"""
|
|
61
|
-
Get build outputs function by command type.
|
|
62
|
-
|
|
63
|
-
Args:
|
|
64
|
-
t: Command type.
|
|
65
|
-
Returns:
|
|
66
|
-
Build outputs function.
|
|
67
|
-
"""
|
|
68
|
-
return {
|
|
69
|
-
"tsfthreshold": tsfthreshold_outputs,
|
|
70
|
-
}.get(t)
|
|
71
58
|
|
|
72
59
|
|
|
73
60
|
def tsfthreshold_config_params(
|
|
74
61
|
key: str,
|
|
75
62
|
value: str,
|
|
76
|
-
) ->
|
|
63
|
+
) -> TsfthresholdConfigParametersTagged:
|
|
77
64
|
"""
|
|
78
65
|
Build parameters.
|
|
79
66
|
|
|
@@ -84,7 +71,7 @@ def tsfthreshold_config_params(
|
|
|
84
71
|
Parameter dictionary
|
|
85
72
|
"""
|
|
86
73
|
params = {
|
|
87
|
-
"
|
|
74
|
+
"@type": "config",
|
|
88
75
|
"key": key,
|
|
89
76
|
"value": value,
|
|
90
77
|
}
|
|
@@ -106,14 +93,14 @@ def tsfthreshold_config_cargs(
|
|
|
106
93
|
"""
|
|
107
94
|
cargs = []
|
|
108
95
|
cargs.append("-config")
|
|
109
|
-
cargs.append(params.get("key"))
|
|
110
|
-
cargs.append(params.get("value"))
|
|
96
|
+
cargs.append(params.get("key", None))
|
|
97
|
+
cargs.append(params.get("value", None))
|
|
111
98
|
return cargs
|
|
112
99
|
|
|
113
100
|
|
|
114
101
|
class TsfthresholdOutputs(typing.NamedTuple):
|
|
115
102
|
"""
|
|
116
|
-
Output object returned when calling `
|
|
103
|
+
Output object returned when calling `TsfthresholdParameters(...)`.
|
|
117
104
|
"""
|
|
118
105
|
root: OutputPathType
|
|
119
106
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -134,7 +121,7 @@ def tsfthreshold_params(
|
|
|
134
121
|
config: list[TsfthresholdConfigParameters] | None = None,
|
|
135
122
|
help_: bool = False,
|
|
136
123
|
version: bool = False,
|
|
137
|
-
) ->
|
|
124
|
+
) -> TsfthresholdParametersTagged:
|
|
138
125
|
"""
|
|
139
126
|
Build parameters.
|
|
140
127
|
|
|
@@ -159,7 +146,7 @@ def tsfthreshold_params(
|
|
|
159
146
|
Parameter dictionary
|
|
160
147
|
"""
|
|
161
148
|
params = {
|
|
162
|
-
"
|
|
149
|
+
"@type": "mrtrix/tsfthreshold",
|
|
163
150
|
"invert": invert,
|
|
164
151
|
"info": info,
|
|
165
152
|
"quiet": quiet,
|
|
@@ -193,30 +180,30 @@ def tsfthreshold_cargs(
|
|
|
193
180
|
"""
|
|
194
181
|
cargs = []
|
|
195
182
|
cargs.append("tsfthreshold")
|
|
196
|
-
if params.get("invert"):
|
|
183
|
+
if params.get("invert", False):
|
|
197
184
|
cargs.append("-invert")
|
|
198
|
-
if params.get("info"):
|
|
185
|
+
if params.get("info", False):
|
|
199
186
|
cargs.append("-info")
|
|
200
|
-
if params.get("quiet"):
|
|
187
|
+
if params.get("quiet", False):
|
|
201
188
|
cargs.append("-quiet")
|
|
202
|
-
if params.get("debug"):
|
|
189
|
+
if params.get("debug", False):
|
|
203
190
|
cargs.append("-debug")
|
|
204
|
-
if params.get("force"):
|
|
191
|
+
if params.get("force", False):
|
|
205
192
|
cargs.append("-force")
|
|
206
|
-
if params.get("nthreads") is not None:
|
|
193
|
+
if params.get("nthreads", None) is not None:
|
|
207
194
|
cargs.extend([
|
|
208
195
|
"-nthreads",
|
|
209
|
-
str(params.get("nthreads"))
|
|
196
|
+
str(params.get("nthreads", None))
|
|
210
197
|
])
|
|
211
|
-
if params.get("config") is not None:
|
|
212
|
-
cargs.extend([a for c in [
|
|
213
|
-
if params.get("help"):
|
|
198
|
+
if params.get("config", None) is not None:
|
|
199
|
+
cargs.extend([a for c in [tsfthreshold_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
200
|
+
if params.get("help", False):
|
|
214
201
|
cargs.append("-help")
|
|
215
|
-
if params.get("version"):
|
|
202
|
+
if params.get("version", False):
|
|
216
203
|
cargs.append("-version")
|
|
217
|
-
cargs.append(execution.input_file(params.get("input")))
|
|
218
|
-
cargs.append(str(params.get("T")))
|
|
219
|
-
cargs.append(params.get("output"))
|
|
204
|
+
cargs.append(execution.input_file(params.get("input", None)))
|
|
205
|
+
cargs.append(str(params.get("T", None)))
|
|
206
|
+
cargs.append(params.get("output", None))
|
|
220
207
|
return cargs
|
|
221
208
|
|
|
222
209
|
|
|
@@ -235,16 +222,18 @@ def tsfthreshold_outputs(
|
|
|
235
222
|
"""
|
|
236
223
|
ret = TsfthresholdOutputs(
|
|
237
224
|
root=execution.output_file("."),
|
|
238
|
-
output=execution.output_file(params.get("output")),
|
|
225
|
+
output=execution.output_file(params.get("output", None)),
|
|
239
226
|
)
|
|
240
227
|
return ret
|
|
241
228
|
|
|
242
229
|
|
|
243
230
|
def tsfthreshold_execute(
|
|
244
231
|
params: TsfthresholdParameters,
|
|
245
|
-
|
|
232
|
+
runner: Runner | None = None,
|
|
246
233
|
) -> TsfthresholdOutputs:
|
|
247
234
|
"""
|
|
235
|
+
tsfthreshold
|
|
236
|
+
|
|
248
237
|
Threshold and invert track scalar files.
|
|
249
238
|
|
|
250
239
|
|
|
@@ -259,10 +248,12 @@ def tsfthreshold_execute(
|
|
|
259
248
|
|
|
260
249
|
Args:
|
|
261
250
|
params: The parameters.
|
|
262
|
-
|
|
251
|
+
runner: Command runner.
|
|
263
252
|
Returns:
|
|
264
253
|
NamedTuple of outputs (described in `TsfthresholdOutputs`).
|
|
265
254
|
"""
|
|
255
|
+
runner = runner or get_global_runner()
|
|
256
|
+
execution = runner.start_execution(TSFTHRESHOLD_METADATA)
|
|
266
257
|
params = execution.params(params)
|
|
267
258
|
cargs = tsfthreshold_cargs(params, execution)
|
|
268
259
|
ret = tsfthreshold_outputs(params, execution)
|
|
@@ -286,6 +277,8 @@ def tsfthreshold(
|
|
|
286
277
|
runner: Runner | None = None,
|
|
287
278
|
) -> TsfthresholdOutputs:
|
|
288
279
|
"""
|
|
280
|
+
tsfthreshold
|
|
281
|
+
|
|
289
282
|
Threshold and invert track scalar files.
|
|
290
283
|
|
|
291
284
|
|
|
@@ -319,8 +312,6 @@ def tsfthreshold(
|
|
|
319
312
|
Returns:
|
|
320
313
|
NamedTuple of outputs (described in `TsfthresholdOutputs`).
|
|
321
314
|
"""
|
|
322
|
-
runner = runner or get_global_runner()
|
|
323
|
-
execution = runner.start_execution(TSFTHRESHOLD_METADATA)
|
|
324
315
|
params = tsfthreshold_params(
|
|
325
316
|
invert=invert,
|
|
326
317
|
info=info,
|
|
@@ -335,15 +326,14 @@ def tsfthreshold(
|
|
|
335
326
|
t=t,
|
|
336
327
|
output=output,
|
|
337
328
|
)
|
|
338
|
-
return tsfthreshold_execute(params,
|
|
329
|
+
return tsfthreshold_execute(params, runner)
|
|
339
330
|
|
|
340
331
|
|
|
341
332
|
__all__ = [
|
|
342
333
|
"TSFTHRESHOLD_METADATA",
|
|
343
|
-
"TsfthresholdConfigParameters",
|
|
344
334
|
"TsfthresholdOutputs",
|
|
345
|
-
"TsfthresholdParameters",
|
|
346
335
|
"tsfthreshold",
|
|
347
336
|
"tsfthreshold_config_params",
|
|
337
|
+
"tsfthreshold_execute",
|
|
348
338
|
"tsfthreshold_params",
|
|
349
339
|
]
|
|
@@ -6,7 +6,7 @@ import pathlib
|
|
|
6
6
|
from styxdefs import *
|
|
7
7
|
|
|
8
8
|
TSFVALIDATE_METADATA = Metadata(
|
|
9
|
-
id="
|
|
9
|
+
id="113b8eae68aafc8fc670ca2774bb8cf075bd6e47.boutiques",
|
|
10
10
|
name="tsfvalidate",
|
|
11
11
|
package="mrtrix",
|
|
12
12
|
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
@@ -14,14 +14,32 @@ TSFVALIDATE_METADATA = Metadata(
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
TsfvalidateConfigParameters = typing.TypedDict('TsfvalidateConfigParameters', {
|
|
17
|
-
"
|
|
17
|
+
"@type": typing.NotRequired[typing.Literal["config"]],
|
|
18
|
+
"key": str,
|
|
19
|
+
"value": str,
|
|
20
|
+
})
|
|
21
|
+
TsfvalidateConfigParametersTagged = typing.TypedDict('TsfvalidateConfigParametersTagged', {
|
|
22
|
+
"@type": typing.Literal["config"],
|
|
18
23
|
"key": str,
|
|
19
24
|
"value": str,
|
|
20
25
|
})
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
TsfvalidateParameters = typing.TypedDict('TsfvalidateParameters', {
|
|
24
|
-
"
|
|
29
|
+
"@type": typing.NotRequired[typing.Literal["mrtrix/tsfvalidate"]],
|
|
30
|
+
"info": bool,
|
|
31
|
+
"quiet": bool,
|
|
32
|
+
"debug": bool,
|
|
33
|
+
"force": bool,
|
|
34
|
+
"nthreads": typing.NotRequired[int | None],
|
|
35
|
+
"config": typing.NotRequired[list[TsfvalidateConfigParameters] | None],
|
|
36
|
+
"help": bool,
|
|
37
|
+
"version": bool,
|
|
38
|
+
"tsf": InputPathType,
|
|
39
|
+
"tracks": InputPathType,
|
|
40
|
+
})
|
|
41
|
+
TsfvalidateParametersTagged = typing.TypedDict('TsfvalidateParametersTagged', {
|
|
42
|
+
"@type": typing.Literal["mrtrix/tsfvalidate"],
|
|
25
43
|
"info": bool,
|
|
26
44
|
"quiet": bool,
|
|
27
45
|
"debug": bool,
|
|
@@ -33,44 +51,12 @@ TsfvalidateParameters = typing.TypedDict('TsfvalidateParameters', {
|
|
|
33
51
|
"tsf": InputPathType,
|
|
34
52
|
"tracks": InputPathType,
|
|
35
53
|
})
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def dyn_cargs(
|
|
39
|
-
t: str,
|
|
40
|
-
) -> typing.Any:
|
|
41
|
-
"""
|
|
42
|
-
Get build cargs function by command type.
|
|
43
|
-
|
|
44
|
-
Args:
|
|
45
|
-
t: Command type.
|
|
46
|
-
Returns:
|
|
47
|
-
Build cargs function.
|
|
48
|
-
"""
|
|
49
|
-
return {
|
|
50
|
-
"tsfvalidate": tsfvalidate_cargs,
|
|
51
|
-
"config": tsfvalidate_config_cargs,
|
|
52
|
-
}.get(t)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def dyn_outputs(
|
|
56
|
-
t: str,
|
|
57
|
-
) -> typing.Any:
|
|
58
|
-
"""
|
|
59
|
-
Get build outputs function by command type.
|
|
60
|
-
|
|
61
|
-
Args:
|
|
62
|
-
t: Command type.
|
|
63
|
-
Returns:
|
|
64
|
-
Build outputs function.
|
|
65
|
-
"""
|
|
66
|
-
return {
|
|
67
|
-
}.get(t)
|
|
68
54
|
|
|
69
55
|
|
|
70
56
|
def tsfvalidate_config_params(
|
|
71
57
|
key: str,
|
|
72
58
|
value: str,
|
|
73
|
-
) ->
|
|
59
|
+
) -> TsfvalidateConfigParametersTagged:
|
|
74
60
|
"""
|
|
75
61
|
Build parameters.
|
|
76
62
|
|
|
@@ -81,7 +67,7 @@ def tsfvalidate_config_params(
|
|
|
81
67
|
Parameter dictionary
|
|
82
68
|
"""
|
|
83
69
|
params = {
|
|
84
|
-
"
|
|
70
|
+
"@type": "config",
|
|
85
71
|
"key": key,
|
|
86
72
|
"value": value,
|
|
87
73
|
}
|
|
@@ -103,14 +89,14 @@ def tsfvalidate_config_cargs(
|
|
|
103
89
|
"""
|
|
104
90
|
cargs = []
|
|
105
91
|
cargs.append("-config")
|
|
106
|
-
cargs.append(params.get("key"))
|
|
107
|
-
cargs.append(params.get("value"))
|
|
92
|
+
cargs.append(params.get("key", None))
|
|
93
|
+
cargs.append(params.get("value", None))
|
|
108
94
|
return cargs
|
|
109
95
|
|
|
110
96
|
|
|
111
97
|
class TsfvalidateOutputs(typing.NamedTuple):
|
|
112
98
|
"""
|
|
113
|
-
Output object returned when calling `
|
|
99
|
+
Output object returned when calling `TsfvalidateParameters(...)`.
|
|
114
100
|
"""
|
|
115
101
|
root: OutputPathType
|
|
116
102
|
"""Output root folder. This is the root folder for all outputs."""
|
|
@@ -127,7 +113,7 @@ def tsfvalidate_params(
|
|
|
127
113
|
config: list[TsfvalidateConfigParameters] | None = None,
|
|
128
114
|
help_: bool = False,
|
|
129
115
|
version: bool = False,
|
|
130
|
-
) ->
|
|
116
|
+
) -> TsfvalidateParametersTagged:
|
|
131
117
|
"""
|
|
132
118
|
Build parameters.
|
|
133
119
|
|
|
@@ -150,7 +136,7 @@ def tsfvalidate_params(
|
|
|
150
136
|
Parameter dictionary
|
|
151
137
|
"""
|
|
152
138
|
params = {
|
|
153
|
-
"
|
|
139
|
+
"@type": "mrtrix/tsfvalidate",
|
|
154
140
|
"info": info,
|
|
155
141
|
"quiet": quiet,
|
|
156
142
|
"debug": debug,
|
|
@@ -182,27 +168,27 @@ def tsfvalidate_cargs(
|
|
|
182
168
|
"""
|
|
183
169
|
cargs = []
|
|
184
170
|
cargs.append("tsfvalidate")
|
|
185
|
-
if params.get("info"):
|
|
171
|
+
if params.get("info", False):
|
|
186
172
|
cargs.append("-info")
|
|
187
|
-
if params.get("quiet"):
|
|
173
|
+
if params.get("quiet", False):
|
|
188
174
|
cargs.append("-quiet")
|
|
189
|
-
if params.get("debug"):
|
|
175
|
+
if params.get("debug", False):
|
|
190
176
|
cargs.append("-debug")
|
|
191
|
-
if params.get("force"):
|
|
177
|
+
if params.get("force", False):
|
|
192
178
|
cargs.append("-force")
|
|
193
|
-
if params.get("nthreads") is not None:
|
|
179
|
+
if params.get("nthreads", None) is not None:
|
|
194
180
|
cargs.extend([
|
|
195
181
|
"-nthreads",
|
|
196
|
-
str(params.get("nthreads"))
|
|
182
|
+
str(params.get("nthreads", None))
|
|
197
183
|
])
|
|
198
|
-
if params.get("config") is not None:
|
|
199
|
-
cargs.extend([a for c in [
|
|
200
|
-
if params.get("help"):
|
|
184
|
+
if params.get("config", None) is not None:
|
|
185
|
+
cargs.extend([a for c in [tsfvalidate_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
|
|
186
|
+
if params.get("help", False):
|
|
201
187
|
cargs.append("-help")
|
|
202
|
-
if params.get("version"):
|
|
188
|
+
if params.get("version", False):
|
|
203
189
|
cargs.append("-version")
|
|
204
|
-
cargs.append(execution.input_file(params.get("tsf")))
|
|
205
|
-
cargs.append(execution.input_file(params.get("tracks")))
|
|
190
|
+
cargs.append(execution.input_file(params.get("tsf", None)))
|
|
191
|
+
cargs.append(execution.input_file(params.get("tracks", None)))
|
|
206
192
|
return cargs
|
|
207
193
|
|
|
208
194
|
|
|
@@ -227,9 +213,11 @@ def tsfvalidate_outputs(
|
|
|
227
213
|
|
|
228
214
|
def tsfvalidate_execute(
|
|
229
215
|
params: TsfvalidateParameters,
|
|
230
|
-
|
|
216
|
+
runner: Runner | None = None,
|
|
231
217
|
) -> TsfvalidateOutputs:
|
|
232
218
|
"""
|
|
219
|
+
tsfvalidate
|
|
220
|
+
|
|
233
221
|
Validate a track scalar file against the corresponding track data.
|
|
234
222
|
|
|
235
223
|
|
|
@@ -244,10 +232,12 @@ def tsfvalidate_execute(
|
|
|
244
232
|
|
|
245
233
|
Args:
|
|
246
234
|
params: The parameters.
|
|
247
|
-
|
|
235
|
+
runner: Command runner.
|
|
248
236
|
Returns:
|
|
249
237
|
NamedTuple of outputs (described in `TsfvalidateOutputs`).
|
|
250
238
|
"""
|
|
239
|
+
runner = runner or get_global_runner()
|
|
240
|
+
execution = runner.start_execution(TSFVALIDATE_METADATA)
|
|
251
241
|
params = execution.params(params)
|
|
252
242
|
cargs = tsfvalidate_cargs(params, execution)
|
|
253
243
|
ret = tsfvalidate_outputs(params, execution)
|
|
@@ -269,6 +259,8 @@ def tsfvalidate(
|
|
|
269
259
|
runner: Runner | None = None,
|
|
270
260
|
) -> TsfvalidateOutputs:
|
|
271
261
|
"""
|
|
262
|
+
tsfvalidate
|
|
263
|
+
|
|
272
264
|
Validate a track scalar file against the corresponding track data.
|
|
273
265
|
|
|
274
266
|
|
|
@@ -300,8 +292,6 @@ def tsfvalidate(
|
|
|
300
292
|
Returns:
|
|
301
293
|
NamedTuple of outputs (described in `TsfvalidateOutputs`).
|
|
302
294
|
"""
|
|
303
|
-
runner = runner or get_global_runner()
|
|
304
|
-
execution = runner.start_execution(TSFVALIDATE_METADATA)
|
|
305
295
|
params = tsfvalidate_params(
|
|
306
296
|
info=info,
|
|
307
297
|
quiet=quiet,
|
|
@@ -314,15 +304,14 @@ def tsfvalidate(
|
|
|
314
304
|
tsf=tsf,
|
|
315
305
|
tracks=tracks,
|
|
316
306
|
)
|
|
317
|
-
return tsfvalidate_execute(params,
|
|
307
|
+
return tsfvalidate_execute(params, runner)
|
|
318
308
|
|
|
319
309
|
|
|
320
310
|
__all__ = [
|
|
321
311
|
"TSFVALIDATE_METADATA",
|
|
322
|
-
"TsfvalidateConfigParameters",
|
|
323
312
|
"TsfvalidateOutputs",
|
|
324
|
-
"TsfvalidateParameters",
|
|
325
313
|
"tsfvalidate",
|
|
326
314
|
"tsfvalidate_config_params",
|
|
315
|
+
"tsfvalidate_execute",
|
|
327
316
|
"tsfvalidate_params",
|
|
328
317
|
]
|