niwrap-mrtrix 0.5.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.

Files changed (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +130 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +453 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +362 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +423 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +347 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +530 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +351 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +344 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +336 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +382 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +351 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +546 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +413 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +427 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +316 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +353 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +394 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +373 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +498 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +772 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +580 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +404 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +592 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +441 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +356 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
  117. niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,585 @@
1
+ # This file was auto generated by Styx.
2
+ # Do not edit this file directly.
3
+
4
+ import typing
5
+ import pathlib
6
+ from styxdefs import *
7
+
8
+ VECTORSTATS_METADATA = Metadata(
9
+ id="a8a67c93f9ad1cdf03ad2a1e473010538e53830b.boutiques",
10
+ name="vectorstats",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ VectorstatsColumnParameters = typing.TypedDict('VectorstatsColumnParameters', {
17
+ "__STYX_TYPE__": typing.Literal["column"],
18
+ "path": InputPathType,
19
+ })
20
+
21
+
22
+ VectorstatsConfigParameters = typing.TypedDict('VectorstatsConfigParameters', {
23
+ "__STYX_TYPE__": typing.Literal["config"],
24
+ "key": str,
25
+ "value": str,
26
+ })
27
+
28
+
29
+ VectorstatsParameters = typing.TypedDict('VectorstatsParameters', {
30
+ "__STYX_TYPE__": typing.Literal["vectorstats"],
31
+ "notest": bool,
32
+ "errors": typing.NotRequired[str | None],
33
+ "exchange_within": typing.NotRequired[InputPathType | None],
34
+ "exchange_whole": typing.NotRequired[InputPathType | None],
35
+ "strong": bool,
36
+ "nshuffles": typing.NotRequired[int | None],
37
+ "permutations": typing.NotRequired[InputPathType | None],
38
+ "variance": typing.NotRequired[InputPathType | None],
39
+ "ftests": typing.NotRequired[InputPathType | None],
40
+ "fonly": bool,
41
+ "column": typing.NotRequired[list[VectorstatsColumnParameters] | None],
42
+ "info": bool,
43
+ "quiet": bool,
44
+ "debug": bool,
45
+ "force": bool,
46
+ "nthreads": typing.NotRequired[int | None],
47
+ "config": typing.NotRequired[list[VectorstatsConfigParameters] | None],
48
+ "help": bool,
49
+ "version": bool,
50
+ "input": InputPathType,
51
+ "design": InputPathType,
52
+ "contrast": InputPathType,
53
+ "output": str,
54
+ })
55
+
56
+
57
+ def dyn_cargs(
58
+ t: str,
59
+ ) -> typing.Any:
60
+ """
61
+ Get build cargs function by command type.
62
+
63
+ Args:
64
+ t: Command type.
65
+ Returns:
66
+ Build cargs function.
67
+ """
68
+ return {
69
+ "vectorstats": vectorstats_cargs,
70
+ "column": vectorstats_column_cargs,
71
+ "config": vectorstats_config_cargs,
72
+ }.get(t)
73
+
74
+
75
+ def dyn_outputs(
76
+ t: str,
77
+ ) -> typing.Any:
78
+ """
79
+ Get build outputs function by command type.
80
+
81
+ Args:
82
+ t: Command type.
83
+ Returns:
84
+ Build outputs function.
85
+ """
86
+ return {
87
+ }.get(t)
88
+
89
+
90
+ def vectorstats_column_params(
91
+ path: InputPathType,
92
+ ) -> VectorstatsColumnParameters:
93
+ """
94
+ Build parameters.
95
+
96
+ Args:
97
+ path: add a column to the design matrix corresponding to subject\
98
+ element-wise values (note that the contrast matrix must include an\
99
+ additional column for each use of this option); the text file provided\
100
+ via this option should contain a file name for each subject.
101
+ Returns:
102
+ Parameter dictionary
103
+ """
104
+ params = {
105
+ "__STYXTYPE__": "column",
106
+ "path": path,
107
+ }
108
+ return params
109
+
110
+
111
+ def vectorstats_column_cargs(
112
+ params: VectorstatsColumnParameters,
113
+ execution: Execution,
114
+ ) -> list[str]:
115
+ """
116
+ Build command-line arguments from parameters.
117
+
118
+ Args:
119
+ params: The parameters.
120
+ execution: The execution object for resolving input paths.
121
+ Returns:
122
+ Command-line arguments.
123
+ """
124
+ cargs = []
125
+ cargs.append("-column")
126
+ cargs.append(execution.input_file(params.get("path")))
127
+ return cargs
128
+
129
+
130
+ def vectorstats_config_params(
131
+ key: str,
132
+ value: str,
133
+ ) -> VectorstatsConfigParameters:
134
+ """
135
+ Build parameters.
136
+
137
+ Args:
138
+ key: temporarily set the value of an MRtrix config file entry.
139
+ value: temporarily set the value of an MRtrix config file entry.
140
+ Returns:
141
+ Parameter dictionary
142
+ """
143
+ params = {
144
+ "__STYXTYPE__": "config",
145
+ "key": key,
146
+ "value": value,
147
+ }
148
+ return params
149
+
150
+
151
+ def vectorstats_config_cargs(
152
+ params: VectorstatsConfigParameters,
153
+ execution: Execution,
154
+ ) -> list[str]:
155
+ """
156
+ Build command-line arguments from parameters.
157
+
158
+ Args:
159
+ params: The parameters.
160
+ execution: The execution object for resolving input paths.
161
+ Returns:
162
+ Command-line arguments.
163
+ """
164
+ cargs = []
165
+ cargs.append("-config")
166
+ cargs.append(params.get("key"))
167
+ cargs.append(params.get("value"))
168
+ return cargs
169
+
170
+
171
+ class VectorstatsOutputs(typing.NamedTuple):
172
+ """
173
+ Output object returned when calling `vectorstats(...)`.
174
+ """
175
+ root: OutputPathType
176
+ """Output root folder. This is the root folder for all outputs."""
177
+
178
+
179
+ def vectorstats_params(
180
+ input_: InputPathType,
181
+ design: InputPathType,
182
+ contrast: InputPathType,
183
+ output: str,
184
+ notest: bool = False,
185
+ errors: str | None = None,
186
+ exchange_within: InputPathType | None = None,
187
+ exchange_whole: InputPathType | None = None,
188
+ strong: bool = False,
189
+ nshuffles: int | None = None,
190
+ permutations: InputPathType | None = None,
191
+ variance: InputPathType | None = None,
192
+ ftests: InputPathType | None = None,
193
+ fonly: bool = False,
194
+ column: list[VectorstatsColumnParameters] | None = None,
195
+ info: bool = False,
196
+ quiet: bool = False,
197
+ debug: bool = False,
198
+ force: bool = False,
199
+ nthreads: int | None = None,
200
+ config: list[VectorstatsConfigParameters] | None = None,
201
+ help_: bool = False,
202
+ version: bool = False,
203
+ ) -> VectorstatsParameters:
204
+ """
205
+ Build parameters.
206
+
207
+ Args:
208
+ input_: a text file listing the file names of the input subject data.
209
+ design: the design matrix.
210
+ contrast: the contrast matrix.
211
+ output: the filename prefix for all output.
212
+ notest: don't perform statistical inference; only output population\
213
+ statistics (effect size, stdev etc).
214
+ errors: specify nature of errors for shuffling; options are:\
215
+ ee,ise,both (default: ee).
216
+ exchange_within: specify blocks of observations within each of which\
217
+ data may undergo restricted exchange.
218
+ exchange_whole: specify blocks of observations that may be exchanged\
219
+ with one another (for independent and symmetric errors, sign-flipping\
220
+ will occur block-wise).
221
+ strong: use strong familywise error control across multiple hypotheses.
222
+ nshuffles: the number of shuffles (default: 5000).
223
+ permutations: manually define the permutations (relabelling). The input\
224
+ should be a text file defining a m x n matrix, where each relabelling\
225
+ is defined as a column vector of size m, and the number of columns, n,\
226
+ defines the number of permutations. Can be generated with the\
227
+ palm_quickperms function in PALM\
228
+ (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
229
+ option.
230
+ variance: define variance groups for the G-statistic; measurements for\
231
+ which the expected variance is equivalent should contain the same index.
232
+ ftests: perform F-tests; input text file should contain, for each\
233
+ F-test, a row containing ones and zeros, where ones indicate the rows\
234
+ of the contrast matrix to be included in the F-test.
235
+ fonly: only assess F-tests; do not perform statistical inference on\
236
+ entries in the contrast matrix.
237
+ column: add a column to the design matrix corresponding to subject\
238
+ element-wise values (note that the contrast matrix must include an\
239
+ additional column for each use of this option); the text file provided\
240
+ via this option should contain a file name for each subject.
241
+ info: display information messages.
242
+ quiet: do not display information messages or progress status;\
243
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
244
+ environment variable to a non-empty string.
245
+ debug: display debugging messages.
246
+ force: force overwrite of output files (caution: using the same file as\
247
+ input and output might cause unexpected behaviour).
248
+ nthreads: use this number of threads in multi-threaded applications\
249
+ (set to 0 to disable multi-threading).
250
+ config: temporarily set the value of an MRtrix config file entry.
251
+ help_: display this information page and exit.
252
+ version: display version information and exit.
253
+ Returns:
254
+ Parameter dictionary
255
+ """
256
+ params = {
257
+ "__STYXTYPE__": "vectorstats",
258
+ "notest": notest,
259
+ "strong": strong,
260
+ "fonly": fonly,
261
+ "info": info,
262
+ "quiet": quiet,
263
+ "debug": debug,
264
+ "force": force,
265
+ "help": help_,
266
+ "version": version,
267
+ "input": input_,
268
+ "design": design,
269
+ "contrast": contrast,
270
+ "output": output,
271
+ }
272
+ if errors is not None:
273
+ params["errors"] = errors
274
+ if exchange_within is not None:
275
+ params["exchange_within"] = exchange_within
276
+ if exchange_whole is not None:
277
+ params["exchange_whole"] = exchange_whole
278
+ if nshuffles is not None:
279
+ params["nshuffles"] = nshuffles
280
+ if permutations is not None:
281
+ params["permutations"] = permutations
282
+ if variance is not None:
283
+ params["variance"] = variance
284
+ if ftests is not None:
285
+ params["ftests"] = ftests
286
+ if column is not None:
287
+ params["column"] = column
288
+ if nthreads is not None:
289
+ params["nthreads"] = nthreads
290
+ if config is not None:
291
+ params["config"] = config
292
+ return params
293
+
294
+
295
+ def vectorstats_cargs(
296
+ params: VectorstatsParameters,
297
+ execution: Execution,
298
+ ) -> list[str]:
299
+ """
300
+ Build command-line arguments from parameters.
301
+
302
+ Args:
303
+ params: The parameters.
304
+ execution: The execution object for resolving input paths.
305
+ Returns:
306
+ Command-line arguments.
307
+ """
308
+ cargs = []
309
+ cargs.append("vectorstats")
310
+ if params.get("notest"):
311
+ cargs.append("-notest")
312
+ if params.get("errors") is not None:
313
+ cargs.extend([
314
+ "-errors",
315
+ params.get("errors")
316
+ ])
317
+ if params.get("exchange_within") is not None:
318
+ cargs.extend([
319
+ "-exchange_within",
320
+ execution.input_file(params.get("exchange_within"))
321
+ ])
322
+ if params.get("exchange_whole") is not None:
323
+ cargs.extend([
324
+ "-exchange_whole",
325
+ execution.input_file(params.get("exchange_whole"))
326
+ ])
327
+ if params.get("strong"):
328
+ cargs.append("-strong")
329
+ if params.get("nshuffles") is not None:
330
+ cargs.extend([
331
+ "-nshuffles",
332
+ str(params.get("nshuffles"))
333
+ ])
334
+ if params.get("permutations") is not None:
335
+ cargs.extend([
336
+ "-permutations",
337
+ execution.input_file(params.get("permutations"))
338
+ ])
339
+ if params.get("variance") is not None:
340
+ cargs.extend([
341
+ "-variance",
342
+ execution.input_file(params.get("variance"))
343
+ ])
344
+ if params.get("ftests") is not None:
345
+ cargs.extend([
346
+ "-ftests",
347
+ execution.input_file(params.get("ftests"))
348
+ ])
349
+ if params.get("fonly"):
350
+ cargs.append("-fonly")
351
+ if params.get("column") is not None:
352
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("column")] for a in c])
353
+ if params.get("info"):
354
+ cargs.append("-info")
355
+ if params.get("quiet"):
356
+ cargs.append("-quiet")
357
+ if params.get("debug"):
358
+ cargs.append("-debug")
359
+ if params.get("force"):
360
+ cargs.append("-force")
361
+ if params.get("nthreads") is not None:
362
+ cargs.extend([
363
+ "-nthreads",
364
+ str(params.get("nthreads"))
365
+ ])
366
+ if params.get("config") is not None:
367
+ cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
368
+ if params.get("help"):
369
+ cargs.append("-help")
370
+ if params.get("version"):
371
+ cargs.append("-version")
372
+ cargs.append(execution.input_file(params.get("input")))
373
+ cargs.append(execution.input_file(params.get("design")))
374
+ cargs.append(execution.input_file(params.get("contrast")))
375
+ cargs.append(params.get("output"))
376
+ return cargs
377
+
378
+
379
+ def vectorstats_outputs(
380
+ params: VectorstatsParameters,
381
+ execution: Execution,
382
+ ) -> VectorstatsOutputs:
383
+ """
384
+ Build outputs object containing output file paths and possibly stdout/stderr.
385
+
386
+ Args:
387
+ params: The parameters.
388
+ execution: The execution object for resolving input paths.
389
+ Returns:
390
+ Outputs object.
391
+ """
392
+ ret = VectorstatsOutputs(
393
+ root=execution.output_file("."),
394
+ )
395
+ return ret
396
+
397
+
398
+ def vectorstats_execute(
399
+ params: VectorstatsParameters,
400
+ execution: Execution,
401
+ ) -> VectorstatsOutputs:
402
+ """
403
+ Statistical testing of vector data using non-parametric permutation testing.
404
+
405
+ This command can be used to perform permutation testing of any form of data.
406
+ The data for each input subject must be stored in a text file, with one
407
+ value per row. The data for each row across subjects will be tested
408
+ independently, i.e. there is no statistical enhancement that occurs between
409
+ the data; however family-wise error control will be used.
410
+
411
+ In some software packages, a column of ones is automatically added to the
412
+ GLM design matrix; the purpose of this column is to estimate the "global
413
+ intercept", which is the predicted value of the observed variable if all
414
+ explanatory variables were to be zero. However there are rare situations
415
+ where including such a column would not be appropriate for a particular
416
+ experimental design. Hence, in MRtrix3 statistical inference commands, it is
417
+ up to the user to determine whether or not this column of ones should be
418
+ included in their design matrix, and add it explicitly if necessary. The
419
+ contrast matrix must also reflect the presence of this additional column.
420
+
421
+ References:
422
+
423
+ .
424
+
425
+ Author: MRTrix3 Developers
426
+
427
+ URL: https://www.mrtrix.org/
428
+
429
+ Args:
430
+ params: The parameters.
431
+ execution: The execution object.
432
+ Returns:
433
+ NamedTuple of outputs (described in `VectorstatsOutputs`).
434
+ """
435
+ params = execution.params(params)
436
+ cargs = vectorstats_cargs(params, execution)
437
+ ret = vectorstats_outputs(params, execution)
438
+ execution.run(cargs)
439
+ return ret
440
+
441
+
442
+ def vectorstats(
443
+ input_: InputPathType,
444
+ design: InputPathType,
445
+ contrast: InputPathType,
446
+ output: str,
447
+ notest: bool = False,
448
+ errors: str | None = None,
449
+ exchange_within: InputPathType | None = None,
450
+ exchange_whole: InputPathType | None = None,
451
+ strong: bool = False,
452
+ nshuffles: int | None = None,
453
+ permutations: InputPathType | None = None,
454
+ variance: InputPathType | None = None,
455
+ ftests: InputPathType | None = None,
456
+ fonly: bool = False,
457
+ column: list[VectorstatsColumnParameters] | None = None,
458
+ info: bool = False,
459
+ quiet: bool = False,
460
+ debug: bool = False,
461
+ force: bool = False,
462
+ nthreads: int | None = None,
463
+ config: list[VectorstatsConfigParameters] | None = None,
464
+ help_: bool = False,
465
+ version: bool = False,
466
+ runner: Runner | None = None,
467
+ ) -> VectorstatsOutputs:
468
+ """
469
+ Statistical testing of vector data using non-parametric permutation testing.
470
+
471
+ This command can be used to perform permutation testing of any form of data.
472
+ The data for each input subject must be stored in a text file, with one
473
+ value per row. The data for each row across subjects will be tested
474
+ independently, i.e. there is no statistical enhancement that occurs between
475
+ the data; however family-wise error control will be used.
476
+
477
+ In some software packages, a column of ones is automatically added to the
478
+ GLM design matrix; the purpose of this column is to estimate the "global
479
+ intercept", which is the predicted value of the observed variable if all
480
+ explanatory variables were to be zero. However there are rare situations
481
+ where including such a column would not be appropriate for a particular
482
+ experimental design. Hence, in MRtrix3 statistical inference commands, it is
483
+ up to the user to determine whether or not this column of ones should be
484
+ included in their design matrix, and add it explicitly if necessary. The
485
+ contrast matrix must also reflect the presence of this additional column.
486
+
487
+ References:
488
+
489
+ .
490
+
491
+ Author: MRTrix3 Developers
492
+
493
+ URL: https://www.mrtrix.org/
494
+
495
+ Args:
496
+ input_: a text file listing the file names of the input subject data.
497
+ design: the design matrix.
498
+ contrast: the contrast matrix.
499
+ output: the filename prefix for all output.
500
+ notest: don't perform statistical inference; only output population\
501
+ statistics (effect size, stdev etc).
502
+ errors: specify nature of errors for shuffling; options are:\
503
+ ee,ise,both (default: ee).
504
+ exchange_within: specify blocks of observations within each of which\
505
+ data may undergo restricted exchange.
506
+ exchange_whole: specify blocks of observations that may be exchanged\
507
+ with one another (for independent and symmetric errors, sign-flipping\
508
+ will occur block-wise).
509
+ strong: use strong familywise error control across multiple hypotheses.
510
+ nshuffles: the number of shuffles (default: 5000).
511
+ permutations: manually define the permutations (relabelling). The input\
512
+ should be a text file defining a m x n matrix, where each relabelling\
513
+ is defined as a column vector of size m, and the number of columns, n,\
514
+ defines the number of permutations. Can be generated with the\
515
+ palm_quickperms function in PALM\
516
+ (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
517
+ option.
518
+ variance: define variance groups for the G-statistic; measurements for\
519
+ which the expected variance is equivalent should contain the same index.
520
+ ftests: perform F-tests; input text file should contain, for each\
521
+ F-test, a row containing ones and zeros, where ones indicate the rows\
522
+ of the contrast matrix to be included in the F-test.
523
+ fonly: only assess F-tests; do not perform statistical inference on\
524
+ entries in the contrast matrix.
525
+ column: add a column to the design matrix corresponding to subject\
526
+ element-wise values (note that the contrast matrix must include an\
527
+ additional column for each use of this option); the text file provided\
528
+ via this option should contain a file name for each subject.
529
+ info: display information messages.
530
+ quiet: do not display information messages or progress status;\
531
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
532
+ environment variable to a non-empty string.
533
+ debug: display debugging messages.
534
+ force: force overwrite of output files (caution: using the same file as\
535
+ input and output might cause unexpected behaviour).
536
+ nthreads: use this number of threads in multi-threaded applications\
537
+ (set to 0 to disable multi-threading).
538
+ config: temporarily set the value of an MRtrix config file entry.
539
+ help_: display this information page and exit.
540
+ version: display version information and exit.
541
+ runner: Command runner.
542
+ Returns:
543
+ NamedTuple of outputs (described in `VectorstatsOutputs`).
544
+ """
545
+ runner = runner or get_global_runner()
546
+ execution = runner.start_execution(VECTORSTATS_METADATA)
547
+ params = vectorstats_params(
548
+ notest=notest,
549
+ errors=errors,
550
+ exchange_within=exchange_within,
551
+ exchange_whole=exchange_whole,
552
+ strong=strong,
553
+ nshuffles=nshuffles,
554
+ permutations=permutations,
555
+ variance=variance,
556
+ ftests=ftests,
557
+ fonly=fonly,
558
+ column=column,
559
+ info=info,
560
+ quiet=quiet,
561
+ debug=debug,
562
+ force=force,
563
+ nthreads=nthreads,
564
+ config=config,
565
+ help_=help_,
566
+ version=version,
567
+ input_=input_,
568
+ design=design,
569
+ contrast=contrast,
570
+ output=output,
571
+ )
572
+ return vectorstats_execute(params, execution)
573
+
574
+
575
+ __all__ = [
576
+ "VECTORSTATS_METADATA",
577
+ "VectorstatsColumnParameters",
578
+ "VectorstatsConfigParameters",
579
+ "VectorstatsOutputs",
580
+ "VectorstatsParameters",
581
+ "vectorstats",
582
+ "vectorstats_column_params",
583
+ "vectorstats_config_params",
584
+ "vectorstats_params",
585
+ ]