junifer 0.0.5__py3-none-any.whl → 0.0.5.dev11__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/__init__.py +0 -17
- junifer/_version.py +2 -2
- junifer/api/__init__.py +1 -4
- junifer/api/cli.py +1 -91
- junifer/api/decorators.py +0 -9
- junifer/api/functions.py +10 -56
- junifer/api/parser.py +0 -3
- junifer/api/queue_context/__init__.py +1 -4
- junifer/api/res/afni/run_afni_docker.sh +1 -1
- junifer/api/res/ants/run_ants_docker.sh +1 -1
- junifer/api/res/fsl/run_fsl_docker.sh +1 -1
- junifer/api/tests/test_api_utils.py +2 -4
- junifer/api/tests/test_cli.py +0 -83
- junifer/api/tests/test_functions.py +2 -27
- junifer/configs/__init__.py +1 -1
- junifer/configs/juseless/__init__.py +1 -4
- junifer/configs/juseless/datagrabbers/__init__.py +1 -10
- junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +0 -3
- junifer/configs/juseless/datagrabbers/camcan_vbm.py +0 -3
- junifer/configs/juseless/datagrabbers/ixi_vbm.py +0 -3
- junifer/configs/juseless/datagrabbers/tests/test_ucla.py +3 -1
- junifer/configs/juseless/datagrabbers/ucla.py +9 -12
- junifer/configs/juseless/datagrabbers/ukb_vbm.py +0 -3
- junifer/data/__init__.py +1 -21
- junifer/data/coordinates.py +19 -10
- junifer/data/masks.py +87 -58
- junifer/data/parcellations.py +3 -14
- junifer/data/template_spaces.py +1 -4
- junifer/data/tests/test_masks.py +37 -26
- junifer/data/utils.py +0 -3
- junifer/datagrabber/__init__.py +1 -18
- junifer/datagrabber/aomic/__init__.py +0 -3
- junifer/datagrabber/aomic/id1000.py +37 -70
- junifer/datagrabber/aomic/piop1.py +36 -69
- junifer/datagrabber/aomic/piop2.py +38 -71
- junifer/datagrabber/aomic/tests/test_id1000.py +99 -44
- junifer/datagrabber/aomic/tests/test_piop1.py +108 -65
- junifer/datagrabber/aomic/tests/test_piop2.py +102 -45
- junifer/datagrabber/base.py +6 -13
- junifer/datagrabber/datalad_base.py +1 -13
- junifer/datagrabber/dmcc13_benchmark.py +53 -36
- junifer/datagrabber/hcp1200/__init__.py +0 -3
- junifer/datagrabber/hcp1200/datalad_hcp1200.py +0 -3
- junifer/datagrabber/hcp1200/hcp1200.py +1 -4
- junifer/datagrabber/multiple.py +6 -45
- junifer/datagrabber/pattern.py +62 -170
- junifer/datagrabber/pattern_datalad.py +12 -25
- junifer/datagrabber/tests/test_datagrabber_utils.py +218 -0
- junifer/datagrabber/tests/test_datalad_base.py +4 -4
- junifer/datagrabber/tests/test_dmcc13_benchmark.py +19 -46
- junifer/datagrabber/tests/test_multiple.py +84 -161
- junifer/datagrabber/tests/test_pattern.py +0 -45
- junifer/datagrabber/tests/test_pattern_datalad.py +4 -4
- junifer/datagrabber/utils.py +230 -0
- junifer/datareader/__init__.py +1 -4
- junifer/datareader/default.py +43 -95
- junifer/external/__init__.py +1 -1
- junifer/external/nilearn/__init__.py +1 -5
- junifer/external/nilearn/junifer_nifti_spheres_masker.py +9 -23
- junifer/external/nilearn/tests/test_junifer_nifti_spheres_masker.py +1 -76
- junifer/markers/__init__.py +1 -23
- junifer/markers/base.py +28 -68
- junifer/markers/collection.py +2 -10
- junifer/markers/complexity/__init__.py +0 -10
- junifer/markers/complexity/complexity_base.py +43 -26
- junifer/markers/complexity/hurst_exponent.py +0 -3
- junifer/markers/complexity/multiscale_entropy_auc.py +0 -3
- junifer/markers/complexity/perm_entropy.py +0 -3
- junifer/markers/complexity/range_entropy.py +0 -3
- junifer/markers/complexity/range_entropy_auc.py +0 -3
- junifer/markers/complexity/sample_entropy.py +0 -3
- junifer/markers/complexity/tests/test_hurst_exponent.py +3 -11
- junifer/markers/complexity/tests/test_multiscale_entropy_auc.py +3 -11
- junifer/markers/complexity/tests/test_perm_entropy.py +3 -11
- junifer/markers/complexity/tests/test_range_entropy.py +3 -11
- junifer/markers/complexity/tests/test_range_entropy_auc.py +3 -11
- junifer/markers/complexity/tests/test_sample_entropy.py +3 -11
- junifer/markers/complexity/tests/test_weighted_perm_entropy.py +3 -11
- junifer/markers/complexity/weighted_perm_entropy.py +0 -3
- junifer/markers/ets_rss.py +42 -27
- junifer/markers/falff/__init__.py +0 -3
- junifer/markers/falff/_afni_falff.py +2 -5
- junifer/markers/falff/_junifer_falff.py +0 -3
- junifer/markers/falff/falff_base.py +46 -20
- junifer/markers/falff/falff_parcels.py +27 -56
- junifer/markers/falff/falff_spheres.py +29 -60
- junifer/markers/falff/tests/test_falff_parcels.py +23 -39
- junifer/markers/falff/tests/test_falff_spheres.py +23 -39
- junifer/markers/functional_connectivity/__init__.py +0 -9
- junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +60 -63
- junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +32 -45
- junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +36 -49
- junifer/markers/functional_connectivity/functional_connectivity_base.py +70 -71
- junifer/markers/functional_connectivity/functional_connectivity_parcels.py +25 -34
- junifer/markers/functional_connectivity/functional_connectivity_spheres.py +30 -40
- junifer/markers/functional_connectivity/tests/test_crossparcellation_functional_connectivity.py +7 -11
- junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +7 -27
- junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +12 -28
- junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +11 -35
- junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +62 -36
- junifer/markers/parcel_aggregation.py +61 -47
- junifer/markers/reho/__init__.py +0 -3
- junifer/markers/reho/_afni_reho.py +2 -5
- junifer/markers/reho/_junifer_reho.py +1 -4
- junifer/markers/reho/reho_base.py +27 -8
- junifer/markers/reho/reho_parcels.py +17 -28
- junifer/markers/reho/reho_spheres.py +18 -27
- junifer/markers/reho/tests/test_reho_parcels.py +3 -8
- junifer/markers/reho/tests/test_reho_spheres.py +3 -8
- junifer/markers/sphere_aggregation.py +59 -43
- junifer/markers/temporal_snr/__init__.py +0 -3
- junifer/markers/temporal_snr/temporal_snr_base.py +32 -23
- junifer/markers/temporal_snr/temporal_snr_parcels.py +6 -9
- junifer/markers/temporal_snr/temporal_snr_spheres.py +6 -9
- junifer/markers/temporal_snr/tests/test_temporal_snr_parcels.py +3 -6
- junifer/markers/temporal_snr/tests/test_temporal_snr_spheres.py +3 -6
- junifer/markers/tests/test_collection.py +8 -9
- junifer/markers/tests/test_ets_rss.py +9 -15
- junifer/markers/tests/test_markers_base.py +18 -17
- junifer/markers/tests/test_parcel_aggregation.py +32 -93
- junifer/markers/tests/test_sphere_aggregation.py +19 -72
- junifer/onthefly/__init__.py +1 -4
- junifer/onthefly/read_transform.py +0 -3
- junifer/pipeline/__init__.py +1 -9
- junifer/pipeline/pipeline_step_mixin.py +4 -21
- junifer/pipeline/registry.py +0 -3
- junifer/pipeline/singleton.py +0 -3
- junifer/pipeline/tests/test_registry.py +1 -1
- junifer/pipeline/update_meta_mixin.py +0 -3
- junifer/pipeline/utils.py +1 -67
- junifer/pipeline/workdir_manager.py +0 -3
- junifer/preprocess/__init__.py +2 -10
- 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 +3 -6
- junifer/preprocess/bold_warper.py +265 -0
- junifer/preprocess/confounds/__init__.py +0 -3
- junifer/preprocess/confounds/fmriprep_confound_remover.py +60 -47
- junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +113 -72
- 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/warping/__init__.py +0 -3
- junifer/preprocess/warping/_ants_warper.py +0 -3
- junifer/preprocess/warping/_fsl_warper.py +0 -3
- junifer/stats.py +1 -4
- junifer/storage/__init__.py +1 -9
- junifer/storage/base.py +1 -40
- junifer/storage/hdf5.py +9 -71
- junifer/storage/pandas_base.py +0 -3
- junifer/storage/sqlite.py +0 -3
- junifer/storage/tests/test_hdf5.py +10 -82
- junifer/storage/utils.py +0 -9
- junifer/testing/__init__.py +1 -4
- junifer/testing/datagrabbers.py +6 -13
- junifer/testing/tests/test_partlycloudytesting_datagrabber.py +7 -7
- junifer/testing/utils.py +0 -3
- junifer/utils/__init__.py +2 -13
- junifer/utils/fs.py +0 -3
- junifer/utils/helpers.py +1 -32
- junifer/utils/logging.py +4 -33
- junifer/utils/tests/test_logging.py +0 -8
- {junifer-0.0.5.dist-info → junifer-0.0.5.dev11.dist-info}/METADATA +16 -17
- junifer-0.0.5.dev11.dist-info/RECORD +259 -0
- {junifer-0.0.5.dist-info → junifer-0.0.5.dev11.dist-info}/WHEEL +1 -1
- junifer/api/res/freesurfer/mri_binarize +0 -3
- junifer/api/res/freesurfer/mri_mc +0 -3
- junifer/api/res/freesurfer/mri_pretess +0 -3
- junifer/api/res/freesurfer/mris_convert +0 -3
- junifer/api/res/freesurfer/run_freesurfer_docker.sh +0 -61
- junifer/data/masks/ukb/UKB_15K_GM_template.nii.gz +0 -0
- junifer/datagrabber/pattern_validation_mixin.py +0 -388
- junifer/datagrabber/tests/test_pattern_validation_mixin.py +0 -249
- junifer/external/BrainPrint/brainprint/__init__.py +0 -4
- junifer/external/BrainPrint/brainprint/_version.py +0 -3
- junifer/external/BrainPrint/brainprint/asymmetry.py +0 -91
- junifer/external/BrainPrint/brainprint/brainprint.py +0 -441
- junifer/external/BrainPrint/brainprint/surfaces.py +0 -258
- junifer/external/BrainPrint/brainprint/utils/__init__.py +0 -1
- junifer/external/BrainPrint/brainprint/utils/_config.py +0 -112
- junifer/external/BrainPrint/brainprint/utils/utils.py +0 -188
- junifer/external/nilearn/junifer_connectivity_measure.py +0 -483
- junifer/external/nilearn/tests/test_junifer_connectivity_measure.py +0 -1089
- junifer/markers/brainprint.py +0 -459
- junifer/markers/tests/test_brainprint.py +0 -58
- junifer/preprocess/smoothing/__init__.py +0 -9
- junifer/preprocess/smoothing/_afni_smoothing.py +0 -119
- junifer/preprocess/smoothing/_fsl_smoothing.py +0 -116
- junifer/preprocess/smoothing/_nilearn_smoothing.py +0 -69
- junifer/preprocess/smoothing/smoothing.py +0 -174
- junifer/preprocess/smoothing/tests/test_smoothing.py +0 -94
- junifer-0.0.5.dist-info/RECORD +0 -275
- {junifer-0.0.5.dist-info → junifer-0.0.5.dev11.dist-info}/AUTHORS.rst +0 -0
- {junifer-0.0.5.dist-info → junifer-0.0.5.dev11.dist-info}/LICENSE.md +0 -0
- {junifer-0.0.5.dist-info → junifer-0.0.5.dev11.dist-info}/entry_points.txt +0 -0
- {junifer-0.0.5.dist-info → junifer-0.0.5.dev11.dist-info}/top_level.txt +0 -0
@@ -16,9 +16,6 @@ from ...utils import raise_error
|
|
16
16
|
from ..pattern_datalad import PatternDataladDataGrabber
|
17
17
|
|
18
18
|
|
19
|
-
__all__ = ["DataladAOMICPIOP1"]
|
20
|
-
|
21
|
-
|
22
19
|
@register_datagrabber
|
23
20
|
class DataladAOMICPIOP1(PatternDataladDataGrabber):
|
24
21
|
"""Concrete implementation for pattern-based data fetching of AOMIC PIOP1.
|
@@ -29,8 +26,8 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
|
|
29
26
|
The directory where the datalad dataset will be cloned. If None,
|
30
27
|
the datalad dataset will be cloned into a temporary directory
|
31
28
|
(default None).
|
32
|
-
types: {"BOLD", "
|
33
|
-
"
|
29
|
+
types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \
|
30
|
+
"VBM_WM", "DWI"} or a list of the options, optional
|
34
31
|
AOMIC data types. If None, all available data types are selected.
|
35
32
|
(default None).
|
36
33
|
tasks : {"restingstate", "anticipation", "emomatching", "faces", \
|
@@ -87,22 +84,23 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
|
|
87
84
|
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
88
85
|
),
|
89
86
|
"space": "MNI152NLin2009cAsym",
|
90
|
-
"
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
"
|
97
|
-
|
98
|
-
"
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
"
|
105
|
-
|
87
|
+
"mask_item": "BOLD_mask",
|
88
|
+
},
|
89
|
+
"BOLD_confounds": {
|
90
|
+
"pattern": (
|
91
|
+
"derivatives/fmriprep/{subject}/func/"
|
92
|
+
"{subject}_task-{task}_"
|
93
|
+
"desc-confounds_regressors.tsv"
|
94
|
+
),
|
95
|
+
"format": "fmriprep",
|
96
|
+
},
|
97
|
+
"BOLD_mask": {
|
98
|
+
"pattern": (
|
99
|
+
"derivatives/fmriprep/{subject}/func/"
|
100
|
+
"{subject}_task-{task}_"
|
101
|
+
"space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
|
102
|
+
),
|
103
|
+
"space": "MNI152NLin2009cAsym",
|
106
104
|
},
|
107
105
|
"T1w": {
|
108
106
|
"pattern": (
|
@@ -111,14 +109,15 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
|
|
111
109
|
"desc-preproc_T1w.nii.gz"
|
112
110
|
),
|
113
111
|
"space": "MNI152NLin2009cAsym",
|
114
|
-
"
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
"
|
121
|
-
|
112
|
+
"mask_item": "T1w_mask",
|
113
|
+
},
|
114
|
+
"T1w_mask": {
|
115
|
+
"pattern": (
|
116
|
+
"derivatives/fmriprep/{subject}/anat/"
|
117
|
+
"{subject}_space-MNI152NLin2009cAsym_"
|
118
|
+
"desc-brain_mask.nii.gz"
|
119
|
+
),
|
120
|
+
"space": "MNI152NLin2009cAsym",
|
122
121
|
},
|
123
122
|
"VBM_CSF": {
|
124
123
|
"pattern": (
|
@@ -150,39 +149,6 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
|
|
150
149
|
"{subject}_desc-preproc_dwi.nii.gz"
|
151
150
|
),
|
152
151
|
},
|
153
|
-
"FreeSurfer": {
|
154
|
-
"pattern": "derivatives/freesurfer/[!f]{subject}/mri/T1.mg[z]",
|
155
|
-
"aseg": {
|
156
|
-
"pattern": (
|
157
|
-
"derivatives/freesurfer/[!f]{subject}/mri/aseg.mg[z]"
|
158
|
-
)
|
159
|
-
},
|
160
|
-
"norm": {
|
161
|
-
"pattern": (
|
162
|
-
"derivatives/freesurfer/[!f]{subject}/mri/norm.mg[z]"
|
163
|
-
)
|
164
|
-
},
|
165
|
-
"lh_white": {
|
166
|
-
"pattern": (
|
167
|
-
"derivatives/freesurfer/[!f]{subject}/surf/lh.whit[e]"
|
168
|
-
)
|
169
|
-
},
|
170
|
-
"rh_white": {
|
171
|
-
"pattern": (
|
172
|
-
"derivatives/freesurfer/[!f]{subject}/surf/rh.whit[e]"
|
173
|
-
)
|
174
|
-
},
|
175
|
-
"lh_pial": {
|
176
|
-
"pattern": (
|
177
|
-
"derivatives/freesurfer/[!f]{subject}/surf/lh.pia[l]"
|
178
|
-
)
|
179
|
-
},
|
180
|
-
"rh_pial": {
|
181
|
-
"pattern": (
|
182
|
-
"derivatives/freesurfer/[!f]{subject}/surf/rh.pia[l]"
|
183
|
-
)
|
184
|
-
},
|
185
|
-
},
|
186
152
|
}
|
187
153
|
# Use native T1w assets
|
188
154
|
self.native_t1w = False
|
@@ -196,13 +162,14 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
|
|
196
162
|
"{subject}_desc-preproc_T1w.nii.gz"
|
197
163
|
),
|
198
164
|
"space": "native",
|
199
|
-
"
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
"
|
205
|
-
|
165
|
+
"mask_item": "T1w_mask",
|
166
|
+
},
|
167
|
+
"T1w_mask": {
|
168
|
+
"pattern": (
|
169
|
+
"derivatives/fmriprep/{subject}/anat/"
|
170
|
+
"{subject}_desc-brain_mask.nii.gz"
|
171
|
+
),
|
172
|
+
"space": "native",
|
206
173
|
},
|
207
174
|
"Warp": {
|
208
175
|
"pattern": (
|
@@ -16,9 +16,6 @@ from ...utils import raise_error
|
|
16
16
|
from ..pattern_datalad import PatternDataladDataGrabber
|
17
17
|
|
18
18
|
|
19
|
-
__all__ = ["DataladAOMICPIOP2"]
|
20
|
-
|
21
|
-
|
22
19
|
@register_datagrabber
|
23
20
|
class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
24
21
|
"""Concrete implementation for pattern-based data fetching of AOMIC PIOP2.
|
@@ -29,12 +26,12 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
29
26
|
The directory where the datalad dataset will be cloned. If None,
|
30
27
|
the datalad dataset will be cloned into a temporary directory
|
31
28
|
(default None).
|
32
|
-
types: {"BOLD", "
|
33
|
-
"
|
29
|
+
types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \
|
30
|
+
"VBM_WM", "DWI"} or a list of the options, optional
|
34
31
|
AOMIC data types. If None, all available data types are selected.
|
35
32
|
(default None).
|
36
|
-
tasks : {"restingstate", "stopsignal", "workingmemory"}
|
37
|
-
list of the options, optional
|
33
|
+
tasks : {"restingstate", "stopsignal", "workingmemory"} \
|
34
|
+
or list of the options, optional
|
38
35
|
AOMIC PIOP2 task sessions. If None, all available task sessions are
|
39
36
|
selected (default None).
|
40
37
|
native_t1w : bool, optional
|
@@ -84,22 +81,23 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
84
81
|
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
85
82
|
),
|
86
83
|
"space": "MNI152NLin2009cAsym",
|
87
|
-
"
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
"
|
94
|
-
|
95
|
-
"
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
"
|
102
|
-
|
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",
|
103
101
|
},
|
104
102
|
"T1w": {
|
105
103
|
"pattern": (
|
@@ -108,14 +106,15 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
108
106
|
"desc-preproc_T1w.nii.gz"
|
109
107
|
),
|
110
108
|
"space": "MNI152NLin2009cAsym",
|
111
|
-
"
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
"
|
118
|
-
|
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",
|
119
118
|
},
|
120
119
|
"VBM_CSF": {
|
121
120
|
"pattern": (
|
@@ -147,39 +146,6 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
147
146
|
"{subject}_desc-preproc_dwi.nii.gz"
|
148
147
|
),
|
149
148
|
},
|
150
|
-
"FreeSurfer": {
|
151
|
-
"pattern": "derivatives/freesurfer/[!f]{subject}/mri/T1.mg[z]",
|
152
|
-
"aseg": {
|
153
|
-
"pattern": (
|
154
|
-
"derivatives/freesurfer/[!f]{subject}/mri/aseg.mg[z]"
|
155
|
-
)
|
156
|
-
},
|
157
|
-
"norm": {
|
158
|
-
"pattern": (
|
159
|
-
"derivatives/freesurfer/[!f]{subject}/mri/norm.mg[z]"
|
160
|
-
)
|
161
|
-
},
|
162
|
-
"lh_white": {
|
163
|
-
"pattern": (
|
164
|
-
"derivatives/freesurfer/[!f]{subject}/surf/lh.whit[e]"
|
165
|
-
)
|
166
|
-
},
|
167
|
-
"rh_white": {
|
168
|
-
"pattern": (
|
169
|
-
"derivatives/freesurfer/[!f]{subject}/surf/rh.whit[e]"
|
170
|
-
)
|
171
|
-
},
|
172
|
-
"lh_pial": {
|
173
|
-
"pattern": (
|
174
|
-
"derivatives/freesurfer/[!f]{subject}/surf/lh.pia[l]"
|
175
|
-
)
|
176
|
-
},
|
177
|
-
"rh_pial": {
|
178
|
-
"pattern": (
|
179
|
-
"derivatives/freesurfer/[!f]{subject}/surf/rh.pia[l]"
|
180
|
-
)
|
181
|
-
},
|
182
|
-
},
|
183
149
|
}
|
184
150
|
# Use native T1w assets
|
185
151
|
self.native_t1w = False
|
@@ -193,13 +159,14 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
|
|
193
159
|
"{subject}_desc-preproc_T1w.nii.gz"
|
194
160
|
),
|
195
161
|
"space": "native",
|
196
|
-
"
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
"
|
202
|
-
|
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",
|
203
170
|
},
|
204
171
|
"Warp": {
|
205
172
|
"pattern": (
|
@@ -7,7 +7,7 @@
|
|
7
7
|
# Synchon Mandal <s.mandal@fz-juelich.de>
|
8
8
|
# License: AGPL
|
9
9
|
|
10
|
-
from typing import List,
|
10
|
+
from typing import List, Union
|
11
11
|
|
12
12
|
import pytest
|
13
13
|
|
@@ -17,70 +17,125 @@ from junifer.datagrabber.aomic.id1000 import DataladAOMICID1000
|
|
17
17
|
URI = "https://gin.g-node.org/juaml/datalad-example-aomic1000"
|
18
18
|
|
19
19
|
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
("BOLD", ["confounds", "mask"]),
|
24
|
-
("T1w", ["mask"]),
|
25
|
-
("VBM_CSF", None),
|
26
|
-
("VBM_GM", None),
|
27
|
-
("VBM_WM", None),
|
28
|
-
("DWI", None),
|
29
|
-
("FreeSurfer", None),
|
30
|
-
],
|
31
|
-
)
|
32
|
-
def test_DataladAOMICID1000(
|
33
|
-
type_: str,
|
34
|
-
nested_types: Optional[List[str]],
|
35
|
-
) -> None:
|
36
|
-
"""Test DataladAOMICID1000 DataGrabber.
|
37
|
-
|
38
|
-
Parameters
|
39
|
-
----------
|
40
|
-
type_ : str
|
41
|
-
The parametrized type.
|
42
|
-
nested_types : list of str or None
|
43
|
-
The parametrized nested types.
|
44
|
-
|
45
|
-
"""
|
46
|
-
dg = DataladAOMICID1000(types=type_)
|
20
|
+
def test_DataladAOMICID1000() -> None:
|
21
|
+
"""Test DataladAOMICID1000 DataGrabber."""
|
22
|
+
dg = DataladAOMICID1000()
|
47
23
|
# Set URI to Gin
|
48
24
|
dg.uri = URI
|
49
25
|
|
50
26
|
with dg:
|
51
|
-
# Get all elements
|
52
27
|
all_elements = dg.get_elements()
|
53
|
-
# Get test element
|
54
28
|
test_element = all_elements[0]
|
55
|
-
|
29
|
+
|
56
30
|
out = dg[test_element]
|
57
|
-
|
58
|
-
|
59
|
-
assert
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
31
|
+
|
32
|
+
# asserts type "BOLD"
|
33
|
+
assert "BOLD" in out
|
34
|
+
|
35
|
+
assert (
|
36
|
+
out["BOLD"]["path"].name == f"{test_element}_task-moviewatching_"
|
37
|
+
"space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
|
38
|
+
)
|
39
|
+
|
40
|
+
assert out["BOLD"]["path"].exists()
|
41
|
+
assert out["BOLD"]["path"].is_file()
|
42
|
+
|
43
|
+
# asserts type "BOLD_confounds"
|
44
|
+
assert "BOLD_confounds" in out
|
45
|
+
|
46
|
+
assert (
|
47
|
+
out["BOLD_confounds"]["path"].name
|
48
|
+
== f"{test_element}_task-moviewatching_"
|
49
|
+
"desc-confounds_regressors.tsv"
|
50
|
+
)
|
51
|
+
|
52
|
+
assert out["BOLD_confounds"]["path"].exists()
|
53
|
+
assert out["BOLD_confounds"]["path"].is_file()
|
54
|
+
|
55
|
+
# assert BOLD_mask
|
56
|
+
assert out["BOLD_mask"]["path"].exists()
|
57
|
+
|
58
|
+
# asserts type "T1w"
|
59
|
+
assert "T1w" in out
|
60
|
+
|
61
|
+
assert (
|
62
|
+
out["T1w"]["path"].name
|
63
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_"
|
64
|
+
"desc-preproc_T1w.nii.gz"
|
65
|
+
)
|
66
|
+
|
67
|
+
assert out["T1w"]["path"].exists()
|
68
|
+
assert out["T1w"]["path"].is_file()
|
69
|
+
|
70
|
+
# asserts T1w_mask
|
71
|
+
assert out["T1w_mask"]["path"].exists()
|
72
|
+
|
73
|
+
# asserts type "VBM_CSF"
|
74
|
+
assert "VBM_CSF" in out
|
75
|
+
|
76
|
+
assert (
|
77
|
+
out["VBM_CSF"]["path"].name
|
78
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_label-"
|
79
|
+
"CSF_probseg.nii.gz"
|
80
|
+
)
|
81
|
+
|
82
|
+
assert out["VBM_CSF"]["path"].exists()
|
83
|
+
assert out["VBM_CSF"]["path"].is_file()
|
84
|
+
|
85
|
+
# asserts type "VBM_GM"
|
86
|
+
assert "VBM_GM" in out
|
87
|
+
|
88
|
+
assert (
|
89
|
+
out["VBM_GM"]["path"].name
|
90
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_label-"
|
91
|
+
"GM_probseg.nii.gz"
|
92
|
+
)
|
93
|
+
|
94
|
+
assert out["VBM_GM"]["path"].exists()
|
95
|
+
assert out["VBM_GM"]["path"].is_file()
|
96
|
+
|
97
|
+
# asserts type "VBM_WM"
|
98
|
+
assert "VBM_WM" in out
|
99
|
+
|
100
|
+
assert (
|
101
|
+
out["VBM_WM"]["path"].name
|
102
|
+
== f"{test_element}_space-MNI152NLin2009cAsym_label-"
|
103
|
+
"WM_probseg.nii.gz"
|
104
|
+
)
|
105
|
+
|
106
|
+
assert out["VBM_WM"]["path"].exists()
|
107
|
+
assert out["VBM_WM"]["path"].is_file()
|
108
|
+
|
109
|
+
# asserts type "DWI"
|
110
|
+
assert "DWI" in out
|
111
|
+
|
112
|
+
assert (
|
113
|
+
out["DWI"]["path"].name
|
114
|
+
== f"{test_element}_desc-preproc_dwi.nii.gz"
|
115
|
+
)
|
116
|
+
|
117
|
+
assert out["DWI"]["path"].exists()
|
118
|
+
assert out["DWI"]["path"].is_file()
|
119
|
+
|
120
|
+
# asserts meta
|
121
|
+
assert "meta" in out["BOLD"]
|
122
|
+
meta = out["BOLD"]["meta"]
|
64
123
|
assert "element" in meta
|
65
124
|
assert "subject" in meta["element"]
|
66
125
|
assert test_element == meta["element"]["subject"]
|
67
|
-
# Assert nested data type if not None
|
68
|
-
if nested_types is not None:
|
69
|
-
for nested_type in nested_types:
|
70
|
-
assert out[type_][nested_type]["path"].exists()
|
71
|
-
assert out[type_][nested_type]["path"].is_file()
|
72
126
|
|
73
127
|
|
74
128
|
@pytest.mark.parametrize(
|
75
129
|
"types",
|
76
130
|
[
|
77
131
|
"BOLD",
|
132
|
+
"BOLD_confounds",
|
78
133
|
"T1w",
|
79
134
|
"VBM_CSF",
|
80
135
|
"VBM_GM",
|
81
136
|
"VBM_WM",
|
82
137
|
"DWI",
|
83
|
-
["BOLD", "
|
138
|
+
["BOLD", "BOLD_confounds"],
|
84
139
|
["T1w", "VBM_CSF"],
|
85
140
|
["VBM_GM", "VBM_WM"],
|
86
141
|
["DWI", "BOLD"],
|