junifer 0.0.3.dev188__py3-none-any.whl → 0.0.4__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.
- junifer/_version.py +14 -2
- junifer/api/cli.py +162 -17
- junifer/api/functions.py +87 -419
- junifer/api/parser.py +24 -0
- junifer/api/queue_context/__init__.py +8 -0
- junifer/api/queue_context/gnu_parallel_local_adapter.py +258 -0
- junifer/api/queue_context/htcondor_adapter.py +365 -0
- junifer/api/queue_context/queue_context_adapter.py +60 -0
- junifer/api/queue_context/tests/test_gnu_parallel_local_adapter.py +192 -0
- junifer/api/queue_context/tests/test_htcondor_adapter.py +257 -0
- junifer/api/res/afni/run_afni_docker.sh +6 -6
- junifer/api/res/ants/ResampleImage +3 -0
- junifer/api/res/ants/antsApplyTransforms +3 -0
- junifer/api/res/ants/antsApplyTransformsToPoints +3 -0
- junifer/api/res/ants/run_ants_docker.sh +39 -0
- junifer/api/res/fsl/applywarp +3 -0
- junifer/api/res/fsl/flirt +3 -0
- junifer/api/res/fsl/img2imgcoord +3 -0
- junifer/api/res/fsl/run_fsl_docker.sh +39 -0
- junifer/api/res/fsl/std2imgcoord +3 -0
- junifer/api/res/run_conda.sh +4 -4
- junifer/api/res/run_venv.sh +22 -0
- junifer/api/tests/data/partly_cloudy_agg_mean_tian.yml +16 -0
- junifer/api/tests/test_api_utils.py +21 -3
- junifer/api/tests/test_cli.py +232 -9
- junifer/api/tests/test_functions.py +211 -439
- junifer/api/tests/test_parser.py +1 -1
- junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +6 -1
- junifer/configs/juseless/datagrabbers/camcan_vbm.py +6 -1
- junifer/configs/juseless/datagrabbers/ixi_vbm.py +6 -1
- junifer/configs/juseless/datagrabbers/tests/test_ucla.py +8 -8
- junifer/configs/juseless/datagrabbers/ucla.py +44 -26
- junifer/configs/juseless/datagrabbers/ukb_vbm.py +6 -1
- junifer/data/VOIs/meta/AutobiographicalMemory_VOIs.txt +23 -0
- junifer/data/VOIs/meta/Power2013_MNI_VOIs.tsv +264 -0
- junifer/data/__init__.py +4 -0
- junifer/data/coordinates.py +298 -31
- junifer/data/masks.py +360 -28
- junifer/data/parcellations.py +621 -188
- junifer/data/template_spaces.py +190 -0
- junifer/data/tests/test_coordinates.py +34 -3
- junifer/data/tests/test_data_utils.py +1 -0
- junifer/data/tests/test_masks.py +202 -86
- junifer/data/tests/test_parcellations.py +266 -55
- junifer/data/tests/test_template_spaces.py +104 -0
- junifer/data/utils.py +4 -2
- junifer/datagrabber/__init__.py +1 -0
- junifer/datagrabber/aomic/id1000.py +111 -70
- junifer/datagrabber/aomic/piop1.py +116 -53
- junifer/datagrabber/aomic/piop2.py +116 -53
- junifer/datagrabber/aomic/tests/test_id1000.py +27 -27
- junifer/datagrabber/aomic/tests/test_piop1.py +27 -27
- junifer/datagrabber/aomic/tests/test_piop2.py +27 -27
- junifer/datagrabber/base.py +62 -10
- junifer/datagrabber/datalad_base.py +0 -2
- junifer/datagrabber/dmcc13_benchmark.py +372 -0
- junifer/datagrabber/hcp1200/datalad_hcp1200.py +5 -0
- junifer/datagrabber/hcp1200/hcp1200.py +30 -13
- junifer/datagrabber/pattern.py +133 -27
- junifer/datagrabber/pattern_datalad.py +111 -13
- junifer/datagrabber/tests/test_base.py +57 -6
- junifer/datagrabber/tests/test_datagrabber_utils.py +204 -76
- junifer/datagrabber/tests/test_datalad_base.py +0 -6
- junifer/datagrabber/tests/test_dmcc13_benchmark.py +256 -0
- junifer/datagrabber/tests/test_multiple.py +43 -10
- junifer/datagrabber/tests/test_pattern.py +125 -178
- junifer/datagrabber/tests/test_pattern_datalad.py +44 -25
- junifer/datagrabber/utils.py +151 -16
- junifer/datareader/default.py +36 -10
- junifer/external/nilearn/junifer_nifti_spheres_masker.py +6 -0
- junifer/markers/base.py +25 -16
- junifer/markers/collection.py +35 -16
- junifer/markers/complexity/__init__.py +27 -0
- junifer/markers/complexity/complexity_base.py +149 -0
- junifer/markers/complexity/hurst_exponent.py +136 -0
- junifer/markers/complexity/multiscale_entropy_auc.py +140 -0
- junifer/markers/complexity/perm_entropy.py +132 -0
- junifer/markers/complexity/range_entropy.py +136 -0
- junifer/markers/complexity/range_entropy_auc.py +145 -0
- junifer/markers/complexity/sample_entropy.py +134 -0
- junifer/markers/complexity/tests/test_complexity_base.py +19 -0
- junifer/markers/complexity/tests/test_hurst_exponent.py +69 -0
- junifer/markers/complexity/tests/test_multiscale_entropy_auc.py +68 -0
- junifer/markers/complexity/tests/test_perm_entropy.py +68 -0
- junifer/markers/complexity/tests/test_range_entropy.py +69 -0
- junifer/markers/complexity/tests/test_range_entropy_auc.py +69 -0
- junifer/markers/complexity/tests/test_sample_entropy.py +68 -0
- junifer/markers/complexity/tests/test_weighted_perm_entropy.py +68 -0
- junifer/markers/complexity/weighted_perm_entropy.py +133 -0
- junifer/markers/falff/_afni_falff.py +153 -0
- junifer/markers/falff/_junifer_falff.py +142 -0
- junifer/markers/falff/falff_base.py +91 -84
- junifer/markers/falff/falff_parcels.py +61 -45
- junifer/markers/falff/falff_spheres.py +64 -48
- junifer/markers/falff/tests/test_falff_parcels.py +89 -121
- junifer/markers/falff/tests/test_falff_spheres.py +92 -127
- junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +1 -0
- junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +1 -0
- junifer/markers/functional_connectivity/functional_connectivity_base.py +1 -0
- junifer/markers/functional_connectivity/tests/test_crossparcellation_functional_connectivity.py +46 -44
- junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +34 -39
- junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +40 -52
- junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +62 -70
- junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +99 -85
- junifer/markers/parcel_aggregation.py +60 -38
- junifer/markers/reho/_afni_reho.py +192 -0
- junifer/markers/reho/_junifer_reho.py +281 -0
- junifer/markers/reho/reho_base.py +69 -34
- junifer/markers/reho/reho_parcels.py +26 -16
- junifer/markers/reho/reho_spheres.py +23 -9
- junifer/markers/reho/tests/test_reho_parcels.py +93 -92
- junifer/markers/reho/tests/test_reho_spheres.py +88 -86
- junifer/markers/sphere_aggregation.py +54 -9
- junifer/markers/temporal_snr/temporal_snr_base.py +1 -0
- junifer/markers/temporal_snr/tests/test_temporal_snr_parcels.py +38 -37
- junifer/markers/temporal_snr/tests/test_temporal_snr_spheres.py +34 -38
- junifer/markers/tests/test_collection.py +43 -42
- junifer/markers/tests/test_ets_rss.py +29 -37
- junifer/markers/tests/test_parcel_aggregation.py +587 -468
- junifer/markers/tests/test_sphere_aggregation.py +209 -157
- junifer/markers/utils.py +2 -40
- junifer/onthefly/read_transform.py +13 -6
- junifer/pipeline/__init__.py +1 -0
- junifer/pipeline/pipeline_step_mixin.py +105 -41
- junifer/pipeline/registry.py +17 -0
- junifer/pipeline/singleton.py +45 -0
- junifer/pipeline/tests/test_pipeline_step_mixin.py +139 -51
- junifer/pipeline/tests/test_update_meta_mixin.py +1 -0
- junifer/pipeline/tests/test_workdir_manager.py +104 -0
- junifer/pipeline/update_meta_mixin.py +8 -2
- junifer/pipeline/utils.py +154 -15
- junifer/pipeline/workdir_manager.py +246 -0
- junifer/preprocess/__init__.py +3 -0
- junifer/preprocess/ants/__init__.py +4 -0
- junifer/preprocess/ants/ants_apply_transforms_warper.py +185 -0
- junifer/preprocess/ants/tests/test_ants_apply_transforms_warper.py +56 -0
- junifer/preprocess/base.py +96 -69
- junifer/preprocess/bold_warper.py +265 -0
- junifer/preprocess/confounds/fmriprep_confound_remover.py +91 -134
- junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +106 -111
- junifer/preprocess/fsl/__init__.py +4 -0
- junifer/preprocess/fsl/apply_warper.py +179 -0
- junifer/preprocess/fsl/tests/test_apply_warper.py +45 -0
- junifer/preprocess/tests/test_bold_warper.py +159 -0
- junifer/preprocess/tests/test_preprocess_base.py +6 -6
- junifer/preprocess/warping/__init__.py +6 -0
- junifer/preprocess/warping/_ants_warper.py +167 -0
- junifer/preprocess/warping/_fsl_warper.py +109 -0
- junifer/preprocess/warping/space_warper.py +213 -0
- junifer/preprocess/warping/tests/test_space_warper.py +198 -0
- junifer/stats.py +18 -4
- junifer/storage/base.py +9 -1
- junifer/storage/hdf5.py +8 -3
- junifer/storage/pandas_base.py +2 -1
- junifer/storage/sqlite.py +1 -0
- junifer/storage/tests/test_hdf5.py +2 -1
- junifer/storage/tests/test_sqlite.py +8 -8
- junifer/storage/tests/test_utils.py +6 -6
- junifer/storage/utils.py +1 -0
- junifer/testing/datagrabbers.py +11 -7
- junifer/testing/utils.py +1 -0
- junifer/tests/test_stats.py +2 -0
- junifer/utils/__init__.py +1 -0
- junifer/utils/helpers.py +53 -0
- junifer/utils/logging.py +14 -3
- junifer/utils/tests/test_helpers.py +35 -0
- {junifer-0.0.3.dev188.dist-info → junifer-0.0.4.dist-info}/METADATA +59 -28
- junifer-0.0.4.dist-info/RECORD +257 -0
- {junifer-0.0.3.dev188.dist-info → junifer-0.0.4.dist-info}/WHEEL +1 -1
- junifer/markers/falff/falff_estimator.py +0 -334
- junifer/markers/falff/tests/test_falff_estimator.py +0 -238
- junifer/markers/reho/reho_estimator.py +0 -515
- junifer/markers/reho/tests/test_reho_estimator.py +0 -260
- junifer-0.0.3.dev188.dist-info/RECORD +0 -199
- {junifer-0.0.3.dev188.dist-info → junifer-0.0.4.dist-info}/AUTHORS.rst +0 -0
- {junifer-0.0.3.dev188.dist-info → junifer-0.0.4.dist-info}/LICENSE.md +0 -0
- {junifer-0.0.3.dev188.dist-info → junifer-0.0.4.dist-info}/entry_points.txt +0 -0
- {junifer-0.0.3.dev188.dist-info → junifer-0.0.4.dist-info}/top_level.txt +0 -0
@@ -26,14 +26,21 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
26
26
|
The directory where the datalad dataset will be cloned. If None,
|
27
27
|
the datalad dataset will be cloned into a temporary directory
|
28
28
|
(default None).
|
29
|
-
types: {"BOLD", "BOLD_confounds", "T1w", "
|
30
|
-
"
|
29
|
+
types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \
|
30
|
+
"VBM_WM", "DWI"} or a list of the options, optional
|
31
31
|
AOMIC data types. If None, all available data types are selected.
|
32
32
|
(default None).
|
33
33
|
tasks : {"restingstate", "stopsignal", "workingmemory"} \
|
34
34
|
or list of the options, optional
|
35
35
|
AOMIC PIOP2 task sessions. If None, all available task sessions are
|
36
36
|
selected (default None).
|
37
|
+
native_t1w : bool, optional
|
38
|
+
Whether to use T1w in native space (default False).
|
39
|
+
|
40
|
+
Raises
|
41
|
+
------
|
42
|
+
ValueError
|
43
|
+
If invalid value is passed for ``tasks``.
|
37
44
|
|
38
45
|
"""
|
39
46
|
|
@@ -42,6 +49,7 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
42
49
|
datadir: Union[str, Path, None] = None,
|
43
50
|
types: Union[str, List[str], None] = None,
|
44
51
|
tasks: Union[str, List[str], None] = None,
|
52
|
+
native_t1w: bool = False,
|
45
53
|
) -> None:
|
46
54
|
# Declare all tasks
|
47
55
|
all_tasks = [
|
@@ -66,51 +74,111 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
66
74
|
self.tasks = tasks
|
67
75
|
# The patterns
|
68
76
|
patterns = {
|
69
|
-
"BOLD":
|
70
|
-
"
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
"
|
76
|
-
"
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
"
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
"
|
93
|
-
|
94
|
-
"
|
95
|
-
"
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
"
|
101
|
-
"
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
77
|
+
"BOLD": {
|
78
|
+
"pattern": (
|
79
|
+
"derivatives/fmriprep/{subject}/func/"
|
80
|
+
"{subject}_task-{task}_"
|
81
|
+
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
82
|
+
),
|
83
|
+
"space": "MNI152NLin2009cAsym",
|
84
|
+
"mask_item": "BOLD_mask",
|
85
|
+
},
|
86
|
+
"BOLD_confounds": {
|
87
|
+
"pattern": (
|
88
|
+
"derivatives/fmriprep/{subject}/func/"
|
89
|
+
"{subject}_task-{task}_"
|
90
|
+
"desc-confounds_regressors.tsv"
|
91
|
+
),
|
92
|
+
"format": "fmriprep",
|
93
|
+
},
|
94
|
+
"BOLD_mask": {
|
95
|
+
"pattern": (
|
96
|
+
"derivatives/fmriprep/{subject}/func/"
|
97
|
+
"{subject}_task-{task}_"
|
98
|
+
"space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
|
99
|
+
),
|
100
|
+
"space": "MNI152NLin2009cAsym",
|
101
|
+
},
|
102
|
+
"T1w": {
|
103
|
+
"pattern": (
|
104
|
+
"derivatives/fmriprep/{subject}/anat/"
|
105
|
+
"{subject}_space-MNI152NLin2009cAsym_"
|
106
|
+
"desc-preproc_T1w.nii.gz"
|
107
|
+
),
|
108
|
+
"space": "MNI152NLin2009cAsym",
|
109
|
+
"mask_item": "T1w_mask",
|
110
|
+
},
|
111
|
+
"T1w_mask": {
|
112
|
+
"pattern": (
|
113
|
+
"derivatives/fmriprep/{subject}/anat/"
|
114
|
+
"{subject}_space-MNI152NLin2009cAsym_"
|
115
|
+
"desc-brain_mask.nii.gz"
|
116
|
+
),
|
117
|
+
"space": "MNI152NLin2009cAsym",
|
118
|
+
},
|
119
|
+
"VBM_CSF": {
|
120
|
+
"pattern": (
|
121
|
+
"derivatives/fmriprep/{subject}/anat/"
|
122
|
+
"{subject}_space-MNI152NLin2009cAsym_label-"
|
123
|
+
"CSF_probseg.nii.gz"
|
124
|
+
),
|
125
|
+
"space": "MNI152NLin2009cAsym",
|
126
|
+
},
|
127
|
+
"VBM_GM": {
|
128
|
+
"pattern": (
|
129
|
+
"derivatives/fmriprep/{subject}/anat/"
|
130
|
+
"{subject}_space-MNI152NLin2009cAsym_label-"
|
131
|
+
"GM_probseg.nii.gz"
|
132
|
+
),
|
133
|
+
"space": "MNI152NLin2009cAsym",
|
134
|
+
},
|
135
|
+
"VBM_WM": {
|
136
|
+
"pattern": (
|
137
|
+
"derivatives/fmriprep/{subject}/anat/"
|
138
|
+
"{subject}_space-MNI152NLin2009cAsym_label-"
|
139
|
+
"WM_probseg.nii.gz"
|
140
|
+
),
|
141
|
+
"space": "MNI152NLin2009cAsym",
|
142
|
+
},
|
143
|
+
"DWI": {
|
144
|
+
"pattern": (
|
145
|
+
"derivatives/dwipreproc/{subject}/dwi/"
|
146
|
+
"{subject}_desc-preproc_dwi.nii.gz"
|
147
|
+
),
|
148
|
+
},
|
113
149
|
}
|
150
|
+
# Use native T1w assets
|
151
|
+
self.native_t1w = False
|
152
|
+
if native_t1w:
|
153
|
+
self.native_t1w = True
|
154
|
+
patterns.update(
|
155
|
+
{
|
156
|
+
"T1w": {
|
157
|
+
"pattern": (
|
158
|
+
"derivatives/fmriprep/{subject}/anat/"
|
159
|
+
"{subject}_desc-preproc_T1w.nii.gz"
|
160
|
+
),
|
161
|
+
"space": "native",
|
162
|
+
"mask_item": "T1w_mask",
|
163
|
+
},
|
164
|
+
"T1w_mask": {
|
165
|
+
"pattern": (
|
166
|
+
"derivatives/fmriprep/{subject}/anat/"
|
167
|
+
"{subject}_desc-brain_mask.nii.gz"
|
168
|
+
),
|
169
|
+
"space": "native",
|
170
|
+
},
|
171
|
+
"Warp": {
|
172
|
+
"pattern": (
|
173
|
+
"derivatives/fmriprep/{subject}/anat/"
|
174
|
+
"{subject}_from-MNI152NLin2009cAsym_to-T1w_"
|
175
|
+
"mode-image_xfm.h5"
|
176
|
+
),
|
177
|
+
"src": "MNI152NLin2009cAsym",
|
178
|
+
"dst": "native",
|
179
|
+
},
|
180
|
+
}
|
181
|
+
)
|
114
182
|
# Set default types
|
115
183
|
if types is None:
|
116
184
|
types = list(patterns.keys())
|
@@ -140,7 +208,7 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
140
208
|
imposing constraints based on specified tasks.
|
141
209
|
|
142
210
|
"""
|
143
|
-
subjects = [f"{x:04d}" for x in range(1, 227)]
|
211
|
+
subjects = [f"sub-{x:04d}" for x in range(1, 227)]
|
144
212
|
elems = []
|
145
213
|
for subject, task in product(subjects, self.tasks):
|
146
214
|
elems.append((subject, task))
|
@@ -163,9 +231,4 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
163
231
|
specified element.
|
164
232
|
|
165
233
|
"""
|
166
|
-
|
167
|
-
if out.get("BOLD"):
|
168
|
-
out["BOLD"]["mask_item"] = "BOLD_mask"
|
169
|
-
if out.get("T1w"):
|
170
|
-
out["T1w"]["mask_item"] = "T1w_mask"
|
171
|
-
return out
|
234
|
+
return super().get_item(subject=subject, task=f"{task}_acq-seq")
|
@@ -34,7 +34,7 @@ def test_DataladAOMICID1000() -> None:
|
|
34
34
|
|
35
35
|
assert (
|
36
36
|
out["BOLD"]["path"].name
|
37
|
-
== f"
|
37
|
+
== f"{test_element}_task-moviewatching_"
|
38
38
|
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
39
39
|
)
|
40
40
|
|
@@ -46,7 +46,7 @@ def test_DataladAOMICID1000() -> None:
|
|
46
46
|
|
47
47
|
assert (
|
48
48
|
out["BOLD_confounds"]["path"].name
|
49
|
-
== f"
|
49
|
+
== f"{test_element}_task-moviewatching_"
|
50
50
|
"desc-confounds_regressors.tsv"
|
51
51
|
)
|
52
52
|
|
@@ -61,7 +61,7 @@ def test_DataladAOMICID1000() -> None:
|
|
61
61
|
|
62
62
|
assert (
|
63
63
|
out["T1w"]["path"].name
|
64
|
-
== f"
|
64
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_"
|
65
65
|
"desc-preproc_T1w.nii.gz"
|
66
66
|
)
|
67
67
|
|
@@ -71,48 +71,48 @@ def test_DataladAOMICID1000() -> None:
|
|
71
71
|
# asserts T1w_mask
|
72
72
|
assert out["T1w_mask"]["path"].exists()
|
73
73
|
|
74
|
-
# asserts type "
|
75
|
-
assert "
|
74
|
+
# asserts type "VBM_CSF"
|
75
|
+
assert "VBM_CSF" in out
|
76
76
|
|
77
77
|
assert (
|
78
|
-
out["
|
79
|
-
== f"
|
78
|
+
out["VBM_CSF"]["path"].name
|
79
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_label-"
|
80
80
|
"CSF_probseg.nii.gz"
|
81
81
|
)
|
82
82
|
|
83
|
-
assert out["
|
84
|
-
assert out["
|
83
|
+
assert out["VBM_CSF"]["path"].exists()
|
84
|
+
assert out["VBM_CSF"]["path"].is_file()
|
85
85
|
|
86
|
-
# asserts type "
|
87
|
-
assert "
|
86
|
+
# asserts type "VBM_GM"
|
87
|
+
assert "VBM_GM" in out
|
88
88
|
|
89
89
|
assert (
|
90
|
-
out["
|
91
|
-
== f"
|
90
|
+
out["VBM_GM"]["path"].name
|
91
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_label-"
|
92
92
|
"GM_probseg.nii.gz"
|
93
93
|
)
|
94
94
|
|
95
|
-
assert out["
|
96
|
-
assert out["
|
95
|
+
assert out["VBM_GM"]["path"].exists()
|
96
|
+
assert out["VBM_GM"]["path"].is_file()
|
97
97
|
|
98
|
-
# asserts type "
|
99
|
-
assert "
|
98
|
+
# asserts type "VBM_WM"
|
99
|
+
assert "VBM_WM" in out
|
100
100
|
|
101
101
|
assert (
|
102
|
-
out["
|
103
|
-
== f"
|
102
|
+
out["VBM_WM"]["path"].name
|
103
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_label-"
|
104
104
|
"WM_probseg.nii.gz"
|
105
105
|
)
|
106
106
|
|
107
|
-
assert out["
|
108
|
-
assert out["
|
107
|
+
assert out["VBM_WM"]["path"].exists()
|
108
|
+
assert out["VBM_WM"]["path"].is_file()
|
109
109
|
|
110
110
|
# asserts type "DWI"
|
111
111
|
assert "DWI" in out
|
112
112
|
|
113
113
|
assert (
|
114
114
|
out["DWI"]["path"].name
|
115
|
-
== f"
|
115
|
+
== f"{test_element}_desc-preproc_dwi.nii.gz"
|
116
116
|
)
|
117
117
|
|
118
118
|
assert out["DWI"]["path"].exists()
|
@@ -132,13 +132,13 @@ def test_DataladAOMICID1000() -> None:
|
|
132
132
|
"BOLD",
|
133
133
|
"BOLD_confounds",
|
134
134
|
"T1w",
|
135
|
-
"
|
136
|
-
"
|
137
|
-
"
|
135
|
+
"VBM_CSF",
|
136
|
+
"VBM_GM",
|
137
|
+
"VBM_WM",
|
138
138
|
"DWI",
|
139
139
|
["BOLD", "BOLD_confounds"],
|
140
|
-
["T1w", "
|
141
|
-
["
|
140
|
+
["T1w", "VBM_CSF"],
|
141
|
+
["VBM_GM", "VBM_WM"],
|
142
142
|
["DWI", "BOLD"],
|
143
143
|
],
|
144
144
|
)
|
@@ -56,7 +56,7 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None:
|
|
56
56
|
acq = task_acqs[task]
|
57
57
|
new_task = f"{task}_acq-{acq}"
|
58
58
|
assert (
|
59
|
-
out["BOLD"]["path"].name == f"
|
59
|
+
out["BOLD"]["path"].name == f"{sub}_task-{new_task}_"
|
60
60
|
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
61
61
|
)
|
62
62
|
|
@@ -67,7 +67,7 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None:
|
|
67
67
|
assert "BOLD_confounds" in out
|
68
68
|
|
69
69
|
assert (
|
70
|
-
out["BOLD_confounds"]["path"].name == f"
|
70
|
+
out["BOLD_confounds"]["path"].name == f"{sub}_task-{new_task}_"
|
71
71
|
"desc-confounds_regressors.tsv"
|
72
72
|
)
|
73
73
|
|
@@ -81,7 +81,7 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None:
|
|
81
81
|
assert "T1w" in out
|
82
82
|
|
83
83
|
assert (
|
84
|
-
out["T1w"]["path"].name == f"
|
84
|
+
out["T1w"]["path"].name == f"{sub}_space-MNI152NLin2009cAsym_"
|
85
85
|
"desc-preproc_T1w.nii.gz"
|
86
86
|
)
|
87
87
|
|
@@ -91,46 +91,46 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None:
|
|
91
91
|
# asserts T1w_mask
|
92
92
|
assert out["T1w_mask"]["path"].exists()
|
93
93
|
|
94
|
-
# asserts type "
|
95
|
-
assert "
|
94
|
+
# asserts type "VBM_CSF"
|
95
|
+
assert "VBM_CSF" in out
|
96
96
|
|
97
97
|
assert (
|
98
|
-
out["
|
99
|
-
== f"
|
98
|
+
out["VBM_CSF"]["path"].name
|
99
|
+
== f"{sub}_space-MNI152NLin2009cAsym_label-"
|
100
100
|
"CSF_probseg.nii.gz"
|
101
101
|
)
|
102
102
|
|
103
|
-
assert out["
|
104
|
-
assert out["
|
103
|
+
assert out["VBM_CSF"]["path"].exists()
|
104
|
+
assert out["VBM_CSF"]["path"].is_file()
|
105
105
|
|
106
|
-
# asserts type "
|
107
|
-
assert "
|
106
|
+
# asserts type "VBM_GM"
|
107
|
+
assert "VBM_GM" in out
|
108
108
|
|
109
109
|
assert (
|
110
|
-
out["
|
111
|
-
== f"
|
110
|
+
out["VBM_GM"]["path"].name
|
111
|
+
== f"{sub}_space-MNI152NLin2009cAsym_label-"
|
112
112
|
"GM_probseg.nii.gz"
|
113
113
|
)
|
114
114
|
|
115
|
-
assert out["
|
116
|
-
assert out["
|
115
|
+
assert out["VBM_GM"]["path"].exists()
|
116
|
+
assert out["VBM_GM"]["path"].is_file()
|
117
117
|
|
118
|
-
# asserts type "
|
119
|
-
assert "
|
118
|
+
# asserts type "VBM_WM"
|
119
|
+
assert "VBM_WM" in out
|
120
120
|
|
121
121
|
assert (
|
122
|
-
out["
|
123
|
-
== f"
|
122
|
+
out["VBM_WM"]["path"].name
|
123
|
+
== f"{sub}_space-MNI152NLin2009cAsym_label-"
|
124
124
|
"WM_probseg.nii.gz"
|
125
125
|
)
|
126
126
|
|
127
|
-
assert out["
|
128
|
-
assert out["
|
127
|
+
assert out["VBM_WM"]["path"].exists()
|
128
|
+
assert out["VBM_WM"]["path"].is_file()
|
129
129
|
|
130
130
|
# asserts type "DWI"
|
131
131
|
assert "DWI" in out
|
132
132
|
|
133
|
-
assert out["DWI"]["path"].name == f"
|
133
|
+
assert out["DWI"]["path"].name == f"{sub}_desc-preproc_dwi.nii.gz"
|
134
134
|
|
135
135
|
assert out["DWI"]["path"].exists()
|
136
136
|
assert out["DWI"]["path"].is_file()
|
@@ -149,13 +149,13 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None:
|
|
149
149
|
"BOLD",
|
150
150
|
"BOLD_confounds",
|
151
151
|
"T1w",
|
152
|
-
"
|
153
|
-
"
|
154
|
-
"
|
152
|
+
"VBM_CSF",
|
153
|
+
"VBM_GM",
|
154
|
+
"VBM_WM",
|
155
155
|
"DWI",
|
156
156
|
["BOLD", "BOLD_confounds"],
|
157
|
-
["T1w", "
|
158
|
-
["
|
157
|
+
["T1w", "VBM_CSF"],
|
158
|
+
["VBM_GM", "VBM_WM"],
|
159
159
|
["DWI", "BOLD"],
|
160
160
|
],
|
161
161
|
)
|
@@ -50,7 +50,7 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None:
|
|
50
50
|
|
51
51
|
new_task = f"{task}_acq-seq"
|
52
52
|
assert (
|
53
|
-
out["BOLD"]["path"].name == f"
|
53
|
+
out["BOLD"]["path"].name == f"{sub}_task-{new_task}_"
|
54
54
|
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
55
55
|
)
|
56
56
|
|
@@ -61,7 +61,7 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None:
|
|
61
61
|
assert "BOLD_confounds" in out
|
62
62
|
|
63
63
|
assert (
|
64
|
-
out["BOLD_confounds"]["path"].name == f"
|
64
|
+
out["BOLD_confounds"]["path"].name == f"{sub}_task-{new_task}_"
|
65
65
|
"desc-confounds_regressors.tsv"
|
66
66
|
)
|
67
67
|
|
@@ -75,7 +75,7 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None:
|
|
75
75
|
assert "T1w" in out
|
76
76
|
|
77
77
|
assert (
|
78
|
-
out["T1w"]["path"].name == f"
|
78
|
+
out["T1w"]["path"].name == f"{sub}_space-MNI152NLin2009cAsym_"
|
79
79
|
"desc-preproc_T1w.nii.gz"
|
80
80
|
)
|
81
81
|
|
@@ -85,46 +85,46 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None:
|
|
85
85
|
# asserts T1w_mask
|
86
86
|
assert out["T1w_mask"]["path"].exists()
|
87
87
|
|
88
|
-
# asserts type "
|
89
|
-
assert "
|
88
|
+
# asserts type "VBM_CSF"
|
89
|
+
assert "VBM_CSF" in out
|
90
90
|
|
91
91
|
assert (
|
92
|
-
out["
|
93
|
-
== f"
|
92
|
+
out["VBM_CSF"]["path"].name
|
93
|
+
== f"{sub}_space-MNI152NLin2009cAsym_label-"
|
94
94
|
"CSF_probseg.nii.gz"
|
95
95
|
)
|
96
96
|
|
97
|
-
assert out["
|
98
|
-
assert out["
|
97
|
+
assert out["VBM_CSF"]["path"].exists()
|
98
|
+
assert out["VBM_CSF"]["path"].is_file()
|
99
99
|
|
100
|
-
# asserts type "
|
101
|
-
assert "
|
100
|
+
# asserts type "VBM_GM"
|
101
|
+
assert "VBM_GM" in out
|
102
102
|
|
103
103
|
assert (
|
104
|
-
out["
|
105
|
-
== f"
|
104
|
+
out["VBM_GM"]["path"].name
|
105
|
+
== f"{sub}_space-MNI152NLin2009cAsym_label-"
|
106
106
|
"GM_probseg.nii.gz"
|
107
107
|
)
|
108
108
|
|
109
|
-
assert out["
|
110
|
-
assert out["
|
109
|
+
assert out["VBM_GM"]["path"].exists()
|
110
|
+
assert out["VBM_GM"]["path"].is_file()
|
111
111
|
|
112
|
-
# asserts type "
|
113
|
-
assert "
|
112
|
+
# asserts type "VBM_WM"
|
113
|
+
assert "VBM_WM" in out
|
114
114
|
|
115
115
|
assert (
|
116
|
-
out["
|
117
|
-
== f"
|
116
|
+
out["VBM_WM"]["path"].name
|
117
|
+
== f"{sub}_space-MNI152NLin2009cAsym_label-"
|
118
118
|
"WM_probseg.nii.gz"
|
119
119
|
)
|
120
120
|
|
121
|
-
assert out["
|
122
|
-
assert out["
|
121
|
+
assert out["VBM_WM"]["path"].exists()
|
122
|
+
assert out["VBM_WM"]["path"].is_file()
|
123
123
|
|
124
124
|
# asserts type "DWI"
|
125
125
|
assert "DWI" in out
|
126
126
|
|
127
|
-
assert out["DWI"]["path"].name == f"
|
127
|
+
assert out["DWI"]["path"].name == f"{sub}_desc-preproc_dwi.nii.gz"
|
128
128
|
|
129
129
|
assert out["DWI"]["path"].exists()
|
130
130
|
assert out["DWI"]["path"].is_file()
|
@@ -143,13 +143,13 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None:
|
|
143
143
|
"BOLD",
|
144
144
|
"BOLD_confounds",
|
145
145
|
"T1w",
|
146
|
-
"
|
147
|
-
"
|
148
|
-
"
|
146
|
+
"VBM_CSF",
|
147
|
+
"VBM_GM",
|
148
|
+
"VBM_WM",
|
149
149
|
"DWI",
|
150
150
|
["BOLD", "BOLD_confounds"],
|
151
|
-
["T1w", "
|
152
|
-
["
|
151
|
+
["T1w", "VBM_CSF"],
|
152
|
+
["VBM_GM", "VBM_WM"],
|
153
153
|
["DWI", "BOLD"],
|
154
154
|
],
|
155
155
|
)
|