junifer 0.0.6.dev302__py3-none-any.whl → 0.0.6.dev311__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 CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.6.dev302'
16
- __version_tuple__ = version_tuple = (0, 0, 6, 'dev302')
15
+ __version__ = version = '0.0.6.dev311'
16
+ __version_tuple__ = version_tuple = (0, 0, 6, 'dev311')
@@ -11,6 +11,7 @@ from pathlib import Path
11
11
  from typing import Union
12
12
 
13
13
  from ...api.decorators import register_datagrabber
14
+ from ...utils import raise_error
14
15
  from ..pattern_datalad import PatternDataladDataGrabber
15
16
 
16
17
 
@@ -31,8 +32,8 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
31
32
  "FreeSurfer"} or list of the options, optional
32
33
  AOMIC data types. If None, all available data types are selected.
33
34
  (default None).
34
- native_t1w : bool, optional
35
- Whether to use T1w in native space (default False).
35
+ space : {"native", "MNI152NLin2009cAsym"}, optional
36
+ The space to use for the data (default "MNI152NLin2009cAsym").
36
37
 
37
38
  """
38
39
 
@@ -40,25 +41,40 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
40
41
  self,
41
42
  datadir: Union[str, Path, None] = None,
42
43
  types: Union[str, list[str], None] = None,
43
- native_t1w: bool = False,
44
+ space: str = "MNI152NLin2009cAsym",
44
45
  ) -> None:
46
+ valid_spaces = ["native", "MNI152NLin2009cAsym"]
47
+ if space not in ["native", "MNI152NLin2009cAsym"]:
48
+ raise_error(
49
+ f"Invalid space {space}. Must be one of {valid_spaces}"
50
+ )
51
+
52
+ # Descriptor for space in `anat`
53
+ sp_anat_desc = (
54
+ "" if space == "native" else "space-MNI152NLin2009cAsym_"
55
+ )
56
+ # Descriptor for space in `func`
57
+ sp_func_desc = (
58
+ "space-T1w_" if space == "native" else "space-MNI152NLin2009cAsym_"
59
+ )
45
60
  # The patterns
46
61
  patterns = {
47
62
  "BOLD": {
48
63
  "pattern": (
49
64
  "derivatives/fmriprep/{subject}/func/"
50
65
  "{subject}_task-moviewatching_"
51
- "space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
66
+ f"{sp_func_desc}"
67
+ "desc-preproc_bold.nii.gz"
52
68
  ),
53
- "space": "MNI152NLin2009cAsym",
69
+ "space": space,
54
70
  "mask": {
55
71
  "pattern": (
56
72
  "derivatives/fmriprep/{subject}/func/"
57
73
  "{subject}_task-moviewatching_"
58
- "space-MNI152NLin2009cAsym_"
74
+ f"{sp_func_desc}"
59
75
  "desc-brain_mask.nii.gz"
60
76
  ),
61
- "space": "MNI152NLin2009cAsym",
77
+ "space": space,
62
78
  },
63
79
  "confounds": {
64
80
  "pattern": (
@@ -68,46 +84,59 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
68
84
  ),
69
85
  "format": "fmriprep",
70
86
  },
87
+ "reference": {
88
+ "pattern": (
89
+ "derivatives/fmriprep/{subject}/func/"
90
+ "{subject}_task-moviewatching_"
91
+ f"{sp_func_desc}"
92
+ "boldref.nii.gz"
93
+ ),
94
+ },
71
95
  },
72
96
  "T1w": {
73
97
  "pattern": (
74
98
  "derivatives/fmriprep/{subject}/anat/"
75
- "{subject}_space-MNI152NLin2009cAsym_"
99
+ "{subject}_"
100
+ f"{sp_anat_desc}"
76
101
  "desc-preproc_T1w.nii.gz"
77
102
  ),
78
- "space": "MNI152NLin2009cAsym",
103
+ "space": space,
79
104
  "mask": {
80
105
  "pattern": (
81
106
  "derivatives/fmriprep/{subject}/anat/"
82
- "{subject}_space-MNI152NLin2009cAsym_"
107
+ "{subject}_"
108
+ f"{sp_anat_desc}"
83
109
  "desc-brain_mask.nii.gz"
84
110
  ),
85
- "space": "MNI152NLin2009cAsym",
111
+ "space": space,
86
112
  },
87
113
  },
88
114
  "VBM_CSF": {
89
115
  "pattern": (
90
116
  "derivatives/fmriprep/{subject}/anat/"
91
- "{subject}_space-MNI152NLin2009cAsym_label-"
92
- "CSF_probseg.nii.gz"
117
+ "{subject}_"
118
+ f"{sp_anat_desc}"
119
+ "label-CSF_probseg.nii.gz"
93
120
  ),
94
- "space": "MNI152NLin2009cAsym",
121
+ "space": space,
95
122
  },
96
123
  "VBM_GM": {
97
124
  "pattern": (
98
125
  "derivatives/fmriprep/{subject}/anat/"
99
- "{subject}_space-MNI152NLin2009cAsym_label-"
100
- "GM_probseg.nii.gz"
126
+ "{subject}_"
127
+ f"{sp_anat_desc}"
128
+ "label-GM_probseg.nii.gz"
101
129
  ),
102
- "space": "MNI152NLin2009cAsym",
130
+ "space": space,
103
131
  },
104
132
  "VBM_WM": {
105
133
  "pattern": (
106
134
  "derivatives/fmriprep/{subject}/anat/"
107
- "{subject}_space-MNI152NLin2009cAsym_label-"
108
- "WM_probseg.nii.gz"
135
+ "{subject}_"
136
+ f"{sp_anat_desc}"
137
+ "label-WM_probseg.nii.gz"
109
138
  ),
110
- "space": "MNI152NLin2009cAsym",
139
+ "space": space,
111
140
  },
112
141
  "DWI": {
113
142
  "pattern": (
@@ -148,51 +177,38 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
148
177
  )
149
178
  },
150
179
  },
180
+ "Warp": [
181
+ {
182
+ "pattern": (
183
+ "derivatives/fmriprep/{subject}/anat/"
184
+ "{subject}_from-MNI152NLin2009cAsym_to-T1w_"
185
+ "mode-image_xfm.h5"
186
+ ),
187
+ "src": "MNI152NLin2009cAsym",
188
+ "dst": "native",
189
+ "warper": "ants",
190
+ },
191
+ {
192
+ "pattern": (
193
+ "derivatives/fmriprep/{subject}/anat/"
194
+ "{subject}_from-T1w_to-MNI152NLin2009cAsym_"
195
+ "mode-image_xfm.h5"
196
+ ),
197
+ "src": "native",
198
+ "dst": "MNI152NLin2009cAsym",
199
+ "warper": "ants",
200
+ },
201
+ ],
151
202
  }
203
+ if space == "native":
204
+ patterns["BOLD"]["prewarp_space"] = "MNI152NLin2009cAsym"
205
+
206
+ else:
207
+ patterns["BOLD"]["prewarp_space"] = "native"
208
+
152
209
  # Use native T1w assets
153
- self.native_t1w = False
154
- if native_t1w:
155
- self.native_t1w = True
156
- patterns.update(
157
- {
158
- "T1w": {
159
- "pattern": (
160
- "derivatives/fmriprep/{subject}/anat/"
161
- "{subject}_desc-preproc_T1w.nii.gz"
162
- ),
163
- "space": "native",
164
- "mask": {
165
- "pattern": (
166
- "derivatives/fmriprep/{subject}/anat/"
167
- "{subject}_desc-brain_mask.nii.gz"
168
- ),
169
- "space": "native",
170
- },
171
- },
172
- "Warp": [
173
- {
174
- "pattern": (
175
- "derivatives/fmriprep/{subject}/anat/"
176
- "{subject}_from-MNI152NLin2009cAsym_to-T1w_"
177
- "mode-image_xfm.h5"
178
- ),
179
- "src": "MNI152NLin2009cAsym",
180
- "dst": "native",
181
- "warper": "ants",
182
- },
183
- {
184
- "pattern": (
185
- "derivatives/fmriprep/{subject}/anat/"
186
- "{subject}_from-T1w_to-MNI152NLin2009cAsym_"
187
- "mode-image_xfm.h5"
188
- ),
189
- "src": "native",
190
- "dst": "MNI152NLin2009cAsym",
191
- "warper": "ants",
192
- },
193
- ],
194
- }
195
- )
210
+ self.space = space
211
+
196
212
  # Set default types
197
213
  if types is None:
198
214
  types = list(patterns.keys())
@@ -37,8 +37,8 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
37
37
  "gstroop", "workingmemory"} or list of the options, optional
38
38
  AOMIC PIOP1 task sessions. If None, all available task sessions are
39
39
  selected (default None).
40
- native_t1w : bool, optional
41
- Whether to use T1w in native space (default False).
40
+ space : {"native", "MNI152NLin2009cAsym"}, optional
41
+ The space to use for the data (default "MNI152NLin2009cAsym").
42
42
 
43
43
  Raises
44
44
  ------
@@ -52,8 +52,13 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
52
52
  datadir: Union[str, Path, None] = None,
53
53
  types: Union[str, list[str], None] = None,
54
54
  tasks: Union[str, list[str], None] = None,
55
- native_t1w: bool = False,
55
+ space: str = "MNI152NLin2009cAsym",
56
56
  ) -> None:
57
+ valid_spaces = ["native", "MNI152NLin2009cAsym"]
58
+ if space not in ["native", "MNI152NLin2009cAsym"]:
59
+ raise_error(
60
+ f"Invalid space {space}. Must be one of {valid_spaces}"
61
+ )
57
62
  # Declare all tasks
58
63
  all_tasks = [
59
64
  "restingstate",
@@ -78,22 +83,32 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
78
83
  " dataset!"
79
84
  )
80
85
  self.tasks = tasks
86
+ # Descriptor for space in `anat`
87
+ sp_anat_desc = (
88
+ "" if space == "native" else "space-MNI152NLin2009cAsym_"
89
+ )
90
+ # Descriptor for space in `func`
91
+ sp_func_desc = (
92
+ "space-T1w_" if space == "native" else "space-MNI152NLin2009cAsym_"
93
+ )
81
94
  # The patterns
82
95
  patterns = {
83
96
  "BOLD": {
84
97
  "pattern": (
85
98
  "derivatives/fmriprep/{subject}/func/"
86
99
  "{subject}_task-{task}_"
87
- "space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
100
+ f"{sp_func_desc}"
101
+ "desc-preproc_bold.nii.gz"
88
102
  ),
89
- "space": "MNI152NLin2009cAsym",
103
+ "space": space,
90
104
  "mask": {
91
105
  "pattern": (
92
106
  "derivatives/fmriprep/{subject}/func/"
93
107
  "{subject}_task-{task}_"
94
- "space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
108
+ f"{sp_func_desc}"
109
+ "desc-brain_mask.nii.gz"
95
110
  ),
96
- "space": "MNI152NLin2009cAsym",
111
+ "space": space,
97
112
  },
98
113
  "confounds": {
99
114
  "pattern": (
@@ -103,46 +118,59 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
103
118
  ),
104
119
  "format": "fmriprep",
105
120
  },
121
+ "reference": {
122
+ "pattern": (
123
+ "derivatives/fmriprep/{subject}/func/"
124
+ "{subject}_task-{task}_"
125
+ f"{sp_func_desc}"
126
+ "boldref.nii.gz"
127
+ ),
128
+ },
106
129
  },
107
130
  "T1w": {
108
131
  "pattern": (
109
132
  "derivatives/fmriprep/{subject}/anat/"
110
- "{subject}_space-MNI152NLin2009cAsym_"
133
+ "{subject}_"
134
+ f"{sp_anat_desc}"
111
135
  "desc-preproc_T1w.nii.gz"
112
136
  ),
113
- "space": "MNI152NLin2009cAsym",
137
+ "space": space,
114
138
  "mask": {
115
139
  "pattern": (
116
140
  "derivatives/fmriprep/{subject}/anat/"
117
- "{subject}_space-MNI152NLin2009cAsym_"
141
+ "{subject}_"
142
+ f"{sp_anat_desc}"
118
143
  "desc-brain_mask.nii.gz"
119
144
  ),
120
- "space": "MNI152NLin2009cAsym",
145
+ "space": space,
121
146
  },
122
147
  },
123
148
  "VBM_CSF": {
124
149
  "pattern": (
125
150
  "derivatives/fmriprep/{subject}/anat/"
126
- "{subject}_space-MNI152NLin2009cAsym_label-"
127
- "CSF_probseg.nii.gz"
151
+ "{subject}_"
152
+ f"{sp_anat_desc}"
153
+ "label-CSF_probseg.nii.gz"
128
154
  ),
129
- "space": "MNI152NLin2009cAsym",
155
+ "space": space,
130
156
  },
131
157
  "VBM_GM": {
132
158
  "pattern": (
133
159
  "derivatives/fmriprep/{subject}/anat/"
134
- "{subject}_space-MNI152NLin2009cAsym_label-"
135
- "GM_probseg.nii.gz"
160
+ "{subject}_"
161
+ f"{sp_anat_desc}"
162
+ "label-GM_probseg.nii.gz"
136
163
  ),
137
- "space": "MNI152NLin2009cAsym",
164
+ "space": space,
138
165
  },
139
166
  "VBM_WM": {
140
167
  "pattern": (
141
168
  "derivatives/fmriprep/{subject}/anat/"
142
- "{subject}_space-MNI152NLin2009cAsym_label-"
143
- "WM_probseg.nii.gz"
169
+ "{subject}_"
170
+ f"{sp_anat_desc}"
171
+ "label-WM_probseg.nii.gz"
144
172
  ),
145
- "space": "MNI152NLin2009cAsym",
173
+ "space": space,
146
174
  },
147
175
  "DWI": {
148
176
  "pattern": (
@@ -183,51 +211,38 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
183
211
  )
184
212
  },
185
213
  },
214
+ "Warp": [
215
+ {
216
+ "pattern": (
217
+ "derivatives/fmriprep/{subject}/anat/"
218
+ "{subject}_from-MNI152NLin2009cAsym_to-T1w_"
219
+ "mode-image_xfm.h5"
220
+ ),
221
+ "src": "MNI152NLin2009cAsym",
222
+ "dst": "native",
223
+ "warper": "ants",
224
+ },
225
+ {
226
+ "pattern": (
227
+ "derivatives/fmriprep/{subject}/anat/"
228
+ "{subject}_from-T1w_to-MNI152NLin2009cAsym_"
229
+ "mode-image_xfm.h5"
230
+ ),
231
+ "src": "native",
232
+ "dst": "MNI152NLin2009cAsym",
233
+ "warper": "ants",
234
+ },
235
+ ],
186
236
  }
237
+
238
+ if space == "native":
239
+ patterns["BOLD"]["prewarp_space"] = "MNI152NLin2009cAsym"
240
+ else:
241
+ patterns["BOLD"]["prewarp_space"] = "native"
242
+
187
243
  # Use native T1w assets
188
- self.native_t1w = False
189
- if native_t1w:
190
- self.native_t1w = True
191
- patterns.update(
192
- {
193
- "T1w": {
194
- "pattern": (
195
- "derivatives/fmriprep/{subject}/anat/"
196
- "{subject}_desc-preproc_T1w.nii.gz"
197
- ),
198
- "space": "native",
199
- "mask": {
200
- "pattern": (
201
- "derivatives/fmriprep/{subject}/anat/"
202
- "{subject}_desc-brain_mask.nii.gz"
203
- ),
204
- "space": "native",
205
- },
206
- },
207
- "Warp": [
208
- {
209
- "pattern": (
210
- "derivatives/fmriprep/{subject}/anat/"
211
- "{subject}_from-MNI152NLin2009cAsym_to-T1w_"
212
- "mode-image_xfm.h5"
213
- ),
214
- "src": "MNI152NLin2009cAsym",
215
- "dst": "native",
216
- "warper": "ants",
217
- },
218
- {
219
- "pattern": (
220
- "derivatives/fmriprep/{subject}/anat/"
221
- "{subject}_from-T1w_to-MNI152NLin2009cAsym_"
222
- "mode-image_xfm.h5"
223
- ),
224
- "src": "native",
225
- "dst": "MNI152NLin2009cAsym",
226
- "warper": "ants",
227
- },
228
- ],
229
- }
230
- )
244
+ self.space = space
245
+
231
246
  # Set default types
232
247
  if types is None:
233
248
  types = list(patterns.keys())
@@ -37,8 +37,8 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
37
37
  list of the options, optional
38
38
  AOMIC PIOP2 task sessions. If None, all available task sessions are
39
39
  selected (default None).
40
- native_t1w : bool, optional
41
- Whether to use T1w in native space (default False).
40
+ space : {"native", "MNI152NLin2009cAsym"}, optional
41
+ The space to use for the data (default "MNI152NLin2009cAsym").
42
42
 
43
43
  Raises
44
44
  ------
@@ -52,8 +52,13 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
52
52
  datadir: Union[str, Path, None] = None,
53
53
  types: Union[str, list[str], None] = None,
54
54
  tasks: Union[str, list[str], None] = None,
55
- native_t1w: bool = False,
55
+ space: str = "MNI152NLin2009cAsym",
56
56
  ) -> None:
57
+ valid_spaces = ["native", "MNI152NLin2009cAsym"]
58
+ if space not in ["native", "MNI152NLin2009cAsym"]:
59
+ raise_error(
60
+ f"Invalid space {space}. Must be one of {valid_spaces}"
61
+ )
57
62
  # Declare all tasks
58
63
  all_tasks = [
59
64
  "restingstate",
@@ -76,22 +81,32 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
76
81
  " dataset!"
77
82
  )
78
83
  self.tasks = tasks
84
+ # Descriptor for space in `anat`
85
+ sp_anat_desc = (
86
+ "" if space == "native" else "space-MNI152NLin2009cAsym_"
87
+ )
88
+ # Descriptor for space in `func`
89
+ sp_func_desc = (
90
+ "space-T1w_" if space == "native" else "space-MNI152NLin2009cAsym_"
91
+ )
79
92
  # The patterns
80
93
  patterns = {
81
94
  "BOLD": {
82
95
  "pattern": (
83
96
  "derivatives/fmriprep/{subject}/func/"
84
97
  "{subject}_task-{task}_"
85
- "space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
98
+ f"{sp_func_desc}"
99
+ "desc-preproc_bold.nii.gz"
86
100
  ),
87
- "space": "MNI152NLin2009cAsym",
101
+ "space": space,
88
102
  "mask": {
89
103
  "pattern": (
90
104
  "derivatives/fmriprep/{subject}/func/"
91
105
  "{subject}_task-{task}_"
92
- "space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
106
+ f"{sp_func_desc}"
107
+ "desc-brain_mask.nii.gz"
93
108
  ),
94
- "space": "MNI152NLin2009cAsym",
109
+ "space": space,
95
110
  },
96
111
  "confounds": {
97
112
  "pattern": (
@@ -101,46 +116,59 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
101
116
  ),
102
117
  "format": "fmriprep",
103
118
  },
119
+ "reference": {
120
+ "pattern": (
121
+ "derivatives/fmriprep/{subject}/func/"
122
+ "{subject}_task-{task}_"
123
+ f"{sp_func_desc}"
124
+ "boldref.nii.gz"
125
+ ),
126
+ },
104
127
  },
105
128
  "T1w": {
106
129
  "pattern": (
107
130
  "derivatives/fmriprep/{subject}/anat/"
108
- "{subject}_space-MNI152NLin2009cAsym_"
131
+ "{subject}_"
132
+ f"{sp_anat_desc}"
109
133
  "desc-preproc_T1w.nii.gz"
110
134
  ),
111
- "space": "MNI152NLin2009cAsym",
135
+ "space": space,
112
136
  "mask": {
113
137
  "pattern": (
114
138
  "derivatives/fmriprep/{subject}/anat/"
115
- "{subject}_space-MNI152NLin2009cAsym_"
139
+ "{subject}_"
140
+ f"{sp_anat_desc}"
116
141
  "desc-brain_mask.nii.gz"
117
142
  ),
118
- "space": "MNI152NLin2009cAsym",
143
+ "space": space,
119
144
  },
120
145
  },
121
146
  "VBM_CSF": {
122
147
  "pattern": (
123
148
  "derivatives/fmriprep/{subject}/anat/"
124
- "{subject}_space-MNI152NLin2009cAsym_label-"
125
- "CSF_probseg.nii.gz"
149
+ "{subject}_"
150
+ f"{sp_anat_desc}"
151
+ "label-CSF_probseg.nii.gz"
126
152
  ),
127
- "space": "MNI152NLin2009cAsym",
153
+ "space": space,
128
154
  },
129
155
  "VBM_GM": {
130
156
  "pattern": (
131
157
  "derivatives/fmriprep/{subject}/anat/"
132
- "{subject}_space-MNI152NLin2009cAsym_label-"
133
- "GM_probseg.nii.gz"
158
+ "{subject}_"
159
+ f"{sp_anat_desc}"
160
+ "label-GM_probseg.nii.gz"
134
161
  ),
135
- "space": "MNI152NLin2009cAsym",
162
+ "space": space,
136
163
  },
137
164
  "VBM_WM": {
138
165
  "pattern": (
139
166
  "derivatives/fmriprep/{subject}/anat/"
140
- "{subject}_space-MNI152NLin2009cAsym_label-"
141
- "WM_probseg.nii.gz"
167
+ "{subject}_"
168
+ f"{sp_anat_desc}"
169
+ "label-WM_probseg.nii.gz"
142
170
  ),
143
- "space": "MNI152NLin2009cAsym",
171
+ "space": space,
144
172
  },
145
173
  "DWI": {
146
174
  "pattern": (
@@ -181,51 +209,38 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
181
209
  )
182
210
  },
183
211
  },
212
+ "Warp": [
213
+ {
214
+ "pattern": (
215
+ "derivatives/fmriprep/{subject}/anat/"
216
+ "{subject}_from-MNI152NLin2009cAsym_to-T1w_"
217
+ "mode-image_xfm.h5"
218
+ ),
219
+ "src": "MNI152NLin2009cAsym",
220
+ "dst": "native",
221
+ "warper": "ants",
222
+ },
223
+ {
224
+ "pattern": (
225
+ "derivatives/fmriprep/{subject}/anat/"
226
+ "{subject}_from-T1w_to-MNI152NLin2009cAsym_"
227
+ "mode-image_xfm.h5"
228
+ ),
229
+ "src": "native",
230
+ "dst": "MNI152NLin2009cAsym",
231
+ "warper": "ants",
232
+ },
233
+ ],
184
234
  }
235
+
236
+ if space == "native":
237
+ patterns["BOLD"]["prewarp_space"] = "MNI152NLin2009cAsym"
238
+ else:
239
+ patterns["BOLD"]["prewarp_space"] = "native"
240
+
185
241
  # Use native T1w assets
186
- self.native_t1w = False
187
- if native_t1w:
188
- self.native_t1w = True
189
- patterns.update(
190
- {
191
- "T1w": {
192
- "pattern": (
193
- "derivatives/fmriprep/{subject}/anat/"
194
- "{subject}_desc-preproc_T1w.nii.gz"
195
- ),
196
- "space": "native",
197
- "mask": {
198
- "pattern": (
199
- "derivatives/fmriprep/{subject}/anat/"
200
- "{subject}_desc-brain_mask.nii.gz"
201
- ),
202
- "space": "native",
203
- },
204
- },
205
- "Warp": [
206
- {
207
- "pattern": (
208
- "derivatives/fmriprep/{subject}/anat/"
209
- "{subject}_from-MNI152NLin2009cAsym_to-T1w_"
210
- "mode-image_xfm.h5"
211
- ),
212
- "src": "MNI152NLin2009cAsym",
213
- "dst": "native",
214
- "warper": "ants",
215
- },
216
- {
217
- "pattern": (
218
- "derivatives/fmriprep/{subject}/anat/"
219
- "{subject}_from-T1w_to-MNI152NLin2009cAsym_"
220
- "mode-image_xfm.h5"
221
- ),
222
- "src": "native",
223
- "dst": "MNI152NLin2009cAsym",
224
- "warper": "ants",
225
- },
226
- ],
227
- }
228
- )
242
+ self.space = space
243
+
229
244
  # Set default types
230
245
  if types is None:
231
246
  types = list(patterns.keys())
@@ -18,20 +18,25 @@ URI = "https://gin.g-node.org/juaml/datalad-example-aomic1000"
18
18
 
19
19
 
20
20
  @pytest.mark.parametrize(
21
- "type_, nested_types",
21
+ "type_, nested_types, space",
22
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),
23
+ ("BOLD", ["confounds", "mask", "reference"], "MNI152NLin2009cAsym"),
24
+ ("BOLD", ["confounds", "mask", "reference"], "native"),
25
+ ("T1w", ["mask"], "MNI152NLin2009cAsym"),
26
+ ("T1w", ["mask"], "native"),
27
+ ("VBM_CSF", None, "MNI152NLin2009cAsym"),
28
+ ("VBM_CSF", None, "native"),
29
+ ("VBM_GM", None, "MNI152NLin2009cAsym"),
30
+ ("VBM_GM", None, "native"),
31
+ ("VBM_WM", None, "MNI152NLin2009cAsym"),
32
+ ("DWI", None, "MNI152NLin2009cAsym"),
33
+ ("FreeSurfer", None, "MNI152NLin2009cAsym"),
30
34
  ],
31
35
  )
32
36
  def test_DataladAOMICID1000(
33
37
  type_: str,
34
38
  nested_types: Optional[list[str]],
39
+ space: str,
35
40
  ) -> None:
36
41
  """Test DataladAOMICID1000 DataGrabber.
37
42
 
@@ -41,9 +46,11 @@ def test_DataladAOMICID1000(
41
46
  The parametrized type.
42
47
  nested_types : list of str or None
43
48
  The parametrized nested types.
49
+ space: str
50
+ The parametrized space.
44
51
 
45
52
  """
46
- dg = DataladAOMICID1000(types=type_)
53
+ dg = DataladAOMICID1000(types=type_, space=space)
47
54
  # Set URI to Gin
48
55
  dg.uri = URI
49
56
 
@@ -18,30 +18,62 @@ URI = "https://gin.g-node.org/juaml/datalad-example-aomicpiop1"
18
18
 
19
19
 
20
20
  @pytest.mark.parametrize(
21
- "type_, nested_types, tasks",
21
+ "type_, nested_types, tasks, space",
22
22
  [
23
- ("BOLD", ["confounds", "mask"], None),
24
- ("BOLD", ["confounds", "mask"], ["anticipation"]),
25
- ("BOLD", ["confounds", "mask"], ["emomatching", "faces"]),
26
- ("BOLD", ["confounds", "mask"], ["restingstate"]),
27
- ("BOLD", ["confounds", "mask"], ["workingmemory", "gstroop"]),
28
23
  (
29
24
  "BOLD",
30
- ["confounds", "mask"],
25
+ ["confounds", "mask", "reference"],
26
+ None,
27
+ "MNI152NLin2009cAsym",
28
+ ),
29
+ ("BOLD", ["confounds", "mask", "reference"], None, "native"),
30
+ (
31
+ "BOLD",
32
+ ["confounds", "mask", "reference"],
33
+ ["anticipation"],
34
+ "MNI152NLin2009cAsym",
35
+ ),
36
+ (
37
+ "BOLD",
38
+ ["confounds", "mask", "reference"],
39
+ ["emomatching", "faces"],
40
+ "MNI152NLin2009cAsym",
41
+ ),
42
+ (
43
+ "BOLD",
44
+ ["confounds", "mask", "reference"],
45
+ ["restingstate"],
46
+ "MNI152NLin2009cAsym",
47
+ ),
48
+ (
49
+ "BOLD",
50
+ ["confounds", "mask", "reference"],
51
+ ["workingmemory", "gstroop"],
52
+ "MNI152NLin2009cAsym",
53
+ ),
54
+ (
55
+ "BOLD",
56
+ ["confounds", "mask", "reference"],
31
57
  ["anticipation", "faces", "restingstate"],
58
+ "MNI152NLin2009cAsym",
32
59
  ),
33
- ("T1w", ["mask"], None),
34
- ("VBM_CSF", None, None),
35
- ("VBM_GM", None, None),
36
- ("VBM_WM", None, None),
37
- ("DWI", None, None),
38
- ("FreeSurfer", None, None),
60
+ ("T1w", ["mask"], None, "MNI152NLin2009cAsym"),
61
+ ("T1w", ["mask"], None, "native"),
62
+ ("VBM_CSF", None, None, "MNI152NLin2009cAsym"),
63
+ ("VBM_CSF", None, None, "native"),
64
+ ("VBM_GM", None, None, "MNI152NLin2009cAsym"),
65
+ ("VBM_GM", None, None, "native"),
66
+ ("VBM_WM", None, None, "MNI152NLin2009cAsym"),
67
+ ("VBM_WM", None, None, "native"),
68
+ ("DWI", None, None, "MNI152NLin2009cAsym"),
69
+ ("FreeSurfer", None, None, "MNI152NLin2009cAsym"),
39
70
  ],
40
71
  )
41
72
  def test_DataladAOMICPIOP1(
42
73
  type_: str,
43
74
  nested_types: Optional[list[str]],
44
75
  tasks: Optional[list[str]],
76
+ space: str,
45
77
  ) -> None:
46
78
  """Test DataladAOMICPIOP1 DataGrabber.
47
79
 
@@ -53,9 +85,11 @@ def test_DataladAOMICPIOP1(
53
85
  The parametrized nested types.
54
86
  tasks : list of str or None
55
87
  The parametrized task values.
88
+ space: str
89
+ The parametrized space.
56
90
 
57
91
  """
58
- dg = DataladAOMICPIOP1(types=type_, tasks=tasks)
92
+ dg = DataladAOMICPIOP1(types=type_, tasks=tasks, space=space)
59
93
  # Set URI to Gin
60
94
  dg.uri = URI
61
95
 
@@ -18,25 +18,56 @@ URI = "https://gin.g-node.org/juaml/datalad-example-aomicpiop2"
18
18
 
19
19
 
20
20
  @pytest.mark.parametrize(
21
- "type_, nested_types, tasks",
21
+ "type_, nested_types, tasks, space",
22
22
  [
23
- ("BOLD", ["confounds", "mask"], None),
24
- ("BOLD", ["confounds", "mask"], ["restingstate"]),
25
- ("BOLD", ["confounds", "mask"], ["restingstate", "stopsignal"]),
26
- ("BOLD", ["confounds", "mask"], ["workingmemory", "stopsignal"]),
27
- ("BOLD", ["confounds", "mask"], ["workingmemory"]),
28
- ("T1w", ["mask"], None),
29
- ("VBM_CSF", None, None),
30
- ("VBM_GM", None, None),
31
- ("VBM_WM", None, None),
32
- ("DWI", None, None),
33
- ("FreeSurfer", None, None),
23
+ (
24
+ "BOLD",
25
+ ["confounds", "mask", "reference"],
26
+ None,
27
+ "MNI152NLin2009cAsym",
28
+ ),
29
+ ("BOLD", ["confounds", "mask", "reference"], None, "native"),
30
+ (
31
+ "BOLD",
32
+ ["confounds", "mask", "reference"],
33
+ ["restingstate"],
34
+ "MNI152NLin2009cAsym",
35
+ ),
36
+ (
37
+ "BOLD",
38
+ ["confounds", "mask", "reference"],
39
+ ["restingstate", "stopsignal"],
40
+ "MNI152NLin2009cAsym",
41
+ ),
42
+ (
43
+ "BOLD",
44
+ ["confounds", "mask", "reference"],
45
+ ["workingmemory", "stopsignal"],
46
+ "MNI152NLin2009cAsym",
47
+ ),
48
+ (
49
+ "BOLD",
50
+ ["confounds", "mask", "reference"],
51
+ ["workingmemory"],
52
+ "MNI152NLin2009cAsym",
53
+ ),
54
+ ("T1w", ["mask"], None, "MNI152NLin2009cAsym"),
55
+ ("T1w", ["mask"], None, "native"),
56
+ ("VBM_CSF", None, None, "MNI152NLin2009cAsym"),
57
+ ("VBM_CSF", None, None, "native"),
58
+ ("VBM_GM", None, None, "MNI152NLin2009cAsym"),
59
+ ("VBM_GM", None, None, "native"),
60
+ ("VBM_WM", None, None, "MNI152NLin2009cAsym"),
61
+ ("VBM_WM", None, None, "native"),
62
+ ("DWI", None, None, "MNI152NLin2009cAsym"),
63
+ ("FreeSurfer", None, None, "MNI152NLin2009cAsym"),
34
64
  ],
35
65
  )
36
66
  def test_DataladAOMICPIOP2(
37
67
  type_: str,
38
68
  nested_types: Optional[list[str]],
39
69
  tasks: Optional[list[str]],
70
+ space: str,
40
71
  ) -> None:
41
72
  """Test DataladAOMICPIOP2 DataGrabber.
42
73
 
@@ -48,9 +79,11 @@ def test_DataladAOMICPIOP2(
48
79
  The parametrized nested types.
49
80
  tasks : list of str or None
50
81
  The parametrized task values.
82
+ space: str
83
+ The parametrized space.
51
84
 
52
85
  """
53
- dg = DataladAOMICPIOP2(types=type_, tasks=tasks)
86
+ dg = DataladAOMICPIOP2(types=type_, tasks=tasks, space=space)
54
87
  # Set URI to Gin
55
88
  dg.uri = URI
56
89
 
junifer/pipeline/utils.py CHANGED
@@ -237,7 +237,7 @@ def _check_ants(commands: Optional[list[str]] = None) -> bool:
237
237
  shell=True, # is unsafe but kept for resolution via PATH
238
238
  check=False,
239
239
  )
240
- command_found = command_process.returncode == 0
240
+ command_found = command_process.returncode == 1
241
241
  commands_found_results[command] = (
242
242
  "found" if command_found else "not found"
243
243
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.6.dev302
3
+ Version: 0.0.6.dev311
4
4
  Summary: JUelich NeuroImaging FEature extractoR
5
5
  Author-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
6
6
  Maintainer-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
@@ -1,6 +1,6 @@
1
1
  junifer/__init__.py,sha256=2McgH1yNue6Z1V26-uN_mfMjbTcx4CLhym-DMBl5xA4,266
2
2
  junifer/__init__.pyi,sha256=SsTvgq2Dod6UqJN96GH1lCphH6hJQQurEJHGNhHjGUI,508
3
- junifer/_version.py,sha256=6ivRaEJnq1nwi7sNAqQwwarVpyzKReHtuarvntATZ2E,428
3
+ junifer/_version.py,sha256=Um0qpMM5T1_-HjlNcQSFRjfl7t4PTi-Tmwj5GjnZBzM,428
4
4
  junifer/conftest.py,sha256=PWYkkRDU8ly2lYwv7VBKMHje4et6HX7Yey3Md_I2KbA,613
5
5
  junifer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  junifer/stats.py,sha256=e9aaagMGtgpRfW3Wdpz9ocpnYld1IWylCDcjFUgX9Mk,6225
@@ -132,13 +132,13 @@ junifer/datagrabber/pattern_validation_mixin.py,sha256=6IlL5EMbr-XEtiiXs_buD3DJk
132
132
  junifer/datagrabber/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
133
  junifer/datagrabber/aomic/__init__.py,sha256=ATxzXq9NBPmWowTMuL77zqrmIbbnk0Wd1iXtXCP3XDg,266
134
134
  junifer/datagrabber/aomic/__init__.pyi,sha256=Rp6C075fZDdKY8VIq508_g4NhVj8bWzR6zb9yln761Q,189
135
- junifer/datagrabber/aomic/id1000.py,sha256=9jjsb6SRSgxbuMFLJRQBlXaoP9JptyBpveEyWKmsjCA,7814
136
- junifer/datagrabber/aomic/piop1.py,sha256=AvqtvdL2iUfvXQTWt7BydYKVZ_sS3rp__2M6DbG8_r0,10226
137
- junifer/datagrabber/aomic/piop2.py,sha256=FyibCxPnaM-w1v3M5FrKHDMXTp-lpBnnuHL7ta-9Xqk,9887
135
+ junifer/datagrabber/aomic/id1000.py,sha256=GNURDZUBqystS2fn9COtIJkDfUVkwsS2uBuVcZQArqc,7931
136
+ junifer/datagrabber/aomic/piop1.py,sha256=johUxDm4rS0QOH9JwotxzVYOWeTrVAdfXuHnkE-o7TI,10329
137
+ junifer/datagrabber/aomic/piop2.py,sha256=JxZqX6i_Jrj3evcxnblSdmWqS2bV5XxoIGhAUoSs8o4,9990
138
138
  junifer/datagrabber/aomic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
- junifer/datagrabber/aomic/tests/test_id1000.py,sha256=wie7Sc6MIpMyIbDMouXJ7r2_BRbdQv27rTsviwE19LE,3277
140
- junifer/datagrabber/aomic/tests/test_piop1.py,sha256=_NargKRI13PPtznpNhknOqlKLHlVgVWWVU7GFBeV3X8,4814
141
- junifer/datagrabber/aomic/tests/test_piop2.py,sha256=7ySdDKI7lioXAN6QVkefScNDNPrUM3lTL7IhGMJatVA,4160
139
+ junifer/datagrabber/aomic/tests/test_id1000.py,sha256=N8jnL5bERP1N_DqNsbH_QeO-aQy8kBym1LihBrAYCsA,3708
140
+ junifer/datagrabber/aomic/tests/test_piop1.py,sha256=8-vdcx2X4QraJV8PAaVwHsoul3kMu1QpLKR9naPMwiQ,5798
141
+ junifer/datagrabber/aomic/tests/test_piop2.py,sha256=vGd43XzcqNXRy_usAJF803S_P-MwcyLHpOz7WA04EN0,5096
142
142
  junifer/datagrabber/hcp1200/__init__.py,sha256=2CUYsdWu3RbOdHWME_peYNHEqKUkiq_W3Aw-aczbFdY,214
143
143
  junifer/datagrabber/hcp1200/__init__.pyi,sha256=2ttZanYSzCsB195_xfXUyztPsVIF02ARM-sjlNK3Wdg,114
144
144
  junifer/datagrabber/hcp1200/datalad_hcp1200.py,sha256=49kWPrjLnmUKzJNYPbV9SD0g5KkkCLXlVVpkYRxwkow,2457
@@ -267,7 +267,7 @@ junifer/pipeline/pipeline_component_registry.py,sha256=TdLXjQcUZstEF9n6IszBYAwLs
267
267
  junifer/pipeline/pipeline_step_mixin.py,sha256=oXfJh27yifHs1V3V_tMPCanRiHX1ggOVIbHTvMzq3cY,7853
268
268
  junifer/pipeline/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
269
269
  junifer/pipeline/update_meta_mixin.py,sha256=yzGCx8AUbc9mMnWKRu4qaIXTBBSIxtNlGH5zIQIUvzM,1812
270
- junifer/pipeline/utils.py,sha256=27KYbUS6t1kb3vP_C5BoRBFfKPzfUKQK8Ut-aBERshk,10285
270
+ junifer/pipeline/utils.py,sha256=qS0Xg_43ri-xtLeMJR838Axj9FkQ6s2H4r8CmSD58X8,10285
271
271
  junifer/pipeline/workdir_manager.py,sha256=r5hhizktLat2bN_A-ZGeeBVWmpRUkUCiZeIDxG-9umM,8624
272
272
  junifer/pipeline/tests/test_marker_collection.py,sha256=edBHfmwMTXG_q0ZagApbAbkFNoegi3hVEQiNcBtZOKc,6959
273
273
  junifer/pipeline/tests/test_pipeline_component_registry.py,sha256=mrbz285K_TzSILRn9X-AyzcNXuPRHGBZY6dQiq5_9So,5776
@@ -341,10 +341,10 @@ junifer/utils/tests/test_config.py,sha256=7ltIXuwb_W4Mv_1dxQWyiyM10XgUAfsWKV6D_i
341
341
  junifer/utils/tests/test_fs.py,sha256=WQS7cKlKEZ742CIuiOYYpueeAhY9PqlastfDVpVVtvE,923
342
342
  junifer/utils/tests/test_helpers.py,sha256=k5qqfxK8dFyuewTJyR1Qn6-nFaYNuVr0ysc18bfPjyU,929
343
343
  junifer/utils/tests/test_logging.py,sha256=duO4ou365hxwa_kwihFtKPLaL6LC5XHiyhOijrrngbA,8009
344
- junifer-0.0.6.dev302.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
- junifer-0.0.6.dev302.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
- junifer-0.0.6.dev302.dist-info/METADATA,sha256=-xzY1LfIMeHg8ism1hOUBXsfcyjaW58Mu1VuATPtKXY,8429
347
- junifer-0.0.6.dev302.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
348
- junifer-0.0.6.dev302.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
- junifer-0.0.6.dev302.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
- junifer-0.0.6.dev302.dist-info/RECORD,,
344
+ junifer-0.0.6.dev311.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
+ junifer-0.0.6.dev311.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
+ junifer-0.0.6.dev311.dist-info/METADATA,sha256=A3vcsrgSmtY_rzNE4oPkyed8tfX0qw2Iy93uo03avn0,8429
347
+ junifer-0.0.6.dev311.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
348
+ junifer-0.0.6.dev311.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
+ junifer-0.0.6.dev311.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
+ junifer-0.0.6.dev311.dist-info/RECORD,,