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.
- niwrap_mrtrix/mrtrix/__init__.py +130 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
- niwrap_mrtrix/mrtrix/amp2response.py +453 -0
- niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
- niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
- niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
- niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
- niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
- niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
- niwrap_mrtrix/mrtrix/dirflip.py +362 -0
- niwrap_mrtrix/mrtrix/dirgen.py +423 -0
- niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
- niwrap_mrtrix/mrtrix/dirorder.py +347 -0
- niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
- niwrap_mrtrix/mrtrix/dirstat.py +530 -0
- niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
- niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
- niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
- niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
- niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
- niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
- niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
- niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
- niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
- niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
- niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
- niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
- niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
- niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
- niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
- niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
- niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
- niwrap_mrtrix/mrtrix/label2colour.py +351 -0
- niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
- niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
- niwrap_mrtrix/mrtrix/labelstats.py +344 -0
- niwrap_mrtrix/mrtrix/maskdump.py +336 -0
- niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
- niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
- niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
- niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
- niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
- niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
- niwrap_mrtrix/mrtrix/mrcat.py +382 -0
- niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
- niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
- niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
- niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
- niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
- niwrap_mrtrix/mrtrix/mrdump.py +351 -0
- niwrap_mrtrix/mrtrix/mredit.py +546 -0
- niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
- niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
- niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
- niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
- niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
- niwrap_mrtrix/mrtrix/mrmath.py +413 -0
- niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
- niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
- niwrap_mrtrix/mrtrix/mrstats.py +427 -0
- niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
- niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
- niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
- niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
- niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
- niwrap_mrtrix/mrtrix/responsemean.py +316 -0
- niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
- niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
- niwrap_mrtrix/mrtrix/sh2power.py +353 -0
- niwrap_mrtrix/mrtrix/sh2response.py +394 -0
- niwrap_mrtrix/mrtrix/shbasis.py +373 -0
- niwrap_mrtrix/mrtrix/shconv.py +498 -0
- niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
- niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
- niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
- niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
- niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
- niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
- niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
- niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
- niwrap_mrtrix/mrtrix/tckmap.py +772 -0
- niwrap_mrtrix/mrtrix/tckresample.py +580 -0
- niwrap_mrtrix/mrtrix/tcksample.py +404 -0
- niwrap_mrtrix/mrtrix/tcksift.py +592 -0
- niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
- niwrap_mrtrix/mrtrix/tckstats.py +441 -0
- niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
- niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
- niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
- niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
- niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
- niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
- niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
- niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
- niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
- niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
- niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
- niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
- niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
- niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
- niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
- niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
- niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
- niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
- niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
- niwrap_mrtrix/mrtrix/warpinit.py +356 -0
- niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
- niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,893 @@
|
|
|
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
|
+
FIXELCFESTATS_METADATA = Metadata(
|
|
9
|
+
id="85b1cb9bb9525faf62a80ea0820d52c7ae94777f.boutiques",
|
|
10
|
+
name="fixelcfestats",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
FixelcfestatsColumnParameters = typing.TypedDict('FixelcfestatsColumnParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["column"],
|
|
18
|
+
"path": InputPathType,
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
FixelcfestatsConfigParameters = typing.TypedDict('FixelcfestatsConfigParameters', {
|
|
23
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
24
|
+
"key": str,
|
|
25
|
+
"value": str,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
FixelcfestatsVariousStringParameters = typing.TypedDict('FixelcfestatsVariousStringParameters', {
|
|
30
|
+
"__STYX_TYPE__": typing.Literal["VariousString"],
|
|
31
|
+
"obj": str,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
FixelcfestatsVariousFileParameters = typing.TypedDict('FixelcfestatsVariousFileParameters', {
|
|
36
|
+
"__STYX_TYPE__": typing.Literal["VariousFile"],
|
|
37
|
+
"obj": InputPathType,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
FixelcfestatsParameters = typing.TypedDict('FixelcfestatsParameters', {
|
|
42
|
+
"__STYX_TYPE__": typing.Literal["fixelcfestats"],
|
|
43
|
+
"mask": typing.NotRequired[InputPathType | None],
|
|
44
|
+
"notest": bool,
|
|
45
|
+
"errors": typing.NotRequired[str | None],
|
|
46
|
+
"exchange_within": typing.NotRequired[InputPathType | None],
|
|
47
|
+
"exchange_whole": typing.NotRequired[InputPathType | None],
|
|
48
|
+
"strong": bool,
|
|
49
|
+
"nshuffles": typing.NotRequired[int | None],
|
|
50
|
+
"permutations": typing.NotRequired[InputPathType | None],
|
|
51
|
+
"nonstationarity": bool,
|
|
52
|
+
"skew_nonstationarity": typing.NotRequired[float | None],
|
|
53
|
+
"nshuffles_nonstationarity": typing.NotRequired[int | None],
|
|
54
|
+
"permutations_nonstationarity": typing.NotRequired[InputPathType | None],
|
|
55
|
+
"cfe_dh": typing.NotRequired[float | None],
|
|
56
|
+
"cfe_e": typing.NotRequired[float | None],
|
|
57
|
+
"cfe_h": typing.NotRequired[float | None],
|
|
58
|
+
"cfe_c": typing.NotRequired[float | None],
|
|
59
|
+
"cfe_legacy": bool,
|
|
60
|
+
"variance": typing.NotRequired[InputPathType | None],
|
|
61
|
+
"ftests": typing.NotRequired[InputPathType | None],
|
|
62
|
+
"fonly": bool,
|
|
63
|
+
"column": typing.NotRequired[list[FixelcfestatsColumnParameters] | None],
|
|
64
|
+
"info": bool,
|
|
65
|
+
"quiet": bool,
|
|
66
|
+
"debug": bool,
|
|
67
|
+
"force": bool,
|
|
68
|
+
"nthreads": typing.NotRequired[int | None],
|
|
69
|
+
"config": typing.NotRequired[list[FixelcfestatsConfigParameters] | None],
|
|
70
|
+
"help": bool,
|
|
71
|
+
"version": bool,
|
|
72
|
+
"in_fixel_directory": InputPathType,
|
|
73
|
+
"subjects": InputPathType,
|
|
74
|
+
"design": InputPathType,
|
|
75
|
+
"contrast": InputPathType,
|
|
76
|
+
"connectivity": typing.Union[FixelcfestatsVariousStringParameters, FixelcfestatsVariousFileParameters],
|
|
77
|
+
"out_fixel_directory": str,
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def dyn_cargs(
|
|
82
|
+
t: str,
|
|
83
|
+
) -> typing.Any:
|
|
84
|
+
"""
|
|
85
|
+
Get build cargs function by command type.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
t: Command type.
|
|
89
|
+
Returns:
|
|
90
|
+
Build cargs function.
|
|
91
|
+
"""
|
|
92
|
+
return {
|
|
93
|
+
"fixelcfestats": fixelcfestats_cargs,
|
|
94
|
+
"column": fixelcfestats_column_cargs,
|
|
95
|
+
"config": fixelcfestats_config_cargs,
|
|
96
|
+
"VariousString": fixelcfestats_various_string_cargs,
|
|
97
|
+
"VariousFile": fixelcfestats_various_file_cargs,
|
|
98
|
+
}.get(t)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def dyn_outputs(
|
|
102
|
+
t: str,
|
|
103
|
+
) -> typing.Any:
|
|
104
|
+
"""
|
|
105
|
+
Get build outputs function by command type.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
t: Command type.
|
|
109
|
+
Returns:
|
|
110
|
+
Build outputs function.
|
|
111
|
+
"""
|
|
112
|
+
return {
|
|
113
|
+
}.get(t)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def fixelcfestats_column_params(
|
|
117
|
+
path: InputPathType,
|
|
118
|
+
) -> FixelcfestatsColumnParameters:
|
|
119
|
+
"""
|
|
120
|
+
Build parameters.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
path: add a column to the design matrix corresponding to subject\
|
|
124
|
+
fixel-wise values (note that the contrast matrix must include an\
|
|
125
|
+
additional column for each use of this option); the text file provided\
|
|
126
|
+
via this option should contain a file name for each subject.
|
|
127
|
+
Returns:
|
|
128
|
+
Parameter dictionary
|
|
129
|
+
"""
|
|
130
|
+
params = {
|
|
131
|
+
"__STYXTYPE__": "column",
|
|
132
|
+
"path": path,
|
|
133
|
+
}
|
|
134
|
+
return params
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def fixelcfestats_column_cargs(
|
|
138
|
+
params: FixelcfestatsColumnParameters,
|
|
139
|
+
execution: Execution,
|
|
140
|
+
) -> list[str]:
|
|
141
|
+
"""
|
|
142
|
+
Build command-line arguments from parameters.
|
|
143
|
+
|
|
144
|
+
Args:
|
|
145
|
+
params: The parameters.
|
|
146
|
+
execution: The execution object for resolving input paths.
|
|
147
|
+
Returns:
|
|
148
|
+
Command-line arguments.
|
|
149
|
+
"""
|
|
150
|
+
cargs = []
|
|
151
|
+
cargs.append("-column")
|
|
152
|
+
cargs.append(execution.input_file(params.get("path")))
|
|
153
|
+
return cargs
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def fixelcfestats_config_params(
|
|
157
|
+
key: str,
|
|
158
|
+
value: str,
|
|
159
|
+
) -> FixelcfestatsConfigParameters:
|
|
160
|
+
"""
|
|
161
|
+
Build parameters.
|
|
162
|
+
|
|
163
|
+
Args:
|
|
164
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
165
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
166
|
+
Returns:
|
|
167
|
+
Parameter dictionary
|
|
168
|
+
"""
|
|
169
|
+
params = {
|
|
170
|
+
"__STYXTYPE__": "config",
|
|
171
|
+
"key": key,
|
|
172
|
+
"value": value,
|
|
173
|
+
}
|
|
174
|
+
return params
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def fixelcfestats_config_cargs(
|
|
178
|
+
params: FixelcfestatsConfigParameters,
|
|
179
|
+
execution: Execution,
|
|
180
|
+
) -> list[str]:
|
|
181
|
+
"""
|
|
182
|
+
Build command-line arguments from parameters.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
params: The parameters.
|
|
186
|
+
execution: The execution object for resolving input paths.
|
|
187
|
+
Returns:
|
|
188
|
+
Command-line arguments.
|
|
189
|
+
"""
|
|
190
|
+
cargs = []
|
|
191
|
+
cargs.append("-config")
|
|
192
|
+
cargs.append(params.get("key"))
|
|
193
|
+
cargs.append(params.get("value"))
|
|
194
|
+
return cargs
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def fixelcfestats_various_string_params(
|
|
198
|
+
obj: str,
|
|
199
|
+
) -> FixelcfestatsVariousStringParameters:
|
|
200
|
+
"""
|
|
201
|
+
Build parameters.
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
obj: String object.
|
|
205
|
+
Returns:
|
|
206
|
+
Parameter dictionary
|
|
207
|
+
"""
|
|
208
|
+
params = {
|
|
209
|
+
"__STYXTYPE__": "VariousString",
|
|
210
|
+
"obj": obj,
|
|
211
|
+
}
|
|
212
|
+
return params
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def fixelcfestats_various_string_cargs(
|
|
216
|
+
params: FixelcfestatsVariousStringParameters,
|
|
217
|
+
execution: Execution,
|
|
218
|
+
) -> list[str]:
|
|
219
|
+
"""
|
|
220
|
+
Build command-line arguments from parameters.
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
params: The parameters.
|
|
224
|
+
execution: The execution object for resolving input paths.
|
|
225
|
+
Returns:
|
|
226
|
+
Command-line arguments.
|
|
227
|
+
"""
|
|
228
|
+
cargs = []
|
|
229
|
+
cargs.append(params.get("obj"))
|
|
230
|
+
return cargs
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def fixelcfestats_various_file_params(
|
|
234
|
+
obj: InputPathType,
|
|
235
|
+
) -> FixelcfestatsVariousFileParameters:
|
|
236
|
+
"""
|
|
237
|
+
Build parameters.
|
|
238
|
+
|
|
239
|
+
Args:
|
|
240
|
+
obj: File object.
|
|
241
|
+
Returns:
|
|
242
|
+
Parameter dictionary
|
|
243
|
+
"""
|
|
244
|
+
params = {
|
|
245
|
+
"__STYXTYPE__": "VariousFile",
|
|
246
|
+
"obj": obj,
|
|
247
|
+
}
|
|
248
|
+
return params
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def fixelcfestats_various_file_cargs(
|
|
252
|
+
params: FixelcfestatsVariousFileParameters,
|
|
253
|
+
execution: Execution,
|
|
254
|
+
) -> list[str]:
|
|
255
|
+
"""
|
|
256
|
+
Build command-line arguments from parameters.
|
|
257
|
+
|
|
258
|
+
Args:
|
|
259
|
+
params: The parameters.
|
|
260
|
+
execution: The execution object for resolving input paths.
|
|
261
|
+
Returns:
|
|
262
|
+
Command-line arguments.
|
|
263
|
+
"""
|
|
264
|
+
cargs = []
|
|
265
|
+
cargs.append(execution.input_file(params.get("obj")))
|
|
266
|
+
return cargs
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class FixelcfestatsOutputs(typing.NamedTuple):
|
|
270
|
+
"""
|
|
271
|
+
Output object returned when calling `fixelcfestats(...)`.
|
|
272
|
+
"""
|
|
273
|
+
root: OutputPathType
|
|
274
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def fixelcfestats_params(
|
|
278
|
+
in_fixel_directory: InputPathType,
|
|
279
|
+
subjects: InputPathType,
|
|
280
|
+
design: InputPathType,
|
|
281
|
+
contrast: InputPathType,
|
|
282
|
+
connectivity: typing.Union[FixelcfestatsVariousStringParameters, FixelcfestatsVariousFileParameters],
|
|
283
|
+
out_fixel_directory: str,
|
|
284
|
+
mask: InputPathType | None = None,
|
|
285
|
+
notest: bool = False,
|
|
286
|
+
errors: str | None = None,
|
|
287
|
+
exchange_within: InputPathType | None = None,
|
|
288
|
+
exchange_whole: InputPathType | None = None,
|
|
289
|
+
strong: bool = False,
|
|
290
|
+
nshuffles: int | None = None,
|
|
291
|
+
permutations: InputPathType | None = None,
|
|
292
|
+
nonstationarity: bool = False,
|
|
293
|
+
skew_nonstationarity: float | None = None,
|
|
294
|
+
nshuffles_nonstationarity: int | None = None,
|
|
295
|
+
permutations_nonstationarity: InputPathType | None = None,
|
|
296
|
+
cfe_dh: float | None = None,
|
|
297
|
+
cfe_e: float | None = None,
|
|
298
|
+
cfe_h: float | None = None,
|
|
299
|
+
cfe_c: float | None = None,
|
|
300
|
+
cfe_legacy: bool = False,
|
|
301
|
+
variance: InputPathType | None = None,
|
|
302
|
+
ftests: InputPathType | None = None,
|
|
303
|
+
fonly: bool = False,
|
|
304
|
+
column: list[FixelcfestatsColumnParameters] | None = None,
|
|
305
|
+
info: bool = False,
|
|
306
|
+
quiet: bool = False,
|
|
307
|
+
debug: bool = False,
|
|
308
|
+
force: bool = False,
|
|
309
|
+
nthreads: int | None = None,
|
|
310
|
+
config: list[FixelcfestatsConfigParameters] | None = None,
|
|
311
|
+
help_: bool = False,
|
|
312
|
+
version: bool = False,
|
|
313
|
+
) -> FixelcfestatsParameters:
|
|
314
|
+
"""
|
|
315
|
+
Build parameters.
|
|
316
|
+
|
|
317
|
+
Args:
|
|
318
|
+
in_fixel_directory: the fixel directory containing the data files for\
|
|
319
|
+
each subject (after obtaining fixel correspondence.
|
|
320
|
+
subjects: a text file listing the subject identifiers (one per line).\
|
|
321
|
+
This should correspond with the filenames in the fixel directory\
|
|
322
|
+
(including the file extension), and be listed in the same order as the\
|
|
323
|
+
rows of the design matrix.
|
|
324
|
+
design: the design matrix.
|
|
325
|
+
contrast: the contrast matrix, specified as rows of weights.
|
|
326
|
+
connectivity: the fixel-fixel connectivity matrix.
|
|
327
|
+
out_fixel_directory: the output directory where results will be saved.\
|
|
328
|
+
Will be created if it does not exist.
|
|
329
|
+
mask: provide a fixel data file containing a mask of those fixels to be\
|
|
330
|
+
used during processing.
|
|
331
|
+
notest: don't perform statistical inference; only output population\
|
|
332
|
+
statistics (effect size, stdev etc).
|
|
333
|
+
errors: specify nature of errors for shuffling; options are:\
|
|
334
|
+
ee,ise,both (default: ee).
|
|
335
|
+
exchange_within: specify blocks of observations within each of which\
|
|
336
|
+
data may undergo restricted exchange.
|
|
337
|
+
exchange_whole: specify blocks of observations that may be exchanged\
|
|
338
|
+
with one another (for independent and symmetric errors, sign-flipping\
|
|
339
|
+
will occur block-wise).
|
|
340
|
+
strong: use strong familywise error control across multiple hypotheses.
|
|
341
|
+
nshuffles: the number of shuffles (default: 5000).
|
|
342
|
+
permutations: manually define the permutations (relabelling). The input\
|
|
343
|
+
should be a text file defining a m x n matrix, where each relabelling\
|
|
344
|
+
is defined as a column vector of size m, and the number of columns, n,\
|
|
345
|
+
defines the number of permutations. Can be generated with the\
|
|
346
|
+
palm_quickperms function in PALM\
|
|
347
|
+
(http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
|
|
348
|
+
option.
|
|
349
|
+
nonstationarity: perform non-stationarity correction.
|
|
350
|
+
skew_nonstationarity: specify the skew parameter for empirical\
|
|
351
|
+
statistic calculation (default for this command is 1).
|
|
352
|
+
nshuffles_nonstationarity: the number of shuffles to use when\
|
|
353
|
+
precomputing the empirical statistic image for non-stationarity\
|
|
354
|
+
correction (default: 5000).
|
|
355
|
+
permutations_nonstationarity: manually define the permutations\
|
|
356
|
+
(relabelling) for computing the emprical statistics for\
|
|
357
|
+
non-stationarity correction. The input should be a text file defining a\
|
|
358
|
+
m x n matrix, where each relabelling is defined as a column vector of\
|
|
359
|
+
size m, and the number of columns, n, defines the number of\
|
|
360
|
+
permutations. Can be generated with the palm_quickperms function in\
|
|
361
|
+
PALM (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) Overrides the\
|
|
362
|
+
-nshuffles_nonstationarity option.
|
|
363
|
+
cfe_dh: the height increment used in the cfe integration (default: 0.1).
|
|
364
|
+
cfe_e: cfe extent exponent (default: 2).
|
|
365
|
+
cfe_h: cfe height exponent (default: 3).
|
|
366
|
+
cfe_c: cfe connectivity exponent (default: 0.5).
|
|
367
|
+
cfe_legacy: use the legacy (non-normalised) form of the cfe equation.
|
|
368
|
+
variance: define variance groups for the G-statistic; measurements for\
|
|
369
|
+
which the expected variance is equivalent should contain the same index.
|
|
370
|
+
ftests: perform F-tests; input text file should contain, for each\
|
|
371
|
+
F-test, a row containing ones and zeros, where ones indicate the rows\
|
|
372
|
+
of the contrast matrix to be included in the F-test.
|
|
373
|
+
fonly: only assess F-tests; do not perform statistical inference on\
|
|
374
|
+
entries in the contrast matrix.
|
|
375
|
+
column: add a column to the design matrix corresponding to subject\
|
|
376
|
+
fixel-wise values (note that the contrast matrix must include an\
|
|
377
|
+
additional column for each use of this option); the text file provided\
|
|
378
|
+
via this option should contain a file name for each subject.
|
|
379
|
+
info: display information messages.
|
|
380
|
+
quiet: do not display information messages or progress status;\
|
|
381
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
382
|
+
environment variable to a non-empty string.
|
|
383
|
+
debug: display debugging messages.
|
|
384
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
385
|
+
input and output might cause unexpected behaviour).
|
|
386
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
387
|
+
(set to 0 to disable multi-threading).
|
|
388
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
389
|
+
help_: display this information page and exit.
|
|
390
|
+
version: display version information and exit.
|
|
391
|
+
Returns:
|
|
392
|
+
Parameter dictionary
|
|
393
|
+
"""
|
|
394
|
+
params = {
|
|
395
|
+
"__STYXTYPE__": "fixelcfestats",
|
|
396
|
+
"notest": notest,
|
|
397
|
+
"strong": strong,
|
|
398
|
+
"nonstationarity": nonstationarity,
|
|
399
|
+
"cfe_legacy": cfe_legacy,
|
|
400
|
+
"fonly": fonly,
|
|
401
|
+
"info": info,
|
|
402
|
+
"quiet": quiet,
|
|
403
|
+
"debug": debug,
|
|
404
|
+
"force": force,
|
|
405
|
+
"help": help_,
|
|
406
|
+
"version": version,
|
|
407
|
+
"in_fixel_directory": in_fixel_directory,
|
|
408
|
+
"subjects": subjects,
|
|
409
|
+
"design": design,
|
|
410
|
+
"contrast": contrast,
|
|
411
|
+
"connectivity": connectivity,
|
|
412
|
+
"out_fixel_directory": out_fixel_directory,
|
|
413
|
+
}
|
|
414
|
+
if mask is not None:
|
|
415
|
+
params["mask"] = mask
|
|
416
|
+
if errors is not None:
|
|
417
|
+
params["errors"] = errors
|
|
418
|
+
if exchange_within is not None:
|
|
419
|
+
params["exchange_within"] = exchange_within
|
|
420
|
+
if exchange_whole is not None:
|
|
421
|
+
params["exchange_whole"] = exchange_whole
|
|
422
|
+
if nshuffles is not None:
|
|
423
|
+
params["nshuffles"] = nshuffles
|
|
424
|
+
if permutations is not None:
|
|
425
|
+
params["permutations"] = permutations
|
|
426
|
+
if skew_nonstationarity is not None:
|
|
427
|
+
params["skew_nonstationarity"] = skew_nonstationarity
|
|
428
|
+
if nshuffles_nonstationarity is not None:
|
|
429
|
+
params["nshuffles_nonstationarity"] = nshuffles_nonstationarity
|
|
430
|
+
if permutations_nonstationarity is not None:
|
|
431
|
+
params["permutations_nonstationarity"] = permutations_nonstationarity
|
|
432
|
+
if cfe_dh is not None:
|
|
433
|
+
params["cfe_dh"] = cfe_dh
|
|
434
|
+
if cfe_e is not None:
|
|
435
|
+
params["cfe_e"] = cfe_e
|
|
436
|
+
if cfe_h is not None:
|
|
437
|
+
params["cfe_h"] = cfe_h
|
|
438
|
+
if cfe_c is not None:
|
|
439
|
+
params["cfe_c"] = cfe_c
|
|
440
|
+
if variance is not None:
|
|
441
|
+
params["variance"] = variance
|
|
442
|
+
if ftests is not None:
|
|
443
|
+
params["ftests"] = ftests
|
|
444
|
+
if column is not None:
|
|
445
|
+
params["column"] = column
|
|
446
|
+
if nthreads is not None:
|
|
447
|
+
params["nthreads"] = nthreads
|
|
448
|
+
if config is not None:
|
|
449
|
+
params["config"] = config
|
|
450
|
+
return params
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
def fixelcfestats_cargs(
|
|
454
|
+
params: FixelcfestatsParameters,
|
|
455
|
+
execution: Execution,
|
|
456
|
+
) -> list[str]:
|
|
457
|
+
"""
|
|
458
|
+
Build command-line arguments from parameters.
|
|
459
|
+
|
|
460
|
+
Args:
|
|
461
|
+
params: The parameters.
|
|
462
|
+
execution: The execution object for resolving input paths.
|
|
463
|
+
Returns:
|
|
464
|
+
Command-line arguments.
|
|
465
|
+
"""
|
|
466
|
+
cargs = []
|
|
467
|
+
cargs.append("fixelcfestats")
|
|
468
|
+
if params.get("mask") is not None:
|
|
469
|
+
cargs.extend([
|
|
470
|
+
"-mask",
|
|
471
|
+
execution.input_file(params.get("mask"))
|
|
472
|
+
])
|
|
473
|
+
if params.get("notest"):
|
|
474
|
+
cargs.append("-notest")
|
|
475
|
+
if params.get("errors") is not None:
|
|
476
|
+
cargs.extend([
|
|
477
|
+
"-errors",
|
|
478
|
+
params.get("errors")
|
|
479
|
+
])
|
|
480
|
+
if params.get("exchange_within") is not None:
|
|
481
|
+
cargs.extend([
|
|
482
|
+
"-exchange_within",
|
|
483
|
+
execution.input_file(params.get("exchange_within"))
|
|
484
|
+
])
|
|
485
|
+
if params.get("exchange_whole") is not None:
|
|
486
|
+
cargs.extend([
|
|
487
|
+
"-exchange_whole",
|
|
488
|
+
execution.input_file(params.get("exchange_whole"))
|
|
489
|
+
])
|
|
490
|
+
if params.get("strong"):
|
|
491
|
+
cargs.append("-strong")
|
|
492
|
+
if params.get("nshuffles") is not None:
|
|
493
|
+
cargs.extend([
|
|
494
|
+
"-nshuffles",
|
|
495
|
+
str(params.get("nshuffles"))
|
|
496
|
+
])
|
|
497
|
+
if params.get("permutations") is not None:
|
|
498
|
+
cargs.extend([
|
|
499
|
+
"-permutations",
|
|
500
|
+
execution.input_file(params.get("permutations"))
|
|
501
|
+
])
|
|
502
|
+
if params.get("nonstationarity"):
|
|
503
|
+
cargs.append("-nonstationarity")
|
|
504
|
+
if params.get("skew_nonstationarity") is not None:
|
|
505
|
+
cargs.extend([
|
|
506
|
+
"-skew_nonstationarity",
|
|
507
|
+
str(params.get("skew_nonstationarity"))
|
|
508
|
+
])
|
|
509
|
+
if params.get("nshuffles_nonstationarity") is not None:
|
|
510
|
+
cargs.extend([
|
|
511
|
+
"-nshuffles_nonstationarity",
|
|
512
|
+
str(params.get("nshuffles_nonstationarity"))
|
|
513
|
+
])
|
|
514
|
+
if params.get("permutations_nonstationarity") is not None:
|
|
515
|
+
cargs.extend([
|
|
516
|
+
"-permutations_nonstationarity",
|
|
517
|
+
execution.input_file(params.get("permutations_nonstationarity"))
|
|
518
|
+
])
|
|
519
|
+
if params.get("cfe_dh") is not None:
|
|
520
|
+
cargs.extend([
|
|
521
|
+
"-cfe_dh",
|
|
522
|
+
str(params.get("cfe_dh"))
|
|
523
|
+
])
|
|
524
|
+
if params.get("cfe_e") is not None:
|
|
525
|
+
cargs.extend([
|
|
526
|
+
"-cfe_e",
|
|
527
|
+
str(params.get("cfe_e"))
|
|
528
|
+
])
|
|
529
|
+
if params.get("cfe_h") is not None:
|
|
530
|
+
cargs.extend([
|
|
531
|
+
"-cfe_h",
|
|
532
|
+
str(params.get("cfe_h"))
|
|
533
|
+
])
|
|
534
|
+
if params.get("cfe_c") is not None:
|
|
535
|
+
cargs.extend([
|
|
536
|
+
"-cfe_c",
|
|
537
|
+
str(params.get("cfe_c"))
|
|
538
|
+
])
|
|
539
|
+
if params.get("cfe_legacy"):
|
|
540
|
+
cargs.append("-cfe_legacy")
|
|
541
|
+
if params.get("variance") is not None:
|
|
542
|
+
cargs.extend([
|
|
543
|
+
"-variance",
|
|
544
|
+
execution.input_file(params.get("variance"))
|
|
545
|
+
])
|
|
546
|
+
if params.get("ftests") is not None:
|
|
547
|
+
cargs.extend([
|
|
548
|
+
"-ftests",
|
|
549
|
+
execution.input_file(params.get("ftests"))
|
|
550
|
+
])
|
|
551
|
+
if params.get("fonly"):
|
|
552
|
+
cargs.append("-fonly")
|
|
553
|
+
if params.get("column") is not None:
|
|
554
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("column")] for a in c])
|
|
555
|
+
if params.get("info"):
|
|
556
|
+
cargs.append("-info")
|
|
557
|
+
if params.get("quiet"):
|
|
558
|
+
cargs.append("-quiet")
|
|
559
|
+
if params.get("debug"):
|
|
560
|
+
cargs.append("-debug")
|
|
561
|
+
if params.get("force"):
|
|
562
|
+
cargs.append("-force")
|
|
563
|
+
if params.get("nthreads") is not None:
|
|
564
|
+
cargs.extend([
|
|
565
|
+
"-nthreads",
|
|
566
|
+
str(params.get("nthreads"))
|
|
567
|
+
])
|
|
568
|
+
if params.get("config") is not None:
|
|
569
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
570
|
+
if params.get("help"):
|
|
571
|
+
cargs.append("-help")
|
|
572
|
+
if params.get("version"):
|
|
573
|
+
cargs.append("-version")
|
|
574
|
+
cargs.append(execution.input_file(params.get("in_fixel_directory")))
|
|
575
|
+
cargs.append(execution.input_file(params.get("subjects")))
|
|
576
|
+
cargs.append(execution.input_file(params.get("design")))
|
|
577
|
+
cargs.append(execution.input_file(params.get("contrast")))
|
|
578
|
+
cargs.extend(dyn_cargs(params.get("connectivity")["__STYXTYPE__"])(params.get("connectivity"), execution))
|
|
579
|
+
cargs.append(params.get("out_fixel_directory"))
|
|
580
|
+
return cargs
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
def fixelcfestats_outputs(
|
|
584
|
+
params: FixelcfestatsParameters,
|
|
585
|
+
execution: Execution,
|
|
586
|
+
) -> FixelcfestatsOutputs:
|
|
587
|
+
"""
|
|
588
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
589
|
+
|
|
590
|
+
Args:
|
|
591
|
+
params: The parameters.
|
|
592
|
+
execution: The execution object for resolving input paths.
|
|
593
|
+
Returns:
|
|
594
|
+
Outputs object.
|
|
595
|
+
"""
|
|
596
|
+
ret = FixelcfestatsOutputs(
|
|
597
|
+
root=execution.output_file("."),
|
|
598
|
+
)
|
|
599
|
+
return ret
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
def fixelcfestats_execute(
|
|
603
|
+
params: FixelcfestatsParameters,
|
|
604
|
+
execution: Execution,
|
|
605
|
+
) -> FixelcfestatsOutputs:
|
|
606
|
+
"""
|
|
607
|
+
Fixel-based analysis using connectivity-based fixel enhancement and
|
|
608
|
+
non-parametric permutation testing.
|
|
609
|
+
|
|
610
|
+
Unlike previous versions of this command, where a whole-brain tractogram
|
|
611
|
+
file would be provided as input in order to generate the fixel-fixel
|
|
612
|
+
connectivity matrix and smooth fixel data, this version expects to be
|
|
613
|
+
provided with the directory path to a pre-calculated fixel-fixel
|
|
614
|
+
connectivity matrix (likely generated using the MRtrix3 command
|
|
615
|
+
fixelconnectivity), and for the input fixel data to have already been
|
|
616
|
+
smoothed (likely using the MRtrix3 command fixelfilter).
|
|
617
|
+
|
|
618
|
+
Note that if the -mask option is used, the output fixel directory will still
|
|
619
|
+
contain the same set of fixels as that present in the input fixel template,
|
|
620
|
+
in order to retain fixel correspondence. However a consequence of this is
|
|
621
|
+
that all fixels in the template will be initialy visible when the output
|
|
622
|
+
fixel directory is loaded in mrview. Those fixels outside the processing
|
|
623
|
+
mask will immediately disappear from view as soon as any data-file-based
|
|
624
|
+
fixel colouring or thresholding is applied.
|
|
625
|
+
|
|
626
|
+
In some software packages, a column of ones is automatically added to the
|
|
627
|
+
GLM design matrix; the purpose of this column is to estimate the "global
|
|
628
|
+
intercept", which is the predicted value of the observed variable if all
|
|
629
|
+
explanatory variables were to be zero. However there are rare situations
|
|
630
|
+
where including such a column would not be appropriate for a particular
|
|
631
|
+
experimental design. Hence, in MRtrix3 statistical inference commands, it is
|
|
632
|
+
up to the user to determine whether or not this column of ones should be
|
|
633
|
+
included in their design matrix, and add it explicitly if necessary. The
|
|
634
|
+
contrast matrix must also reflect the presence of this additional column.
|
|
635
|
+
|
|
636
|
+
References:
|
|
637
|
+
|
|
638
|
+
Raffelt, D.; Smith, RE.; Ridgway, GR.; Tournier, JD.; Vaughan, DN.; Rose,
|
|
639
|
+
S.; Henderson, R.; Connelly, A. Connectivity-based fixel enhancement:
|
|
640
|
+
Whole-brain statistical analysis of diffusion MRI measures in the presence
|
|
641
|
+
of crossing fibres.Neuroimage, 2015, 15(117):40-55
|
|
642
|
+
|
|
643
|
+
* If not using the -cfe_legacy option:
|
|
644
|
+
Smith, RE.; Dimond, D; Vaughan, D.; Parker, D.; Dhollander, T.; Jackson, G.;
|
|
645
|
+
Connelly, A. Intrinsic non-stationarity correction for Fixel-Based Analysis.
|
|
646
|
+
In Proc OHBM 2019 M789
|
|
647
|
+
|
|
648
|
+
* If using the -nonstationary option:
|
|
649
|
+
Salimi-Khorshidi, G. Smith, S.M. Nichols, T.E. Adjusting the effect of
|
|
650
|
+
nonstationarity in cluster-based and TFCE inference. NeuroImage, 2011,
|
|
651
|
+
54(3), 2006-19.
|
|
652
|
+
|
|
653
|
+
Author: MRTrix3 Developers
|
|
654
|
+
|
|
655
|
+
URL: https://www.mrtrix.org/
|
|
656
|
+
|
|
657
|
+
Args:
|
|
658
|
+
params: The parameters.
|
|
659
|
+
execution: The execution object.
|
|
660
|
+
Returns:
|
|
661
|
+
NamedTuple of outputs (described in `FixelcfestatsOutputs`).
|
|
662
|
+
"""
|
|
663
|
+
params = execution.params(params)
|
|
664
|
+
cargs = fixelcfestats_cargs(params, execution)
|
|
665
|
+
ret = fixelcfestats_outputs(params, execution)
|
|
666
|
+
execution.run(cargs)
|
|
667
|
+
return ret
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
def fixelcfestats(
|
|
671
|
+
in_fixel_directory: InputPathType,
|
|
672
|
+
subjects: InputPathType,
|
|
673
|
+
design: InputPathType,
|
|
674
|
+
contrast: InputPathType,
|
|
675
|
+
connectivity: typing.Union[FixelcfestatsVariousStringParameters, FixelcfestatsVariousFileParameters],
|
|
676
|
+
out_fixel_directory: str,
|
|
677
|
+
mask: InputPathType | None = None,
|
|
678
|
+
notest: bool = False,
|
|
679
|
+
errors: str | None = None,
|
|
680
|
+
exchange_within: InputPathType | None = None,
|
|
681
|
+
exchange_whole: InputPathType | None = None,
|
|
682
|
+
strong: bool = False,
|
|
683
|
+
nshuffles: int | None = None,
|
|
684
|
+
permutations: InputPathType | None = None,
|
|
685
|
+
nonstationarity: bool = False,
|
|
686
|
+
skew_nonstationarity: float | None = None,
|
|
687
|
+
nshuffles_nonstationarity: int | None = None,
|
|
688
|
+
permutations_nonstationarity: InputPathType | None = None,
|
|
689
|
+
cfe_dh: float | None = None,
|
|
690
|
+
cfe_e: float | None = None,
|
|
691
|
+
cfe_h: float | None = None,
|
|
692
|
+
cfe_c: float | None = None,
|
|
693
|
+
cfe_legacy: bool = False,
|
|
694
|
+
variance: InputPathType | None = None,
|
|
695
|
+
ftests: InputPathType | None = None,
|
|
696
|
+
fonly: bool = False,
|
|
697
|
+
column: list[FixelcfestatsColumnParameters] | None = None,
|
|
698
|
+
info: bool = False,
|
|
699
|
+
quiet: bool = False,
|
|
700
|
+
debug: bool = False,
|
|
701
|
+
force: bool = False,
|
|
702
|
+
nthreads: int | None = None,
|
|
703
|
+
config: list[FixelcfestatsConfigParameters] | None = None,
|
|
704
|
+
help_: bool = False,
|
|
705
|
+
version: bool = False,
|
|
706
|
+
runner: Runner | None = None,
|
|
707
|
+
) -> FixelcfestatsOutputs:
|
|
708
|
+
"""
|
|
709
|
+
Fixel-based analysis using connectivity-based fixel enhancement and
|
|
710
|
+
non-parametric permutation testing.
|
|
711
|
+
|
|
712
|
+
Unlike previous versions of this command, where a whole-brain tractogram
|
|
713
|
+
file would be provided as input in order to generate the fixel-fixel
|
|
714
|
+
connectivity matrix and smooth fixel data, this version expects to be
|
|
715
|
+
provided with the directory path to a pre-calculated fixel-fixel
|
|
716
|
+
connectivity matrix (likely generated using the MRtrix3 command
|
|
717
|
+
fixelconnectivity), and for the input fixel data to have already been
|
|
718
|
+
smoothed (likely using the MRtrix3 command fixelfilter).
|
|
719
|
+
|
|
720
|
+
Note that if the -mask option is used, the output fixel directory will still
|
|
721
|
+
contain the same set of fixels as that present in the input fixel template,
|
|
722
|
+
in order to retain fixel correspondence. However a consequence of this is
|
|
723
|
+
that all fixels in the template will be initialy visible when the output
|
|
724
|
+
fixel directory is loaded in mrview. Those fixels outside the processing
|
|
725
|
+
mask will immediately disappear from view as soon as any data-file-based
|
|
726
|
+
fixel colouring or thresholding is applied.
|
|
727
|
+
|
|
728
|
+
In some software packages, a column of ones is automatically added to the
|
|
729
|
+
GLM design matrix; the purpose of this column is to estimate the "global
|
|
730
|
+
intercept", which is the predicted value of the observed variable if all
|
|
731
|
+
explanatory variables were to be zero. However there are rare situations
|
|
732
|
+
where including such a column would not be appropriate for a particular
|
|
733
|
+
experimental design. Hence, in MRtrix3 statistical inference commands, it is
|
|
734
|
+
up to the user to determine whether or not this column of ones should be
|
|
735
|
+
included in their design matrix, and add it explicitly if necessary. The
|
|
736
|
+
contrast matrix must also reflect the presence of this additional column.
|
|
737
|
+
|
|
738
|
+
References:
|
|
739
|
+
|
|
740
|
+
Raffelt, D.; Smith, RE.; Ridgway, GR.; Tournier, JD.; Vaughan, DN.; Rose,
|
|
741
|
+
S.; Henderson, R.; Connelly, A. Connectivity-based fixel enhancement:
|
|
742
|
+
Whole-brain statistical analysis of diffusion MRI measures in the presence
|
|
743
|
+
of crossing fibres.Neuroimage, 2015, 15(117):40-55
|
|
744
|
+
|
|
745
|
+
* If not using the -cfe_legacy option:
|
|
746
|
+
Smith, RE.; Dimond, D; Vaughan, D.; Parker, D.; Dhollander, T.; Jackson, G.;
|
|
747
|
+
Connelly, A. Intrinsic non-stationarity correction for Fixel-Based Analysis.
|
|
748
|
+
In Proc OHBM 2019 M789
|
|
749
|
+
|
|
750
|
+
* If using the -nonstationary option:
|
|
751
|
+
Salimi-Khorshidi, G. Smith, S.M. Nichols, T.E. Adjusting the effect of
|
|
752
|
+
nonstationarity in cluster-based and TFCE inference. NeuroImage, 2011,
|
|
753
|
+
54(3), 2006-19.
|
|
754
|
+
|
|
755
|
+
Author: MRTrix3 Developers
|
|
756
|
+
|
|
757
|
+
URL: https://www.mrtrix.org/
|
|
758
|
+
|
|
759
|
+
Args:
|
|
760
|
+
in_fixel_directory: the fixel directory containing the data files for\
|
|
761
|
+
each subject (after obtaining fixel correspondence.
|
|
762
|
+
subjects: a text file listing the subject identifiers (one per line).\
|
|
763
|
+
This should correspond with the filenames in the fixel directory\
|
|
764
|
+
(including the file extension), and be listed in the same order as the\
|
|
765
|
+
rows of the design matrix.
|
|
766
|
+
design: the design matrix.
|
|
767
|
+
contrast: the contrast matrix, specified as rows of weights.
|
|
768
|
+
connectivity: the fixel-fixel connectivity matrix.
|
|
769
|
+
out_fixel_directory: the output directory where results will be saved.\
|
|
770
|
+
Will be created if it does not exist.
|
|
771
|
+
mask: provide a fixel data file containing a mask of those fixels to be\
|
|
772
|
+
used during processing.
|
|
773
|
+
notest: don't perform statistical inference; only output population\
|
|
774
|
+
statistics (effect size, stdev etc).
|
|
775
|
+
errors: specify nature of errors for shuffling; options are:\
|
|
776
|
+
ee,ise,both (default: ee).
|
|
777
|
+
exchange_within: specify blocks of observations within each of which\
|
|
778
|
+
data may undergo restricted exchange.
|
|
779
|
+
exchange_whole: specify blocks of observations that may be exchanged\
|
|
780
|
+
with one another (for independent and symmetric errors, sign-flipping\
|
|
781
|
+
will occur block-wise).
|
|
782
|
+
strong: use strong familywise error control across multiple hypotheses.
|
|
783
|
+
nshuffles: the number of shuffles (default: 5000).
|
|
784
|
+
permutations: manually define the permutations (relabelling). The input\
|
|
785
|
+
should be a text file defining a m x n matrix, where each relabelling\
|
|
786
|
+
is defined as a column vector of size m, and the number of columns, n,\
|
|
787
|
+
defines the number of permutations. Can be generated with the\
|
|
788
|
+
palm_quickperms function in PALM\
|
|
789
|
+
(http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM). Overrides the -nshuffles\
|
|
790
|
+
option.
|
|
791
|
+
nonstationarity: perform non-stationarity correction.
|
|
792
|
+
skew_nonstationarity: specify the skew parameter for empirical\
|
|
793
|
+
statistic calculation (default for this command is 1).
|
|
794
|
+
nshuffles_nonstationarity: the number of shuffles to use when\
|
|
795
|
+
precomputing the empirical statistic image for non-stationarity\
|
|
796
|
+
correction (default: 5000).
|
|
797
|
+
permutations_nonstationarity: manually define the permutations\
|
|
798
|
+
(relabelling) for computing the emprical statistics for\
|
|
799
|
+
non-stationarity correction. The input should be a text file defining a\
|
|
800
|
+
m x n matrix, where each relabelling is defined as a column vector of\
|
|
801
|
+
size m, and the number of columns, n, defines the number of\
|
|
802
|
+
permutations. Can be generated with the palm_quickperms function in\
|
|
803
|
+
PALM (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) Overrides the\
|
|
804
|
+
-nshuffles_nonstationarity option.
|
|
805
|
+
cfe_dh: the height increment used in the cfe integration (default: 0.1).
|
|
806
|
+
cfe_e: cfe extent exponent (default: 2).
|
|
807
|
+
cfe_h: cfe height exponent (default: 3).
|
|
808
|
+
cfe_c: cfe connectivity exponent (default: 0.5).
|
|
809
|
+
cfe_legacy: use the legacy (non-normalised) form of the cfe equation.
|
|
810
|
+
variance: define variance groups for the G-statistic; measurements for\
|
|
811
|
+
which the expected variance is equivalent should contain the same index.
|
|
812
|
+
ftests: perform F-tests; input text file should contain, for each\
|
|
813
|
+
F-test, a row containing ones and zeros, where ones indicate the rows\
|
|
814
|
+
of the contrast matrix to be included in the F-test.
|
|
815
|
+
fonly: only assess F-tests; do not perform statistical inference on\
|
|
816
|
+
entries in the contrast matrix.
|
|
817
|
+
column: add a column to the design matrix corresponding to subject\
|
|
818
|
+
fixel-wise values (note that the contrast matrix must include an\
|
|
819
|
+
additional column for each use of this option); the text file provided\
|
|
820
|
+
via this option should contain a file name for each subject.
|
|
821
|
+
info: display information messages.
|
|
822
|
+
quiet: do not display information messages or progress status;\
|
|
823
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
824
|
+
environment variable to a non-empty string.
|
|
825
|
+
debug: display debugging messages.
|
|
826
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
827
|
+
input and output might cause unexpected behaviour).
|
|
828
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
829
|
+
(set to 0 to disable multi-threading).
|
|
830
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
831
|
+
help_: display this information page and exit.
|
|
832
|
+
version: display version information and exit.
|
|
833
|
+
runner: Command runner.
|
|
834
|
+
Returns:
|
|
835
|
+
NamedTuple of outputs (described in `FixelcfestatsOutputs`).
|
|
836
|
+
"""
|
|
837
|
+
runner = runner or get_global_runner()
|
|
838
|
+
execution = runner.start_execution(FIXELCFESTATS_METADATA)
|
|
839
|
+
params = fixelcfestats_params(
|
|
840
|
+
mask=mask,
|
|
841
|
+
notest=notest,
|
|
842
|
+
errors=errors,
|
|
843
|
+
exchange_within=exchange_within,
|
|
844
|
+
exchange_whole=exchange_whole,
|
|
845
|
+
strong=strong,
|
|
846
|
+
nshuffles=nshuffles,
|
|
847
|
+
permutations=permutations,
|
|
848
|
+
nonstationarity=nonstationarity,
|
|
849
|
+
skew_nonstationarity=skew_nonstationarity,
|
|
850
|
+
nshuffles_nonstationarity=nshuffles_nonstationarity,
|
|
851
|
+
permutations_nonstationarity=permutations_nonstationarity,
|
|
852
|
+
cfe_dh=cfe_dh,
|
|
853
|
+
cfe_e=cfe_e,
|
|
854
|
+
cfe_h=cfe_h,
|
|
855
|
+
cfe_c=cfe_c,
|
|
856
|
+
cfe_legacy=cfe_legacy,
|
|
857
|
+
variance=variance,
|
|
858
|
+
ftests=ftests,
|
|
859
|
+
fonly=fonly,
|
|
860
|
+
column=column,
|
|
861
|
+
info=info,
|
|
862
|
+
quiet=quiet,
|
|
863
|
+
debug=debug,
|
|
864
|
+
force=force,
|
|
865
|
+
nthreads=nthreads,
|
|
866
|
+
config=config,
|
|
867
|
+
help_=help_,
|
|
868
|
+
version=version,
|
|
869
|
+
in_fixel_directory=in_fixel_directory,
|
|
870
|
+
subjects=subjects,
|
|
871
|
+
design=design,
|
|
872
|
+
contrast=contrast,
|
|
873
|
+
connectivity=connectivity,
|
|
874
|
+
out_fixel_directory=out_fixel_directory,
|
|
875
|
+
)
|
|
876
|
+
return fixelcfestats_execute(params, execution)
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
__all__ = [
|
|
880
|
+
"FIXELCFESTATS_METADATA",
|
|
881
|
+
"FixelcfestatsColumnParameters",
|
|
882
|
+
"FixelcfestatsConfigParameters",
|
|
883
|
+
"FixelcfestatsOutputs",
|
|
884
|
+
"FixelcfestatsParameters",
|
|
885
|
+
"FixelcfestatsVariousFileParameters",
|
|
886
|
+
"FixelcfestatsVariousStringParameters",
|
|
887
|
+
"fixelcfestats",
|
|
888
|
+
"fixelcfestats_column_params",
|
|
889
|
+
"fixelcfestats_config_params",
|
|
890
|
+
"fixelcfestats_params",
|
|
891
|
+
"fixelcfestats_various_file_params",
|
|
892
|
+
"fixelcfestats_various_string_params",
|
|
893
|
+
]
|