niwrap-mrtrix 0.8.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.
Files changed (119) hide show
  1. niwrap_mrtrix/mrtrix/__init__.py +263 -0
  2. niwrap_mrtrix/mrtrix/afdconnectivity.py +527 -0
  3. niwrap_mrtrix/mrtrix/amp2response.py +560 -0
  4. niwrap_mrtrix/mrtrix/amp2sh.py +870 -0
  5. niwrap_mrtrix/mrtrix/connectome2tck.py +583 -0
  6. niwrap_mrtrix/mrtrix/connectomeedit.py +413 -0
  7. niwrap_mrtrix/mrtrix/connectomestats.py +956 -0
  8. niwrap_mrtrix/mrtrix/dcmedit.py +552 -0
  9. niwrap_mrtrix/mrtrix/dcminfo.py +529 -0
  10. niwrap_mrtrix/mrtrix/dirflip.py +440 -0
  11. niwrap_mrtrix/mrtrix/dirgen.py +514 -0
  12. niwrap_mrtrix/mrtrix/dirmerge.py +446 -0
  13. niwrap_mrtrix/mrtrix/dirorder.py +421 -0
  14. niwrap_mrtrix/mrtrix/dirsplit.py +436 -0
  15. niwrap_mrtrix/mrtrix/dirstat.py +640 -0
  16. niwrap_mrtrix/mrtrix/dwi2adc.py +531 -0
  17. niwrap_mrtrix/mrtrix/dwi2fod.py +1156 -0
  18. niwrap_mrtrix/mrtrix/dwi2mask.py +570 -0
  19. niwrap_mrtrix/mrtrix/dwi2response.py +1774 -0
  20. niwrap_mrtrix/mrtrix/dwi2tensor.py +715 -0
  21. niwrap_mrtrix/mrtrix/dwibiascorrect.py +673 -0
  22. niwrap_mrtrix/mrtrix/dwidenoise.py +570 -0
  23. niwrap_mrtrix/mrtrix/dwiextract.py +1111 -0
  24. niwrap_mrtrix/mrtrix/dwigradcheck.py +665 -0
  25. niwrap_mrtrix/mrtrix/fixel2peaks.py +613 -0
  26. niwrap_mrtrix/mrtrix/fixel2sh.py +430 -0
  27. niwrap_mrtrix/mrtrix/fixel2tsf.py +435 -0
  28. niwrap_mrtrix/mrtrix/fixel2voxel.py +523 -0
  29. niwrap_mrtrix/mrtrix/fixelcfestats.py +1179 -0
  30. niwrap_mrtrix/mrtrix/fixelconnectivity.py +477 -0
  31. niwrap_mrtrix/mrtrix/fixelconvert.py +850 -0
  32. niwrap_mrtrix/mrtrix/fixelcorrespondence.py +455 -0
  33. niwrap_mrtrix/mrtrix/fixelcrop.py +422 -0
  34. niwrap_mrtrix/mrtrix/fixelfilter.py +882 -0
  35. niwrap_mrtrix/mrtrix/fixelreorient.py +435 -0
  36. niwrap_mrtrix/mrtrix/fod2dec.py +571 -0
  37. niwrap_mrtrix/mrtrix/fod2fixel.py +646 -0
  38. niwrap_mrtrix/mrtrix/label2colour.py +426 -0
  39. niwrap_mrtrix/mrtrix/label2mesh.py +417 -0
  40. niwrap_mrtrix/mrtrix/labelconvert.py +460 -0
  41. niwrap_mrtrix/mrtrix/labelstats.py +418 -0
  42. niwrap_mrtrix/mrtrix/maskdump.py +404 -0
  43. niwrap_mrtrix/mrtrix/maskfilter.py +730 -0
  44. niwrap_mrtrix/mrtrix/mesh2voxel.py +422 -0
  45. niwrap_mrtrix/mrtrix/meshconvert.py +514 -0
  46. niwrap_mrtrix/mrtrix/meshfilter.py +452 -0
  47. niwrap_mrtrix/mrtrix/mraverageheader.py +485 -0
  48. niwrap_mrtrix/mrtrix/mrcalc.py +4302 -0
  49. niwrap_mrtrix/mrtrix/mrcat.py +467 -0
  50. niwrap_mrtrix/mrtrix/mrcentroid.py +418 -0
  51. niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +446 -0
  52. niwrap_mrtrix/mrtrix/mrclusterstats.py +930 -0
  53. niwrap_mrtrix/mrtrix/mrcolour.py +490 -0
  54. niwrap_mrtrix/mrtrix/mrconvert.py +1967 -0
  55. niwrap_mrtrix/mrtrix/mrdegibbs.py +535 -0
  56. niwrap_mrtrix/mrtrix/mrdump.py +423 -0
  57. niwrap_mrtrix/mrtrix/mredit.py +737 -0
  58. niwrap_mrtrix/mrtrix/mrfilter.py +971 -0
  59. niwrap_mrtrix/mrtrix/mrgrid.py +1079 -0
  60. niwrap_mrtrix/mrtrix/mrhistmatch.py +494 -0
  61. niwrap_mrtrix/mrtrix/mrhistogram.py +484 -0
  62. niwrap_mrtrix/mrtrix/mrinfo.py +1282 -0
  63. niwrap_mrtrix/mrtrix/mrmath.py +503 -0
  64. niwrap_mrtrix/mrtrix/mrmetric.py +525 -0
  65. niwrap_mrtrix/mrtrix/mrregister.py +2098 -0
  66. niwrap_mrtrix/mrtrix/mrstats.py +534 -0
  67. niwrap_mrtrix/mrtrix/mrthreshold.py +666 -0
  68. niwrap_mrtrix/mrtrix/mrtransform.py +1372 -0
  69. niwrap_mrtrix/mrtrix/mtnormalise.py +725 -0
  70. niwrap_mrtrix/mrtrix/peaks2amp.py +403 -0
  71. niwrap_mrtrix/mrtrix/peaks2fixel.py +422 -0
  72. niwrap_mrtrix/mrtrix/responsemean.py +385 -0
  73. niwrap_mrtrix/mrtrix/sh2amp.py +844 -0
  74. niwrap_mrtrix/mrtrix/sh2peaks.py +632 -0
  75. niwrap_mrtrix/mrtrix/sh2power.py +427 -0
  76. niwrap_mrtrix/mrtrix/sh2response.py +481 -0
  77. niwrap_mrtrix/mrtrix/shbasis.py +445 -0
  78. niwrap_mrtrix/mrtrix/shconv.py +661 -0
  79. niwrap_mrtrix/mrtrix/tck2connectome.py +727 -0
  80. niwrap_mrtrix/mrtrix/tck2fixel.py +447 -0
  81. niwrap_mrtrix/mrtrix/tckconvert.py +775 -0
  82. niwrap_mrtrix/mrtrix/tckdfc.py +684 -0
  83. niwrap_mrtrix/mrtrix/tckedit.py +1478 -0
  84. niwrap_mrtrix/mrtrix/tckgen.py +2733 -0
  85. niwrap_mrtrix/mrtrix/tckglobal.py +944 -0
  86. niwrap_mrtrix/mrtrix/tckinfo.py +402 -0
  87. niwrap_mrtrix/mrtrix/tckmap.py +1004 -0
  88. niwrap_mrtrix/mrtrix/tckresample.py +760 -0
  89. niwrap_mrtrix/mrtrix/tcksample.py +497 -0
  90. niwrap_mrtrix/mrtrix/tcksift.py +739 -0
  91. niwrap_mrtrix/mrtrix/tcksift2.py +902 -0
  92. niwrap_mrtrix/mrtrix/tckstats.py +550 -0
  93. niwrap_mrtrix/mrtrix/tcktransform.py +414 -0
  94. niwrap_mrtrix/mrtrix/tensor2metric.py +659 -0
  95. niwrap_mrtrix/mrtrix/transformcalc.py +421 -0
  96. niwrap_mrtrix/mrtrix/transformcompose.py +625 -0
  97. niwrap_mrtrix/mrtrix/transformconvert.py +423 -0
  98. niwrap_mrtrix/mrtrix/tsfdivide.py +414 -0
  99. niwrap_mrtrix/mrtrix/tsfinfo.py +421 -0
  100. niwrap_mrtrix/mrtrix/tsfmult.py +401 -0
  101. niwrap_mrtrix/mrtrix/tsfsmooth.py +420 -0
  102. niwrap_mrtrix/mrtrix/tsfthreshold.py +428 -0
  103. niwrap_mrtrix/mrtrix/tsfvalidate.py +398 -0
  104. niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +432 -0
  105. niwrap_mrtrix/mrtrix/v_5tt2vis.py +505 -0
  106. niwrap_mrtrix/mrtrix/v_5ttcheck.py +409 -0
  107. niwrap_mrtrix/mrtrix/v_5ttedit.py +513 -0
  108. niwrap_mrtrix/mrtrix/v_5ttgen.py +1107 -0
  109. niwrap_mrtrix/mrtrix/vectorstats.py +736 -0
  110. niwrap_mrtrix/mrtrix/voxel2fixel.py +430 -0
  111. niwrap_mrtrix/mrtrix/voxel2mesh.py +454 -0
  112. niwrap_mrtrix/mrtrix/warp2metric.py +556 -0
  113. niwrap_mrtrix/mrtrix/warpconvert.py +498 -0
  114. niwrap_mrtrix/mrtrix/warpcorrect.py +448 -0
  115. niwrap_mrtrix/mrtrix/warpinit.py +425 -0
  116. niwrap_mrtrix/mrtrix/warpinvert.py +448 -0
  117. niwrap_mrtrix-0.8.0.dist-info/METADATA +8 -0
  118. niwrap_mrtrix-0.8.0.dist-info/RECORD +119 -0
  119. niwrap_mrtrix-0.8.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,956 @@
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
+ CONNECTOMESTATS_METADATA = Metadata(
9
+ id="607b512a43f94c7e5deeb72046391536e66cc167.boutiques",
10
+ name="connectomestats",
11
+ package="mrtrix",
12
+ container_image_tag="mrtrix3/mrtrix3:3.0.4",
13
+ )
14
+
15
+
16
+ _ConnectomestatsColumnParamsDictNoTag = typing.TypedDict('_ConnectomestatsColumnParamsDictNoTag', {
17
+ "path": InputPathType,
18
+ })
19
+ ConnectomestatsColumnParamsDictTagged = typing.TypedDict('ConnectomestatsColumnParamsDictTagged', {
20
+ "@type": typing.Literal["column"],
21
+ "path": InputPathType,
22
+ })
23
+ ConnectomestatsColumnParamsDict = _ConnectomestatsColumnParamsDictNoTag | ConnectomestatsColumnParamsDictTagged
24
+
25
+
26
+ _ConnectomestatsConfigParamsDictNoTag = typing.TypedDict('_ConnectomestatsConfigParamsDictNoTag', {
27
+ "key": str,
28
+ "value": str,
29
+ })
30
+ ConnectomestatsConfigParamsDictTagged = typing.TypedDict('ConnectomestatsConfigParamsDictTagged', {
31
+ "@type": typing.Literal["config"],
32
+ "key": str,
33
+ "value": str,
34
+ })
35
+ ConnectomestatsConfigParamsDict = _ConnectomestatsConfigParamsDictNoTag | ConnectomestatsConfigParamsDictTagged
36
+
37
+
38
+ _ConnectomestatsParamsDictNoTag = typing.TypedDict('_ConnectomestatsParamsDictNoTag', {
39
+ "notest": bool,
40
+ "errors": typing.NotRequired[str | None],
41
+ "exchange_within": typing.NotRequired[InputPathType | None],
42
+ "exchange_whole": typing.NotRequired[InputPathType | None],
43
+ "strong": bool,
44
+ "nshuffles": typing.NotRequired[int | None],
45
+ "permutations": typing.NotRequired[InputPathType | None],
46
+ "nonstationarity": bool,
47
+ "skew_nonstationarity": typing.NotRequired[float | None],
48
+ "nshuffles_nonstationarity": typing.NotRequired[int | None],
49
+ "permutations_nonstationarity": typing.NotRequired[InputPathType | None],
50
+ "tfce_dh": typing.NotRequired[float | None],
51
+ "tfce_e": typing.NotRequired[float | None],
52
+ "tfce_h": typing.NotRequired[float | None],
53
+ "variance": typing.NotRequired[InputPathType | None],
54
+ "ftests": typing.NotRequired[InputPathType | None],
55
+ "fonly": bool,
56
+ "column": typing.NotRequired[list[ConnectomestatsColumnParamsDict] | None],
57
+ "threshold": typing.NotRequired[float | None],
58
+ "info": bool,
59
+ "quiet": bool,
60
+ "debug": bool,
61
+ "force": bool,
62
+ "nthreads": typing.NotRequired[int | None],
63
+ "config": typing.NotRequired[list[ConnectomestatsConfigParamsDict] | None],
64
+ "help": bool,
65
+ "version": bool,
66
+ "input": InputPathType,
67
+ "algorithm": str,
68
+ "design": InputPathType,
69
+ "contrast": InputPathType,
70
+ "output": str,
71
+ })
72
+ ConnectomestatsParamsDictTagged = typing.TypedDict('ConnectomestatsParamsDictTagged', {
73
+ "@type": typing.Literal["mrtrix/connectomestats"],
74
+ "notest": bool,
75
+ "errors": typing.NotRequired[str | None],
76
+ "exchange_within": typing.NotRequired[InputPathType | None],
77
+ "exchange_whole": typing.NotRequired[InputPathType | None],
78
+ "strong": bool,
79
+ "nshuffles": typing.NotRequired[int | None],
80
+ "permutations": typing.NotRequired[InputPathType | None],
81
+ "nonstationarity": bool,
82
+ "skew_nonstationarity": typing.NotRequired[float | None],
83
+ "nshuffles_nonstationarity": typing.NotRequired[int | None],
84
+ "permutations_nonstationarity": typing.NotRequired[InputPathType | None],
85
+ "tfce_dh": typing.NotRequired[float | None],
86
+ "tfce_e": typing.NotRequired[float | None],
87
+ "tfce_h": typing.NotRequired[float | None],
88
+ "variance": typing.NotRequired[InputPathType | None],
89
+ "ftests": typing.NotRequired[InputPathType | None],
90
+ "fonly": bool,
91
+ "column": typing.NotRequired[list[ConnectomestatsColumnParamsDict] | None],
92
+ "threshold": typing.NotRequired[float | None],
93
+ "info": bool,
94
+ "quiet": bool,
95
+ "debug": bool,
96
+ "force": bool,
97
+ "nthreads": typing.NotRequired[int | None],
98
+ "config": typing.NotRequired[list[ConnectomestatsConfigParamsDict] | None],
99
+ "help": bool,
100
+ "version": bool,
101
+ "input": InputPathType,
102
+ "algorithm": str,
103
+ "design": InputPathType,
104
+ "contrast": InputPathType,
105
+ "output": str,
106
+ })
107
+ ConnectomestatsParamsDict = _ConnectomestatsParamsDictNoTag | ConnectomestatsParamsDictTagged
108
+
109
+
110
+ def connectomestats_column(
111
+ path: InputPathType,
112
+ ) -> ConnectomestatsColumnParamsDictTagged:
113
+ """
114
+ Build parameters.
115
+
116
+ Args:
117
+ path: add a column to the design matrix corresponding to subject\
118
+ edge-wise values (note that the contrast matrix must include an\
119
+ additional column for each use of this option); the text file provided\
120
+ via this option should contain a file name for each subject.
121
+ Returns:
122
+ Parameter dictionary
123
+ """
124
+ params = {
125
+ "@type": "column",
126
+ "path": path,
127
+ }
128
+ return params
129
+
130
+
131
+ def connectomestats_column_validate(
132
+ params: typing.Any,
133
+ ) -> None:
134
+ """
135
+ Validate parameters. Throws an error if `params` is not a valid
136
+ `ConnectomestatsColumnParamsDict` object.
137
+
138
+ Args:
139
+ params: The parameters object to validate.
140
+ """
141
+ if params is None or not isinstance(params, dict):
142
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
143
+ if params.get("path", None) is None:
144
+ raise StyxValidationError("`path` must not be None")
145
+ if not isinstance(params["path"], (pathlib.Path, str)):
146
+ raise StyxValidationError(f'`path` has the wrong type: Received `{type(params.get("path", None))}` expected `InputPathType`')
147
+
148
+
149
+ def connectomestats_column_cargs(
150
+ params: ConnectomestatsColumnParamsDict,
151
+ execution: Execution,
152
+ ) -> list[str]:
153
+ """
154
+ Build command-line arguments from parameters.
155
+
156
+ Args:
157
+ params: The parameters.
158
+ execution: The execution object for resolving input paths.
159
+ Returns:
160
+ Command-line arguments.
161
+ """
162
+ cargs = []
163
+ cargs.append("-column")
164
+ cargs.append(execution.input_file(params.get("path", None)))
165
+ return cargs
166
+
167
+
168
+ def connectomestats_config(
169
+ key: str,
170
+ value: str,
171
+ ) -> ConnectomestatsConfigParamsDictTagged:
172
+ """
173
+ Build parameters.
174
+
175
+ Args:
176
+ key: temporarily set the value of an MRtrix config file entry.
177
+ value: temporarily set the value of an MRtrix config file entry.
178
+ Returns:
179
+ Parameter dictionary
180
+ """
181
+ params = {
182
+ "@type": "config",
183
+ "key": key,
184
+ "value": value,
185
+ }
186
+ return params
187
+
188
+
189
+ def connectomestats_config_validate(
190
+ params: typing.Any,
191
+ ) -> None:
192
+ """
193
+ Validate parameters. Throws an error if `params` is not a valid
194
+ `ConnectomestatsConfigParamsDict` object.
195
+
196
+ Args:
197
+ params: The parameters object to validate.
198
+ """
199
+ if params is None or not isinstance(params, dict):
200
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
201
+ if params.get("key", None) is None:
202
+ raise StyxValidationError("`key` must not be None")
203
+ if not isinstance(params["key"], str):
204
+ raise StyxValidationError(f'`key` has the wrong type: Received `{type(params.get("key", None))}` expected `str`')
205
+ if params.get("value", None) is None:
206
+ raise StyxValidationError("`value` must not be None")
207
+ if not isinstance(params["value"], str):
208
+ raise StyxValidationError(f'`value` has the wrong type: Received `{type(params.get("value", None))}` expected `str`')
209
+
210
+
211
+ def connectomestats_config_cargs(
212
+ params: ConnectomestatsConfigParamsDict,
213
+ execution: Execution,
214
+ ) -> list[str]:
215
+ """
216
+ Build command-line arguments from parameters.
217
+
218
+ Args:
219
+ params: The parameters.
220
+ execution: The execution object for resolving input paths.
221
+ Returns:
222
+ Command-line arguments.
223
+ """
224
+ cargs = []
225
+ cargs.append("-config")
226
+ cargs.append(params.get("key", None))
227
+ cargs.append(params.get("value", None))
228
+ return cargs
229
+
230
+
231
+ class ConnectomestatsOutputs(typing.NamedTuple):
232
+ """
233
+ Output object returned when calling `ConnectomestatsParamsDict(...)`.
234
+ """
235
+ root: OutputPathType
236
+ """Output root folder. This is the root folder for all outputs."""
237
+
238
+
239
+ def connectomestats_params(
240
+ input_: InputPathType,
241
+ algorithm: str,
242
+ design: InputPathType,
243
+ contrast: InputPathType,
244
+ output: str,
245
+ notest: bool = False,
246
+ errors: str | None = None,
247
+ exchange_within: InputPathType | None = None,
248
+ exchange_whole: InputPathType | None = None,
249
+ strong: bool = False,
250
+ nshuffles: int | None = None,
251
+ permutations: InputPathType | None = None,
252
+ nonstationarity: bool = False,
253
+ skew_nonstationarity: float | None = None,
254
+ nshuffles_nonstationarity: int | None = None,
255
+ permutations_nonstationarity: InputPathType | None = None,
256
+ tfce_dh: float | None = None,
257
+ tfce_e: float | None = None,
258
+ tfce_h: float | None = None,
259
+ variance: InputPathType | None = None,
260
+ ftests: InputPathType | None = None,
261
+ fonly: bool = False,
262
+ column: list[ConnectomestatsColumnParamsDict] | None = None,
263
+ threshold: float | None = None,
264
+ info: bool = False,
265
+ quiet: bool = False,
266
+ debug: bool = False,
267
+ force: bool = False,
268
+ nthreads: int | None = None,
269
+ config: list[ConnectomestatsConfigParamsDict] | None = None,
270
+ help_: bool = False,
271
+ version: bool = False,
272
+ ) -> ConnectomestatsParamsDictTagged:
273
+ """
274
+ Build parameters.
275
+
276
+ Args:
277
+ input_: a text file listing the file names of the input connectomes.
278
+ algorithm: the algorithm to use in network-based\
279
+ clustering/enhancement. Options are: nbs, tfnbs, none.
280
+ design: the design matrix.
281
+ contrast: the contrast matrix.
282
+ output: the filename prefix for all output.
283
+ notest: don't perform statistical inference; only output population\
284
+ statistics (effect size, stdev etc).
285
+ errors: specify nature of errors for shuffling; options are:\
286
+ ee,ise,both (default: ee).
287
+ exchange_within: specify blocks of observations within each of which\
288
+ data may undergo restricted exchange.
289
+ exchange_whole: specify blocks of observations that may be exchanged\
290
+ with one another (for independent and symmetric errors, sign-flipping\
291
+ will occur block-wise).
292
+ strong: use strong familywise error control across multiple hypotheses.
293
+ nshuffles: the number of shuffles (default: 5000).
294
+ permutations: manually define the permutations (relabelling). The input\
295
+ should be a text file defining a m x n matrix, where each relabelling\
296
+ is defined as a column vector of size m, and the number of columns, n,\
297
+ defines the number of permutations. Can be generated with the\
298
+ palm_quickperms function in PALM\
299
+ (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
300
+ option.
301
+ nonstationarity: perform non-stationarity correction.
302
+ skew_nonstationarity: specify the skew parameter for empirical\
303
+ statistic calculation (default for this command is 1).
304
+ nshuffles_nonstationarity: the number of shuffles to use when\
305
+ precomputing the empirical statistic image for non-stationarity\
306
+ correction (default: 5000).
307
+ permutations_nonstationarity: manually define the permutations\
308
+ (relabelling) for computing the emprical statistics for\
309
+ non-stationarity correction. The input should be a text file defining a\
310
+ m x n matrix, where each relabelling is defined as a column vector of\
311
+ size m, and the number of columns, n, defines the number of\
312
+ permutations. Can be generated with the palm_quickperms function in\
313
+ PALM (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) Overrides the\
314
+ -nshuffles_nonstationarity option.
315
+ tfce_dh: the height increment used in the tfce integration (default:\
316
+ 0.1).
317
+ tfce_e: tfce extent exponent (default: 0.4).
318
+ tfce_h: tfce height exponent (default: 3).
319
+ variance: define variance groups for the G-statistic; measurements for\
320
+ which the expected variance is equivalent should contain the same index.
321
+ ftests: perform F-tests; input text file should contain, for each\
322
+ F-test, a row containing ones and zeros, where ones indicate the rows\
323
+ of the contrast matrix to be included in the F-test.
324
+ fonly: only assess F-tests; do not perform statistical inference on\
325
+ entries in the contrast matrix.
326
+ column: add a column to the design matrix corresponding to subject\
327
+ edge-wise values (note that the contrast matrix must include an\
328
+ additional column for each use of this option); the text file provided\
329
+ via this option should contain a file name for each subject.
330
+ threshold: the t-statistic value to use in threshold-based clustering\
331
+ algorithms.
332
+ info: display information messages.
333
+ quiet: do not display information messages or progress status;\
334
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
335
+ environment variable to a non-empty string.
336
+ debug: display debugging messages.
337
+ force: force overwrite of output files (caution: using the same file as\
338
+ input and output might cause unexpected behaviour).
339
+ nthreads: use this number of threads in multi-threaded applications\
340
+ (set to 0 to disable multi-threading).
341
+ config: temporarily set the value of an MRtrix config file entry.
342
+ help_: display this information page and exit.
343
+ version: display version information and exit.
344
+ Returns:
345
+ Parameter dictionary
346
+ """
347
+ params = {
348
+ "@type": "mrtrix/connectomestats",
349
+ "notest": notest,
350
+ "strong": strong,
351
+ "nonstationarity": nonstationarity,
352
+ "fonly": fonly,
353
+ "info": info,
354
+ "quiet": quiet,
355
+ "debug": debug,
356
+ "force": force,
357
+ "help": help_,
358
+ "version": version,
359
+ "input": input_,
360
+ "algorithm": algorithm,
361
+ "design": design,
362
+ "contrast": contrast,
363
+ "output": output,
364
+ }
365
+ if errors is not None:
366
+ params["errors"] = errors
367
+ if exchange_within is not None:
368
+ params["exchange_within"] = exchange_within
369
+ if exchange_whole is not None:
370
+ params["exchange_whole"] = exchange_whole
371
+ if nshuffles is not None:
372
+ params["nshuffles"] = nshuffles
373
+ if permutations is not None:
374
+ params["permutations"] = permutations
375
+ if skew_nonstationarity is not None:
376
+ params["skew_nonstationarity"] = skew_nonstationarity
377
+ if nshuffles_nonstationarity is not None:
378
+ params["nshuffles_nonstationarity"] = nshuffles_nonstationarity
379
+ if permutations_nonstationarity is not None:
380
+ params["permutations_nonstationarity"] = permutations_nonstationarity
381
+ if tfce_dh is not None:
382
+ params["tfce_dh"] = tfce_dh
383
+ if tfce_e is not None:
384
+ params["tfce_e"] = tfce_e
385
+ if tfce_h is not None:
386
+ params["tfce_h"] = tfce_h
387
+ if variance is not None:
388
+ params["variance"] = variance
389
+ if ftests is not None:
390
+ params["ftests"] = ftests
391
+ if column is not None:
392
+ params["column"] = column
393
+ if threshold is not None:
394
+ params["threshold"] = threshold
395
+ if nthreads is not None:
396
+ params["nthreads"] = nthreads
397
+ if config is not None:
398
+ params["config"] = config
399
+ return params
400
+
401
+
402
+ def connectomestats_validate(
403
+ params: typing.Any,
404
+ ) -> None:
405
+ """
406
+ Validate parameters. Throws an error if `params` is not a valid
407
+ `ConnectomestatsParamsDict` object.
408
+
409
+ Args:
410
+ params: The parameters object to validate.
411
+ """
412
+ if params is None or not isinstance(params, dict):
413
+ raise StyxValidationError(f'Params object has the wrong type \'{type(params)}\'')
414
+ if params.get("notest", False) is None:
415
+ raise StyxValidationError("`notest` must not be None")
416
+ if not isinstance(params["notest"], bool):
417
+ raise StyxValidationError(f'`notest` has the wrong type: Received `{type(params.get("notest", False))}` expected `bool`')
418
+ if params.get("errors", None) is not None:
419
+ if not isinstance(params["errors"], str):
420
+ raise StyxValidationError(f'`errors` has the wrong type: Received `{type(params.get("errors", None))}` expected `str | None`')
421
+ if params.get("exchange_within", None) is not None:
422
+ if not isinstance(params["exchange_within"], (pathlib.Path, str)):
423
+ raise StyxValidationError(f'`exchange_within` has the wrong type: Received `{type(params.get("exchange_within", None))}` expected `InputPathType | None`')
424
+ if params.get("exchange_whole", None) is not None:
425
+ if not isinstance(params["exchange_whole"], (pathlib.Path, str)):
426
+ raise StyxValidationError(f'`exchange_whole` has the wrong type: Received `{type(params.get("exchange_whole", None))}` expected `InputPathType | None`')
427
+ if params.get("strong", False) is None:
428
+ raise StyxValidationError("`strong` must not be None")
429
+ if not isinstance(params["strong"], bool):
430
+ raise StyxValidationError(f'`strong` has the wrong type: Received `{type(params.get("strong", False))}` expected `bool`')
431
+ if params.get("nshuffles", None) is not None:
432
+ if not isinstance(params["nshuffles"], int):
433
+ raise StyxValidationError(f'`nshuffles` has the wrong type: Received `{type(params.get("nshuffles", None))}` expected `int | None`')
434
+ if params.get("permutations", None) is not None:
435
+ if not isinstance(params["permutations"], (pathlib.Path, str)):
436
+ raise StyxValidationError(f'`permutations` has the wrong type: Received `{type(params.get("permutations", None))}` expected `InputPathType | None`')
437
+ if params.get("nonstationarity", False) is None:
438
+ raise StyxValidationError("`nonstationarity` must not be None")
439
+ if not isinstance(params["nonstationarity"], bool):
440
+ raise StyxValidationError(f'`nonstationarity` has the wrong type: Received `{type(params.get("nonstationarity", False))}` expected `bool`')
441
+ if params.get("skew_nonstationarity", None) is not None:
442
+ if not isinstance(params["skew_nonstationarity"], (float, int)):
443
+ raise StyxValidationError(f'`skew_nonstationarity` has the wrong type: Received `{type(params.get("skew_nonstationarity", None))}` expected `float | None`')
444
+ if params.get("nshuffles_nonstationarity", None) is not None:
445
+ if not isinstance(params["nshuffles_nonstationarity"], int):
446
+ raise StyxValidationError(f'`nshuffles_nonstationarity` has the wrong type: Received `{type(params.get("nshuffles_nonstationarity", None))}` expected `int | None`')
447
+ if params.get("permutations_nonstationarity", None) is not None:
448
+ if not isinstance(params["permutations_nonstationarity"], (pathlib.Path, str)):
449
+ raise StyxValidationError(f'`permutations_nonstationarity` has the wrong type: Received `{type(params.get("permutations_nonstationarity", None))}` expected `InputPathType | None`')
450
+ if params.get("tfce_dh", None) is not None:
451
+ if not isinstance(params["tfce_dh"], (float, int)):
452
+ raise StyxValidationError(f'`tfce_dh` has the wrong type: Received `{type(params.get("tfce_dh", None))}` expected `float | None`')
453
+ if params.get("tfce_e", None) is not None:
454
+ if not isinstance(params["tfce_e"], (float, int)):
455
+ raise StyxValidationError(f'`tfce_e` has the wrong type: Received `{type(params.get("tfce_e", None))}` expected `float | None`')
456
+ if params.get("tfce_h", None) is not None:
457
+ if not isinstance(params["tfce_h"], (float, int)):
458
+ raise StyxValidationError(f'`tfce_h` has the wrong type: Received `{type(params.get("tfce_h", None))}` expected `float | None`')
459
+ if params.get("variance", None) is not None:
460
+ if not isinstance(params["variance"], (pathlib.Path, str)):
461
+ raise StyxValidationError(f'`variance` has the wrong type: Received `{type(params.get("variance", None))}` expected `InputPathType | None`')
462
+ if params.get("ftests", None) is not None:
463
+ if not isinstance(params["ftests"], (pathlib.Path, str)):
464
+ raise StyxValidationError(f'`ftests` has the wrong type: Received `{type(params.get("ftests", None))}` expected `InputPathType | None`')
465
+ if params.get("fonly", False) is None:
466
+ raise StyxValidationError("`fonly` must not be None")
467
+ if not isinstance(params["fonly"], bool):
468
+ raise StyxValidationError(f'`fonly` has the wrong type: Received `{type(params.get("fonly", False))}` expected `bool`')
469
+ if params.get("column", None) is not None:
470
+ if not isinstance(params["column"], list):
471
+ raise StyxValidationError(f'`column` has the wrong type: Received `{type(params.get("column", None))}` expected `list[ConnectomestatsColumnParamsDict] | None`')
472
+ for e in params["column"]:
473
+ connectomestats_column_validate(e)
474
+ if params.get("threshold", None) is not None:
475
+ if not isinstance(params["threshold"], (float, int)):
476
+ raise StyxValidationError(f'`threshold` has the wrong type: Received `{type(params.get("threshold", None))}` expected `float | None`')
477
+ if params.get("info", False) is None:
478
+ raise StyxValidationError("`info` must not be None")
479
+ if not isinstance(params["info"], bool):
480
+ raise StyxValidationError(f'`info` has the wrong type: Received `{type(params.get("info", False))}` expected `bool`')
481
+ if params.get("quiet", False) is None:
482
+ raise StyxValidationError("`quiet` must not be None")
483
+ if not isinstance(params["quiet"], bool):
484
+ raise StyxValidationError(f'`quiet` has the wrong type: Received `{type(params.get("quiet", False))}` expected `bool`')
485
+ if params.get("debug", False) is None:
486
+ raise StyxValidationError("`debug` must not be None")
487
+ if not isinstance(params["debug"], bool):
488
+ raise StyxValidationError(f'`debug` has the wrong type: Received `{type(params.get("debug", False))}` expected `bool`')
489
+ if params.get("force", False) is None:
490
+ raise StyxValidationError("`force` must not be None")
491
+ if not isinstance(params["force"], bool):
492
+ raise StyxValidationError(f'`force` has the wrong type: Received `{type(params.get("force", False))}` expected `bool`')
493
+ if params.get("nthreads", None) is not None:
494
+ if not isinstance(params["nthreads"], int):
495
+ raise StyxValidationError(f'`nthreads` has the wrong type: Received `{type(params.get("nthreads", None))}` expected `int | None`')
496
+ if params.get("config", None) is not None:
497
+ if not isinstance(params["config"], list):
498
+ raise StyxValidationError(f'`config` has the wrong type: Received `{type(params.get("config", None))}` expected `list[ConnectomestatsConfigParamsDict] | None`')
499
+ for e in params["config"]:
500
+ connectomestats_config_validate(e)
501
+ if params.get("help", False) is None:
502
+ raise StyxValidationError("`help` must not be None")
503
+ if not isinstance(params["help"], bool):
504
+ raise StyxValidationError(f'`help` has the wrong type: Received `{type(params.get("help", False))}` expected `bool`')
505
+ if params.get("version", False) is None:
506
+ raise StyxValidationError("`version` must not be None")
507
+ if not isinstance(params["version"], bool):
508
+ raise StyxValidationError(f'`version` has the wrong type: Received `{type(params.get("version", False))}` expected `bool`')
509
+ if params.get("input", None) is None:
510
+ raise StyxValidationError("`input` must not be None")
511
+ if not isinstance(params["input"], (pathlib.Path, str)):
512
+ raise StyxValidationError(f'`input` has the wrong type: Received `{type(params.get("input", None))}` expected `InputPathType`')
513
+ if params.get("algorithm", None) is None:
514
+ raise StyxValidationError("`algorithm` must not be None")
515
+ if not isinstance(params["algorithm"], str):
516
+ raise StyxValidationError(f'`algorithm` has the wrong type: Received `{type(params.get("algorithm", None))}` expected `str`')
517
+ if params.get("design", None) is None:
518
+ raise StyxValidationError("`design` must not be None")
519
+ if not isinstance(params["design"], (pathlib.Path, str)):
520
+ raise StyxValidationError(f'`design` has the wrong type: Received `{type(params.get("design", None))}` expected `InputPathType`')
521
+ if params.get("contrast", None) is None:
522
+ raise StyxValidationError("`contrast` must not be None")
523
+ if not isinstance(params["contrast"], (pathlib.Path, str)):
524
+ raise StyxValidationError(f'`contrast` has the wrong type: Received `{type(params.get("contrast", None))}` expected `InputPathType`')
525
+ if params.get("output", None) is None:
526
+ raise StyxValidationError("`output` must not be None")
527
+ if not isinstance(params["output"], str):
528
+ raise StyxValidationError(f'`output` has the wrong type: Received `{type(params.get("output", None))}` expected `str`')
529
+
530
+
531
+ def connectomestats_cargs(
532
+ params: ConnectomestatsParamsDict,
533
+ execution: Execution,
534
+ ) -> list[str]:
535
+ """
536
+ Build command-line arguments from parameters.
537
+
538
+ Args:
539
+ params: The parameters.
540
+ execution: The execution object for resolving input paths.
541
+ Returns:
542
+ Command-line arguments.
543
+ """
544
+ cargs = []
545
+ cargs.append("connectomestats")
546
+ if params.get("notest", False):
547
+ cargs.append("-notest")
548
+ if params.get("errors", None) is not None:
549
+ cargs.extend([
550
+ "-errors",
551
+ params.get("errors", None)
552
+ ])
553
+ if params.get("exchange_within", None) is not None:
554
+ cargs.extend([
555
+ "-exchange_within",
556
+ execution.input_file(params.get("exchange_within", None))
557
+ ])
558
+ if params.get("exchange_whole", None) is not None:
559
+ cargs.extend([
560
+ "-exchange_whole",
561
+ execution.input_file(params.get("exchange_whole", None))
562
+ ])
563
+ if params.get("strong", False):
564
+ cargs.append("-strong")
565
+ if params.get("nshuffles", None) is not None:
566
+ cargs.extend([
567
+ "-nshuffles",
568
+ str(params.get("nshuffles", None))
569
+ ])
570
+ if params.get("permutations", None) is not None:
571
+ cargs.extend([
572
+ "-permutations",
573
+ execution.input_file(params.get("permutations", None))
574
+ ])
575
+ if params.get("nonstationarity", False):
576
+ cargs.append("-nonstationarity")
577
+ if params.get("skew_nonstationarity", None) is not None:
578
+ cargs.extend([
579
+ "-skew_nonstationarity",
580
+ str(params.get("skew_nonstationarity", None))
581
+ ])
582
+ if params.get("nshuffles_nonstationarity", None) is not None:
583
+ cargs.extend([
584
+ "-nshuffles_nonstationarity",
585
+ str(params.get("nshuffles_nonstationarity", None))
586
+ ])
587
+ if params.get("permutations_nonstationarity", None) is not None:
588
+ cargs.extend([
589
+ "-permutations_nonstationarity",
590
+ execution.input_file(params.get("permutations_nonstationarity", None))
591
+ ])
592
+ if params.get("tfce_dh", None) is not None:
593
+ cargs.extend([
594
+ "-tfce_dh",
595
+ str(params.get("tfce_dh", None))
596
+ ])
597
+ if params.get("tfce_e", None) is not None:
598
+ cargs.extend([
599
+ "-tfce_e",
600
+ str(params.get("tfce_e", None))
601
+ ])
602
+ if params.get("tfce_h", None) is not None:
603
+ cargs.extend([
604
+ "-tfce_h",
605
+ str(params.get("tfce_h", None))
606
+ ])
607
+ if params.get("variance", None) is not None:
608
+ cargs.extend([
609
+ "-variance",
610
+ execution.input_file(params.get("variance", None))
611
+ ])
612
+ if params.get("ftests", None) is not None:
613
+ cargs.extend([
614
+ "-ftests",
615
+ execution.input_file(params.get("ftests", None))
616
+ ])
617
+ if params.get("fonly", False):
618
+ cargs.append("-fonly")
619
+ if params.get("column", None) is not None:
620
+ cargs.extend([a for c in [connectomestats_column_cargs(s, execution) for s in params.get("column", None)] for a in c])
621
+ if params.get("threshold", None) is not None:
622
+ cargs.extend([
623
+ "-threshold",
624
+ str(params.get("threshold", None))
625
+ ])
626
+ if params.get("info", False):
627
+ cargs.append("-info")
628
+ if params.get("quiet", False):
629
+ cargs.append("-quiet")
630
+ if params.get("debug", False):
631
+ cargs.append("-debug")
632
+ if params.get("force", False):
633
+ cargs.append("-force")
634
+ if params.get("nthreads", None) is not None:
635
+ cargs.extend([
636
+ "-nthreads",
637
+ str(params.get("nthreads", None))
638
+ ])
639
+ if params.get("config", None) is not None:
640
+ cargs.extend([a for c in [connectomestats_config_cargs(s, execution) for s in params.get("config", None)] for a in c])
641
+ if params.get("help", False):
642
+ cargs.append("-help")
643
+ if params.get("version", False):
644
+ cargs.append("-version")
645
+ cargs.append(execution.input_file(params.get("input", None)))
646
+ cargs.append(params.get("algorithm", None))
647
+ cargs.append(execution.input_file(params.get("design", None)))
648
+ cargs.append(execution.input_file(params.get("contrast", None)))
649
+ cargs.append(params.get("output", None))
650
+ return cargs
651
+
652
+
653
+ def connectomestats_outputs(
654
+ params: ConnectomestatsParamsDict,
655
+ execution: Execution,
656
+ ) -> ConnectomestatsOutputs:
657
+ """
658
+ Build outputs object containing output file paths and possibly stdout/stderr.
659
+
660
+ Args:
661
+ params: The parameters.
662
+ execution: The execution object for resolving input paths.
663
+ Returns:
664
+ Outputs object.
665
+ """
666
+ ret = ConnectomestatsOutputs(
667
+ root=execution.output_file("."),
668
+ )
669
+ return ret
670
+
671
+
672
+ def connectomestats_execute(
673
+ params: ConnectomestatsParamsDict,
674
+ runner: Runner | None = None,
675
+ ) -> ConnectomestatsOutputs:
676
+ """
677
+ connectomestats
678
+
679
+ Connectome group-wise statistics at the edge level using non-parametric
680
+ permutation testing.
681
+
682
+ For the TFNBS algorithm, default parameters for statistical enhancement have
683
+ been set based on the work in:
684
+ Vinokur, L.; Zalesky, A.; Raffelt, D.; Smith, R.E. & Connelly, A. A Novel
685
+ Threshold-Free Network-Based Statistics Method: Demonstration using
686
+ Simulated Pathology. OHBM, 2015, 4144;
687
+ and:
688
+ Vinokur, L.; Zalesky, A.; Raffelt, D.; Smith, R.E. & Connelly, A. A novel
689
+ threshold-free network-based statistical method: Demonstration and parameter
690
+ optimisation using in vivo simulated pathology. In Proc ISMRM, 2015, 2846.
691
+ Note however that not only was the optimisation of these parameters not very
692
+ precise, but the outcomes of statistical inference (for both this algorithm
693
+ and the NBS method) can vary markedly for even small changes to enhancement
694
+ parameters. Therefore the specificity of results obtained using either of
695
+ these methods should be interpreted with caution.
696
+
697
+ In some software packages, a column of ones is automatically added to the
698
+ GLM design matrix; the purpose of this column is to estimate the "global
699
+ intercept", which is the predicted value of the observed variable if all
700
+ explanatory variables were to be zero. However there are rare situations
701
+ where including such a column would not be appropriate for a particular
702
+ experimental design. Hence, in MRtrix3 statistical inference commands, it is
703
+ up to the user to determine whether or not this column of ones should be
704
+ included in their design matrix, and add it explicitly if necessary. The
705
+ contrast matrix must also reflect the presence of this additional column.
706
+
707
+ References:
708
+
709
+ * If using the NBS algorithm:
710
+ Zalesky, A.; Fornito, A. & Bullmore, E. T. Network-based statistic:
711
+ Identifying differences in brain networks.
712
+ NeuroImage, 2010, 53, 1197-1207
713
+
714
+ * If using the TFNBS algorithm:
715
+ Baggio, H.C.; Abos, A.; Segura, B.; Campabadal, A.; Garcia-Diaz, A.; Uribe,
716
+ C.; Compta, Y.; Marti, M.J.; Valldeoriola, F.; Junque, C. Statistical
717
+ inference in brain graphs using threshold-free network-based statistics.HBM,
718
+ 2018, 39, 2289-2302
719
+
720
+ * If using the -nonstationary option:
721
+ Salimi-Khorshidi, G.; Smith, S.M. & Nichols, T.E. Adjusting the effect of
722
+ nonstationarity in cluster-based and TFCE inference.
723
+ Neuroimage, 2011, 54(3), 2006-19.
724
+
725
+ Author: MRTrix3 Developers
726
+
727
+ URL: https://www.mrtrix.org/
728
+
729
+ Args:
730
+ params: The parameters.
731
+ runner: Command runner.
732
+ Returns:
733
+ NamedTuple of outputs (described in `ConnectomestatsOutputs`).
734
+ """
735
+ connectomestats_validate(params)
736
+ runner = runner or get_global_runner()
737
+ execution = runner.start_execution(CONNECTOMESTATS_METADATA)
738
+ params = execution.params(params)
739
+ cargs = connectomestats_cargs(params, execution)
740
+ ret = connectomestats_outputs(params, execution)
741
+ execution.run(cargs)
742
+ return ret
743
+
744
+
745
+ def connectomestats(
746
+ input_: InputPathType,
747
+ algorithm: str,
748
+ design: InputPathType,
749
+ contrast: InputPathType,
750
+ output: str,
751
+ notest: bool = False,
752
+ errors: str | None = None,
753
+ exchange_within: InputPathType | None = None,
754
+ exchange_whole: InputPathType | None = None,
755
+ strong: bool = False,
756
+ nshuffles: int | None = None,
757
+ permutations: InputPathType | None = None,
758
+ nonstationarity: bool = False,
759
+ skew_nonstationarity: float | None = None,
760
+ nshuffles_nonstationarity: int | None = None,
761
+ permutations_nonstationarity: InputPathType | None = None,
762
+ tfce_dh: float | None = None,
763
+ tfce_e: float | None = None,
764
+ tfce_h: float | None = None,
765
+ variance: InputPathType | None = None,
766
+ ftests: InputPathType | None = None,
767
+ fonly: bool = False,
768
+ column: list[ConnectomestatsColumnParamsDict] | None = None,
769
+ threshold: float | None = None,
770
+ info: bool = False,
771
+ quiet: bool = False,
772
+ debug: bool = False,
773
+ force: bool = False,
774
+ nthreads: int | None = None,
775
+ config: list[ConnectomestatsConfigParamsDict] | None = None,
776
+ help_: bool = False,
777
+ version: bool = False,
778
+ runner: Runner | None = None,
779
+ ) -> ConnectomestatsOutputs:
780
+ """
781
+ connectomestats
782
+
783
+ Connectome group-wise statistics at the edge level using non-parametric
784
+ permutation testing.
785
+
786
+ For the TFNBS algorithm, default parameters for statistical enhancement have
787
+ been set based on the work in:
788
+ Vinokur, L.; Zalesky, A.; Raffelt, D.; Smith, R.E. & Connelly, A. A Novel
789
+ Threshold-Free Network-Based Statistics Method: Demonstration using
790
+ Simulated Pathology. OHBM, 2015, 4144;
791
+ and:
792
+ Vinokur, L.; Zalesky, A.; Raffelt, D.; Smith, R.E. & Connelly, A. A novel
793
+ threshold-free network-based statistical method: Demonstration and parameter
794
+ optimisation using in vivo simulated pathology. In Proc ISMRM, 2015, 2846.
795
+ Note however that not only was the optimisation of these parameters not very
796
+ precise, but the outcomes of statistical inference (for both this algorithm
797
+ and the NBS method) can vary markedly for even small changes to enhancement
798
+ parameters. Therefore the specificity of results obtained using either of
799
+ these methods should be interpreted with caution.
800
+
801
+ In some software packages, a column of ones is automatically added to the
802
+ GLM design matrix; the purpose of this column is to estimate the "global
803
+ intercept", which is the predicted value of the observed variable if all
804
+ explanatory variables were to be zero. However there are rare situations
805
+ where including such a column would not be appropriate for a particular
806
+ experimental design. Hence, in MRtrix3 statistical inference commands, it is
807
+ up to the user to determine whether or not this column of ones should be
808
+ included in their design matrix, and add it explicitly if necessary. The
809
+ contrast matrix must also reflect the presence of this additional column.
810
+
811
+ References:
812
+
813
+ * If using the NBS algorithm:
814
+ Zalesky, A.; Fornito, A. & Bullmore, E. T. Network-based statistic:
815
+ Identifying differences in brain networks.
816
+ NeuroImage, 2010, 53, 1197-1207
817
+
818
+ * If using the TFNBS algorithm:
819
+ Baggio, H.C.; Abos, A.; Segura, B.; Campabadal, A.; Garcia-Diaz, A.; Uribe,
820
+ C.; Compta, Y.; Marti, M.J.; Valldeoriola, F.; Junque, C. Statistical
821
+ inference in brain graphs using threshold-free network-based statistics.HBM,
822
+ 2018, 39, 2289-2302
823
+
824
+ * If using the -nonstationary option:
825
+ Salimi-Khorshidi, G.; Smith, S.M. & Nichols, T.E. Adjusting the effect of
826
+ nonstationarity in cluster-based and TFCE inference.
827
+ Neuroimage, 2011, 54(3), 2006-19.
828
+
829
+ Author: MRTrix3 Developers
830
+
831
+ URL: https://www.mrtrix.org/
832
+
833
+ Args:
834
+ input_: a text file listing the file names of the input connectomes.
835
+ algorithm: the algorithm to use in network-based\
836
+ clustering/enhancement. Options are: nbs, tfnbs, none.
837
+ design: the design matrix.
838
+ contrast: the contrast matrix.
839
+ output: the filename prefix for all output.
840
+ notest: don't perform statistical inference; only output population\
841
+ statistics (effect size, stdev etc).
842
+ errors: specify nature of errors for shuffling; options are:\
843
+ ee,ise,both (default: ee).
844
+ exchange_within: specify blocks of observations within each of which\
845
+ data may undergo restricted exchange.
846
+ exchange_whole: specify blocks of observations that may be exchanged\
847
+ with one another (for independent and symmetric errors, sign-flipping\
848
+ will occur block-wise).
849
+ strong: use strong familywise error control across multiple hypotheses.
850
+ nshuffles: the number of shuffles (default: 5000).
851
+ permutations: manually define the permutations (relabelling). The input\
852
+ should be a text file defining a m x n matrix, where each relabelling\
853
+ is defined as a column vector of size m, and the number of columns, n,\
854
+ defines the number of permutations. Can be generated with the\
855
+ palm_quickperms function in PALM\
856
+ (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
857
+ option.
858
+ nonstationarity: perform non-stationarity correction.
859
+ skew_nonstationarity: specify the skew parameter for empirical\
860
+ statistic calculation (default for this command is 1).
861
+ nshuffles_nonstationarity: the number of shuffles to use when\
862
+ precomputing the empirical statistic image for non-stationarity\
863
+ correction (default: 5000).
864
+ permutations_nonstationarity: manually define the permutations\
865
+ (relabelling) for computing the emprical statistics for\
866
+ non-stationarity correction. The input should be a text file defining a\
867
+ m x n matrix, where each relabelling is defined as a column vector of\
868
+ size m, and the number of columns, n, defines the number of\
869
+ permutations. Can be generated with the palm_quickperms function in\
870
+ PALM (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) Overrides the\
871
+ -nshuffles_nonstationarity option.
872
+ tfce_dh: the height increment used in the tfce integration (default:\
873
+ 0.1).
874
+ tfce_e: tfce extent exponent (default: 0.4).
875
+ tfce_h: tfce height exponent (default: 3).
876
+ variance: define variance groups for the G-statistic; measurements for\
877
+ which the expected variance is equivalent should contain the same index.
878
+ ftests: perform F-tests; input text file should contain, for each\
879
+ F-test, a row containing ones and zeros, where ones indicate the rows\
880
+ of the contrast matrix to be included in the F-test.
881
+ fonly: only assess F-tests; do not perform statistical inference on\
882
+ entries in the contrast matrix.
883
+ column: add a column to the design matrix corresponding to subject\
884
+ edge-wise values (note that the contrast matrix must include an\
885
+ additional column for each use of this option); the text file provided\
886
+ via this option should contain a file name for each subject.
887
+ threshold: the t-statistic value to use in threshold-based clustering\
888
+ algorithms.
889
+ info: display information messages.
890
+ quiet: do not display information messages or progress status;\
891
+ alternatively, this can be achieved by setting the MRTRIX_QUIET\
892
+ environment variable to a non-empty string.
893
+ debug: display debugging messages.
894
+ force: force overwrite of output files (caution: using the same file as\
895
+ input and output might cause unexpected behaviour).
896
+ nthreads: use this number of threads in multi-threaded applications\
897
+ (set to 0 to disable multi-threading).
898
+ config: temporarily set the value of an MRtrix config file entry.
899
+ help_: display this information page and exit.
900
+ version: display version information and exit.
901
+ runner: Command runner.
902
+ Returns:
903
+ NamedTuple of outputs (described in `ConnectomestatsOutputs`).
904
+ """
905
+ params = connectomestats_params(
906
+ notest=notest,
907
+ errors=errors,
908
+ exchange_within=exchange_within,
909
+ exchange_whole=exchange_whole,
910
+ strong=strong,
911
+ nshuffles=nshuffles,
912
+ permutations=permutations,
913
+ nonstationarity=nonstationarity,
914
+ skew_nonstationarity=skew_nonstationarity,
915
+ nshuffles_nonstationarity=nshuffles_nonstationarity,
916
+ permutations_nonstationarity=permutations_nonstationarity,
917
+ tfce_dh=tfce_dh,
918
+ tfce_e=tfce_e,
919
+ tfce_h=tfce_h,
920
+ variance=variance,
921
+ ftests=ftests,
922
+ fonly=fonly,
923
+ column=column,
924
+ threshold=threshold,
925
+ info=info,
926
+ quiet=quiet,
927
+ debug=debug,
928
+ force=force,
929
+ nthreads=nthreads,
930
+ config=config,
931
+ help_=help_,
932
+ version=version,
933
+ input_=input_,
934
+ algorithm=algorithm,
935
+ design=design,
936
+ contrast=contrast,
937
+ output=output,
938
+ )
939
+ return connectomestats_execute(params, runner)
940
+
941
+
942
+ __all__ = [
943
+ "CONNECTOMESTATS_METADATA",
944
+ "ConnectomestatsColumnParamsDict",
945
+ "ConnectomestatsColumnParamsDictTagged",
946
+ "ConnectomestatsConfigParamsDict",
947
+ "ConnectomestatsConfigParamsDictTagged",
948
+ "ConnectomestatsOutputs",
949
+ "ConnectomestatsParamsDict",
950
+ "ConnectomestatsParamsDictTagged",
951
+ "connectomestats",
952
+ "connectomestats_column",
953
+ "connectomestats_config",
954
+ "connectomestats_execute",
955
+ "connectomestats_params",
956
+ ]