junifer 0.0.3.dev186__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.
Files changed (178) hide show
  1. junifer/_version.py +14 -2
  2. junifer/api/cli.py +162 -17
  3. junifer/api/functions.py +87 -419
  4. junifer/api/parser.py +24 -0
  5. junifer/api/queue_context/__init__.py +8 -0
  6. junifer/api/queue_context/gnu_parallel_local_adapter.py +258 -0
  7. junifer/api/queue_context/htcondor_adapter.py +365 -0
  8. junifer/api/queue_context/queue_context_adapter.py +60 -0
  9. junifer/api/queue_context/tests/test_gnu_parallel_local_adapter.py +192 -0
  10. junifer/api/queue_context/tests/test_htcondor_adapter.py +257 -0
  11. junifer/api/res/afni/run_afni_docker.sh +6 -6
  12. junifer/api/res/ants/ResampleImage +3 -0
  13. junifer/api/res/ants/antsApplyTransforms +3 -0
  14. junifer/api/res/ants/antsApplyTransformsToPoints +3 -0
  15. junifer/api/res/ants/run_ants_docker.sh +39 -0
  16. junifer/api/res/fsl/applywarp +3 -0
  17. junifer/api/res/fsl/flirt +3 -0
  18. junifer/api/res/fsl/img2imgcoord +3 -0
  19. junifer/api/res/fsl/run_fsl_docker.sh +39 -0
  20. junifer/api/res/fsl/std2imgcoord +3 -0
  21. junifer/api/res/run_conda.sh +4 -4
  22. junifer/api/res/run_venv.sh +22 -0
  23. junifer/api/tests/data/partly_cloudy_agg_mean_tian.yml +16 -0
  24. junifer/api/tests/test_api_utils.py +21 -3
  25. junifer/api/tests/test_cli.py +232 -9
  26. junifer/api/tests/test_functions.py +211 -439
  27. junifer/api/tests/test_parser.py +1 -1
  28. junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +6 -1
  29. junifer/configs/juseless/datagrabbers/camcan_vbm.py +6 -1
  30. junifer/configs/juseless/datagrabbers/ixi_vbm.py +6 -1
  31. junifer/configs/juseless/datagrabbers/tests/test_ucla.py +8 -8
  32. junifer/configs/juseless/datagrabbers/ucla.py +44 -26
  33. junifer/configs/juseless/datagrabbers/ukb_vbm.py +6 -1
  34. junifer/data/VOIs/meta/AutobiographicalMemory_VOIs.txt +23 -0
  35. junifer/data/VOIs/meta/Power2013_MNI_VOIs.tsv +264 -0
  36. junifer/data/__init__.py +4 -0
  37. junifer/data/coordinates.py +298 -31
  38. junifer/data/masks.py +360 -28
  39. junifer/data/parcellations.py +621 -188
  40. junifer/data/template_spaces.py +190 -0
  41. junifer/data/tests/test_coordinates.py +34 -3
  42. junifer/data/tests/test_data_utils.py +1 -0
  43. junifer/data/tests/test_masks.py +202 -86
  44. junifer/data/tests/test_parcellations.py +266 -55
  45. junifer/data/tests/test_template_spaces.py +104 -0
  46. junifer/data/utils.py +4 -2
  47. junifer/datagrabber/__init__.py +1 -0
  48. junifer/datagrabber/aomic/id1000.py +111 -70
  49. junifer/datagrabber/aomic/piop1.py +116 -53
  50. junifer/datagrabber/aomic/piop2.py +116 -53
  51. junifer/datagrabber/aomic/tests/test_id1000.py +27 -27
  52. junifer/datagrabber/aomic/tests/test_piop1.py +27 -27
  53. junifer/datagrabber/aomic/tests/test_piop2.py +27 -27
  54. junifer/datagrabber/base.py +62 -10
  55. junifer/datagrabber/datalad_base.py +0 -2
  56. junifer/datagrabber/dmcc13_benchmark.py +372 -0
  57. junifer/datagrabber/hcp1200/datalad_hcp1200.py +5 -0
  58. junifer/datagrabber/hcp1200/hcp1200.py +30 -13
  59. junifer/datagrabber/pattern.py +133 -27
  60. junifer/datagrabber/pattern_datalad.py +111 -13
  61. junifer/datagrabber/tests/test_base.py +57 -6
  62. junifer/datagrabber/tests/test_datagrabber_utils.py +204 -76
  63. junifer/datagrabber/tests/test_datalad_base.py +0 -6
  64. junifer/datagrabber/tests/test_dmcc13_benchmark.py +256 -0
  65. junifer/datagrabber/tests/test_multiple.py +43 -10
  66. junifer/datagrabber/tests/test_pattern.py +125 -178
  67. junifer/datagrabber/tests/test_pattern_datalad.py +44 -25
  68. junifer/datagrabber/utils.py +151 -16
  69. junifer/datareader/default.py +36 -10
  70. junifer/external/nilearn/junifer_nifti_spheres_masker.py +6 -0
  71. junifer/markers/base.py +25 -16
  72. junifer/markers/collection.py +35 -16
  73. junifer/markers/complexity/__init__.py +27 -0
  74. junifer/markers/complexity/complexity_base.py +149 -0
  75. junifer/markers/complexity/hurst_exponent.py +136 -0
  76. junifer/markers/complexity/multiscale_entropy_auc.py +140 -0
  77. junifer/markers/complexity/perm_entropy.py +132 -0
  78. junifer/markers/complexity/range_entropy.py +136 -0
  79. junifer/markers/complexity/range_entropy_auc.py +145 -0
  80. junifer/markers/complexity/sample_entropy.py +134 -0
  81. junifer/markers/complexity/tests/test_complexity_base.py +19 -0
  82. junifer/markers/complexity/tests/test_hurst_exponent.py +69 -0
  83. junifer/markers/complexity/tests/test_multiscale_entropy_auc.py +68 -0
  84. junifer/markers/complexity/tests/test_perm_entropy.py +68 -0
  85. junifer/markers/complexity/tests/test_range_entropy.py +69 -0
  86. junifer/markers/complexity/tests/test_range_entropy_auc.py +69 -0
  87. junifer/markers/complexity/tests/test_sample_entropy.py +68 -0
  88. junifer/markers/complexity/tests/test_weighted_perm_entropy.py +68 -0
  89. junifer/markers/complexity/weighted_perm_entropy.py +133 -0
  90. junifer/markers/falff/_afni_falff.py +153 -0
  91. junifer/markers/falff/_junifer_falff.py +142 -0
  92. junifer/markers/falff/falff_base.py +91 -84
  93. junifer/markers/falff/falff_parcels.py +61 -45
  94. junifer/markers/falff/falff_spheres.py +64 -48
  95. junifer/markers/falff/tests/test_falff_parcels.py +89 -121
  96. junifer/markers/falff/tests/test_falff_spheres.py +92 -127
  97. junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +1 -0
  98. junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +1 -0
  99. junifer/markers/functional_connectivity/functional_connectivity_base.py +1 -0
  100. junifer/markers/functional_connectivity/tests/test_crossparcellation_functional_connectivity.py +46 -44
  101. junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +34 -39
  102. junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +40 -52
  103. junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +62 -70
  104. junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +99 -85
  105. junifer/markers/parcel_aggregation.py +60 -38
  106. junifer/markers/reho/_afni_reho.py +192 -0
  107. junifer/markers/reho/_junifer_reho.py +281 -0
  108. junifer/markers/reho/reho_base.py +69 -34
  109. junifer/markers/reho/reho_parcels.py +26 -16
  110. junifer/markers/reho/reho_spheres.py +23 -9
  111. junifer/markers/reho/tests/test_reho_parcels.py +93 -92
  112. junifer/markers/reho/tests/test_reho_spheres.py +88 -86
  113. junifer/markers/sphere_aggregation.py +54 -9
  114. junifer/markers/temporal_snr/temporal_snr_base.py +1 -0
  115. junifer/markers/temporal_snr/tests/test_temporal_snr_parcels.py +38 -37
  116. junifer/markers/temporal_snr/tests/test_temporal_snr_spheres.py +34 -38
  117. junifer/markers/tests/test_collection.py +43 -42
  118. junifer/markers/tests/test_ets_rss.py +29 -37
  119. junifer/markers/tests/test_parcel_aggregation.py +587 -468
  120. junifer/markers/tests/test_sphere_aggregation.py +209 -157
  121. junifer/markers/utils.py +2 -40
  122. junifer/onthefly/read_transform.py +13 -6
  123. junifer/pipeline/__init__.py +1 -0
  124. junifer/pipeline/pipeline_step_mixin.py +105 -41
  125. junifer/pipeline/registry.py +17 -0
  126. junifer/pipeline/singleton.py +45 -0
  127. junifer/pipeline/tests/test_pipeline_step_mixin.py +139 -51
  128. junifer/pipeline/tests/test_update_meta_mixin.py +1 -0
  129. junifer/pipeline/tests/test_workdir_manager.py +104 -0
  130. junifer/pipeline/update_meta_mixin.py +8 -2
  131. junifer/pipeline/utils.py +154 -15
  132. junifer/pipeline/workdir_manager.py +246 -0
  133. junifer/preprocess/__init__.py +3 -0
  134. junifer/preprocess/ants/__init__.py +4 -0
  135. junifer/preprocess/ants/ants_apply_transforms_warper.py +185 -0
  136. junifer/preprocess/ants/tests/test_ants_apply_transforms_warper.py +56 -0
  137. junifer/preprocess/base.py +96 -69
  138. junifer/preprocess/bold_warper.py +265 -0
  139. junifer/preprocess/confounds/fmriprep_confound_remover.py +91 -134
  140. junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +106 -111
  141. junifer/preprocess/fsl/__init__.py +4 -0
  142. junifer/preprocess/fsl/apply_warper.py +179 -0
  143. junifer/preprocess/fsl/tests/test_apply_warper.py +45 -0
  144. junifer/preprocess/tests/test_bold_warper.py +159 -0
  145. junifer/preprocess/tests/test_preprocess_base.py +6 -6
  146. junifer/preprocess/warping/__init__.py +6 -0
  147. junifer/preprocess/warping/_ants_warper.py +167 -0
  148. junifer/preprocess/warping/_fsl_warper.py +109 -0
  149. junifer/preprocess/warping/space_warper.py +213 -0
  150. junifer/preprocess/warping/tests/test_space_warper.py +198 -0
  151. junifer/stats.py +18 -4
  152. junifer/storage/base.py +9 -1
  153. junifer/storage/hdf5.py +8 -3
  154. junifer/storage/pandas_base.py +2 -1
  155. junifer/storage/sqlite.py +1 -0
  156. junifer/storage/tests/test_hdf5.py +2 -1
  157. junifer/storage/tests/test_sqlite.py +8 -8
  158. junifer/storage/tests/test_utils.py +6 -6
  159. junifer/storage/utils.py +1 -0
  160. junifer/testing/datagrabbers.py +11 -7
  161. junifer/testing/utils.py +1 -0
  162. junifer/tests/test_stats.py +2 -0
  163. junifer/utils/__init__.py +1 -0
  164. junifer/utils/helpers.py +53 -0
  165. junifer/utils/logging.py +14 -3
  166. junifer/utils/tests/test_helpers.py +35 -0
  167. {junifer-0.0.3.dev186.dist-info → junifer-0.0.4.dist-info}/METADATA +59 -28
  168. junifer-0.0.4.dist-info/RECORD +257 -0
  169. {junifer-0.0.3.dev186.dist-info → junifer-0.0.4.dist-info}/WHEEL +1 -1
  170. junifer/markers/falff/falff_estimator.py +0 -334
  171. junifer/markers/falff/tests/test_falff_estimator.py +0 -238
  172. junifer/markers/reho/reho_estimator.py +0 -515
  173. junifer/markers/reho/tests/test_reho_estimator.py +0 -260
  174. junifer-0.0.3.dev186.dist-info/RECORD +0 -199
  175. {junifer-0.0.3.dev186.dist-info → junifer-0.0.4.dist-info}/AUTHORS.rst +0 -0
  176. {junifer-0.0.3.dev186.dist-info → junifer-0.0.4.dist-info}/LICENSE.md +0 -0
  177. {junifer-0.0.3.dev186.dist-info → junifer-0.0.4.dist-info}/entry_points.txt +0 -0
  178. {junifer-0.0.3.dev186.dist-info → junifer-0.0.4.dist-info}/top_level.txt +0 -0
@@ -19,7 +19,6 @@ from junifer.pipeline import PipelineStepMixin
19
19
  from junifer.preprocess import fMRIPrepConfoundRemover
20
20
  from junifer.storage import SQLiteFeatureStorage
21
21
  from junifer.testing.datagrabbers import (
22
- OasisVBMTestingDataGrabber,
23
22
  PartlyCloudyTestingDataGrabber,
24
23
  )
25
24
 
@@ -46,30 +45,30 @@ def test_marker_collection() -> None:
46
45
  """Test MarkerCollection."""
47
46
  markers = [
48
47
  ParcelAggregation(
49
- parcellation="Schaefer100x7",
48
+ parcellation="TianxS2x3TxMNInonlinear2009cAsym",
50
49
  method="mean",
51
- name="gmd_schaefer100x7_mean",
50
+ name="tian_mean",
52
51
  ),
53
52
  ParcelAggregation(
54
- parcellation="Schaefer100x7",
53
+ parcellation="TianxS2x3TxMNInonlinear2009cAsym",
55
54
  method="std",
56
- name="gmd_schaefer100x7_std",
55
+ name="tian_std",
57
56
  ),
58
57
  ParcelAggregation(
59
- parcellation="Schaefer100x7",
58
+ parcellation="TianxS2x3TxMNInonlinear2009cAsym",
60
59
  method="trim_mean",
61
60
  method_params={"proportiontocut": 0.1},
62
- name="gmd_schaefer100x7_trim_mean90",
61
+ name="tian_trim_mean90",
63
62
  ),
64
63
  ]
65
64
  mc = MarkerCollection(markers=markers) # type: ignore
66
65
  assert mc._markers == markers
67
- assert mc._preprocessing is None
66
+ assert mc._preprocessors is None
68
67
  assert mc._storage is None
69
68
  assert isinstance(mc._datareader, DefaultDataReader)
70
69
 
71
70
  # Create testing datagrabber
72
- dg = OasisVBMTestingDataGrabber()
71
+ dg = PartlyCloudyTestingDataGrabber()
73
72
  mc.validate(dg)
74
73
 
75
74
  with dg:
@@ -78,17 +77,17 @@ def test_marker_collection() -> None:
78
77
  assert out is not None
79
78
  assert isinstance(out, dict)
80
79
  assert len(out) == 3
81
- assert "gmd_schaefer100x7_mean" in out
82
- assert "gmd_schaefer100x7_std" in out
83
- assert "gmd_schaefer100x7_trim_mean90" in out
80
+ assert "tian_mean" in out
81
+ assert "tian_std" in out
82
+ assert "tian_trim_mean90" in out
84
83
 
85
84
  for t_marker in markers:
86
85
  t_name = t_marker.name
87
- assert "VBM_GM" in out[t_name]
88
- t_vbm = out[t_name]["VBM_GM"]
89
- assert "data" in t_vbm
90
- assert "col_names" in t_vbm
91
- assert "meta" in t_vbm
86
+ assert "BOLD" in out[t_name]
87
+ t_bold = out[t_name]["BOLD"]
88
+ assert "data" in t_bold
89
+ assert "col_names" in t_bold
90
+ assert "meta" in t_bold
92
91
 
93
92
  # Test preprocessing
94
93
  class BypassPreprocessing(PipelineStepMixin):
@@ -97,7 +96,7 @@ def test_marker_collection() -> None:
97
96
 
98
97
  mc2 = MarkerCollection(
99
98
  markers=markers, # type: ignore
100
- preprocessing=BypassPreprocessing(),
99
+ preprocessors=[BypassPreprocessing()], # type: ignore
101
100
  datareader=DefaultDataReader(),
102
101
  )
103
102
  assert isinstance(mc2._datareader, DefaultDataReader)
@@ -108,7 +107,7 @@ def test_marker_collection() -> None:
108
107
  for t_marker in markers:
109
108
  t_name = t_marker.name
110
109
  assert_array_equal(
111
- out[t_name]["VBM_GM"]["data"], out2[t_name]["VBM_GM"]["data"]
110
+ out[t_name]["BOLD"]["data"], out2[t_name]["BOLD"]["data"]
112
111
  )
113
112
 
114
113
 
@@ -128,10 +127,10 @@ def test_marker_collection_with_preprocessing() -> None:
128
127
  ]
129
128
  mc = MarkerCollection(
130
129
  markers=markers, # type: ignore
131
- preprocessing=fMRIPrepConfoundRemover(),
130
+ preprocessors=[fMRIPrepConfoundRemover()],
132
131
  )
133
132
  assert mc._markers == markers
134
- assert mc._preprocessing is not None
133
+ assert mc._preprocessors is not None
135
134
  assert mc._storage is None
136
135
  assert isinstance(mc._datareader, DefaultDataReader)
137
136
 
@@ -151,27 +150,28 @@ def test_marker_collection_storage(tmp_path: Path) -> None:
151
150
  """
152
151
  markers = [
153
152
  ParcelAggregation(
154
- parcellation="Schaefer100x7",
153
+ parcellation="TianxS2x3TxMNInonlinear2009cAsym",
155
154
  method="mean",
156
- name="gmd_schaefer100x7_mean",
155
+ name="tian_mean",
157
156
  ),
158
157
  ParcelAggregation(
159
- parcellation="Schaefer100x7",
158
+ parcellation="TianxS2x3TxMNInonlinear2009cAsym",
160
159
  method="std",
161
- name="gmd_schaefer100x7_std",
160
+ name="tian_std",
162
161
  ),
163
162
  ParcelAggregation(
164
- parcellation="Schaefer100x7",
163
+ parcellation="TianxS2x3TxMNInonlinear2009cAsym",
165
164
  method="trim_mean",
166
165
  method_params={"proportiontocut": 0.1},
167
- name="gmd_schaefer100x7_trim_mean90",
166
+ name="tian_trim_mean90",
168
167
  ),
169
168
  ]
170
- # Test storage
171
- dg = OasisVBMTestingDataGrabber()
172
-
173
- uri = tmp_path / "test_marker_collection_storage.sqlite"
174
- storage = SQLiteFeatureStorage(uri=uri)
169
+ # Setup datagrabber
170
+ dg = PartlyCloudyTestingDataGrabber()
171
+ # Setup storage
172
+ storage = SQLiteFeatureStorage(
173
+ tmp_path / "test_marker_collection_storage.sqlite"
174
+ )
175
175
  mc = MarkerCollection(
176
176
  markers=markers, # type: ignore
177
177
  storage=storage,
@@ -197,23 +197,24 @@ def test_marker_collection_storage(tmp_path: Path) -> None:
197
197
 
198
198
  features = storage.list_features()
199
199
  assert len(features) == 3
200
- feature_md5 = list(features.keys())[0]
200
+
201
+ feature_md5 = next(iter(features.keys()))
201
202
  t_feature = storage.read_df(feature_md5=feature_md5)
202
- fname = "gmd_schaefer100x7_mean"
203
- t_data = out[fname]["VBM_GM"]["data"] # type: ignore
204
- cols = out[fname]["VBM_GM"]["col_names"] # type: ignore
203
+ fname = "tian_mean"
204
+ t_data = out[fname]["BOLD"]["data"] # type: ignore
205
+ cols = out[fname]["BOLD"]["col_names"] # type: ignore
205
206
  assert_array_equal(t_feature[cols].values, t_data) # type: ignore
206
207
 
207
208
  feature_md5 = list(features.keys())[1]
208
209
  t_feature = storage.read_df(feature_md5=feature_md5)
209
- fname = "gmd_schaefer100x7_std"
210
- t_data = out[fname]["VBM_GM"]["data"] # type: ignore
211
- cols = out[fname]["VBM_GM"]["col_names"] # type: ignore
210
+ fname = "tian_std"
211
+ t_data = out[fname]["BOLD"]["data"] # type: ignore
212
+ cols = out[fname]["BOLD"]["col_names"] # type: ignore
212
213
  assert_array_equal(t_feature[cols].values, t_data) # type: ignore
213
214
 
214
215
  feature_md5 = list(features.keys())[2]
215
216
  t_feature = storage.read_df(feature_md5=feature_md5)
216
- fname = "gmd_schaefer100x7_trim_mean90"
217
- t_data = out[fname]["VBM_GM"]["data"] # type: ignore
218
- cols = out[fname]["VBM_GM"]["col_names"] # type: ignore
217
+ fname = "tian_trim_mean90"
218
+ t_data = out[fname]["BOLD"]["data"] # type: ignore
219
+ cols = out[fname]["BOLD"]["col_names"] # type: ignore
219
220
  assert_array_equal(t_feature[cols].values, t_data) # type: ignore
@@ -8,48 +8,47 @@
8
8
 
9
9
  from pathlib import Path
10
10
 
11
- from nilearn import image
12
11
  from nilearn.maskers import NiftiLabelsMasker
13
12
 
14
- from junifer.data import load_parcellation
13
+ from junifer.data import get_parcellation
14
+ from junifer.datareader import DefaultDataReader
15
15
  from junifer.markers.ets_rss import RSSETSMarker
16
16
  from junifer.storage import SQLiteFeatureStorage
17
- from junifer.testing.datagrabbers import SPMAuditoryTestingDataGrabber
17
+ from junifer.testing.datagrabbers import PartlyCloudyTestingDataGrabber
18
18
 
19
19
 
20
20
  # Set parcellation
21
- PARCELLATION = "Schaefer100x17"
21
+ PARCELLATION = "TianxS1x3TxMNInonlinear2009cAsym"
22
22
 
23
23
 
24
24
  def test_compute() -> None:
25
25
  """Test RSS ETS compute()."""
26
- with SPMAuditoryTestingDataGrabber() as dg:
27
- # Fetch element
28
- out = dg["sub001"]
29
- # Load BOLD image
30
- niimg = image.load_img(str(out["BOLD"]["path"].absolute()))
31
- # Create input data
32
- input_dict = {"data": niimg, "path": out["BOLD"]["path"]}
26
+ with PartlyCloudyTestingDataGrabber() as dg:
27
+ element_data = DefaultDataReader().fit_transform(dg["sub-01"])
33
28
  # Compute the RSSETSMarker
34
- ets_rss_marker = RSSETSMarker(parcellation=PARCELLATION)
35
- new_out = ets_rss_marker.compute(input_dict)
36
-
37
- # Load parcellation
38
- test_parcellation, _, _ = load_parcellation(PARCELLATION)
39
- # Compute the NiftiLabelsMasker
40
- test_masker = NiftiLabelsMasker(test_parcellation)
41
- test_ts = test_masker.fit_transform(niimg)
29
+ marker = RSSETSMarker(parcellation=PARCELLATION)
30
+ rss_ets = marker.compute(element_data["BOLD"])
31
+
32
+ # Compare with nilearn
33
+ # Load testing parcellation
34
+ test_parcellation, _ = get_parcellation(
35
+ parcellation=[PARCELLATION],
36
+ target_data=element_data["BOLD"],
37
+ )
38
+ # Extract timeseries
39
+ nifti_labels_masker = NiftiLabelsMasker(labels_img=test_parcellation)
40
+ extacted_timeseries = nifti_labels_masker.fit_transform(
41
+ element_data["BOLD"]["data"]
42
+ )
42
43
  # Assert the dimension of timeseries
43
- n_time, _ = test_ts.shape
44
- assert n_time == len(new_out["data"])
44
+ assert extacted_timeseries.shape[0] == len(rss_ets["data"])
45
45
 
46
46
 
47
47
  def test_get_output_type() -> None:
48
48
  """Test RSS ETS get_output_type()."""
49
- ets_rss_marker = RSSETSMarker(parcellation=PARCELLATION)
50
- input_ = "BOLD"
51
- output = ets_rss_marker.get_output_type(input_)
52
- assert output == "timeseries"
49
+ assert "timeseries" == RSSETSMarker(
50
+ parcellation=PARCELLATION
51
+ ).get_output_type("BOLD")
53
52
 
54
53
 
55
54
  def test_store(tmp_path: Path) -> None:
@@ -61,20 +60,13 @@ def test_store(tmp_path: Path) -> None:
61
60
  The path to the test directory.
62
61
 
63
62
  """
64
- with SPMAuditoryTestingDataGrabber() as dg:
65
- # Fetch element
66
- elem = dg["sub001"]
67
- # Load BOLD image
68
- niimg = image.load_img(str(elem["BOLD"]["path"].absolute()))
69
- elem["BOLD"]["data"] = niimg
63
+ with PartlyCloudyTestingDataGrabber() as dg:
64
+ element_data = DefaultDataReader().fit_transform(dg["sub-01"])
70
65
  # Compute the RSSETSMarker
71
- ets_rss_marker = RSSETSMarker(parcellation=PARCELLATION)
66
+ marker = RSSETSMarker(parcellation=PARCELLATION)
72
67
  # Create storage
73
- storage = SQLiteFeatureStorage(
74
- uri=str((tmp_path / "test.sqlite").absolute())
75
- )
68
+ storage = SQLiteFeatureStorage(tmp_path / "test_rss_ets.sqlite")
76
69
  # Store
77
- ets_rss_marker.fit_transform(input=elem, storage=storage)
78
-
70
+ marker.fit_transform(input=element_data, storage=storage)
79
71
  features = storage.list_features()
80
72
  assert any(x["name"] == "BOLD_RSSETSMarker" for x in features.values())