junifer 0.0.4.dev464__py3-none-any.whl → 0.0.4.dev477__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 +2 -2
- junifer/markers/falff/falff_base.py +3 -0
- junifer/markers/falff/falff_estimator.py +20 -11
- junifer/markers/reho/reho_base.py +2 -1
- junifer/markers/reho/reho_estimator.py +18 -10
- junifer/markers/reho/reho_parcels.py +3 -0
- junifer/markers/reho/reho_spheres.py +3 -0
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/METADATA +2 -1
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/RECORD +14 -14
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/AUTHORS.rst +0 -0
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/LICENSE.md +0 -0
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/WHEEL +0 -0
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/entry_points.txt +0 -0
- {junifer-0.0.4.dev464.dist-info → junifer-0.0.4.dev477.dist-info}/top_level.txt +0 -0
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.4.
|
16
|
-
__version_tuple__ = version_tuple = (0, 0, 4, '
|
15
|
+
__version__ = version = '0.0.4.dev477'
|
16
|
+
__version_tuple__ = version_tuple = (0, 0, 4, 'dev477')
|
@@ -148,6 +148,9 @@ class ALFFBase(BaseMarker):
|
|
148
148
|
|
149
149
|
estimator = ALFFEstimator()
|
150
150
|
|
151
|
+
# If the input data space is "native", then alff_path and falff_path
|
152
|
+
# both point to the input data path as it might be required to use
|
153
|
+
# in get_corrdinates() for transforming coordinates to native space.
|
151
154
|
alff, falff, alff_path, falff_path = estimator.fit_transform(
|
152
155
|
use_afni=self.use_afni,
|
153
156
|
input_data=input,
|
@@ -308,17 +308,16 @@ class ALFFEstimator:
|
|
308
308
|
if use_afni:
|
309
309
|
# Create new temporary directory before using AFNI
|
310
310
|
self.temp_dir_path = WorkDirManager().get_tempdir(prefix="falff")
|
311
|
-
|
311
|
+
return self._compute_alff_afni(
|
312
312
|
data=data,
|
313
313
|
highpass=highpass,
|
314
314
|
lowpass=lowpass,
|
315
315
|
tr=tr,
|
316
316
|
)
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
return output
|
317
|
+
|
318
|
+
return self._compute_alff_python(
|
319
|
+
data, highpass=highpass, lowpass=lowpass, tr=tr
|
320
|
+
)
|
322
321
|
|
323
322
|
def fit_transform(
|
324
323
|
self,
|
@@ -350,16 +349,18 @@ class ALFFEstimator:
|
|
350
349
|
Niimg-like object
|
351
350
|
fALFF map.
|
352
351
|
pathlib.Path
|
353
|
-
The path to the ALFF map as NIfTI
|
352
|
+
The path to the ALFF map as NIfTI or the input data path if the
|
353
|
+
input data space is "native".
|
354
354
|
pathlib.Path
|
355
|
-
The path to the fALFF map as NIfTI
|
355
|
+
The path to the fALFF map as NIfTI or the input data path if the
|
356
|
+
input data space is "native".
|
356
357
|
|
357
358
|
"""
|
358
359
|
bold_path = input_data["path"]
|
359
360
|
bold_data = input_data["data"]
|
360
361
|
# Clear cache if file path is different from when caching was done
|
361
362
|
if self._file_path != bold_path:
|
362
|
-
logger.info(f"Removing fALFF map cache
|
363
|
+
logger.info(f"Removing fALFF map cache for {self._file_path}.")
|
363
364
|
# Clear the cache
|
364
365
|
self._compute.cache_clear()
|
365
366
|
# Clear temporary directory files
|
@@ -368,12 +369,20 @@ class ALFFEstimator:
|
|
368
369
|
# Set the new file path
|
369
370
|
self._file_path = bold_path
|
370
371
|
else:
|
371
|
-
logger.info(f"Using fALFF map cache
|
372
|
+
logger.info(f"Using fALFF map cache for {self._file_path}.")
|
372
373
|
# Compute
|
373
|
-
|
374
|
+
alff_map, falff_map, alff_map_path, falff_map_path = self._compute(
|
374
375
|
use_afni=use_afni,
|
375
376
|
data=bold_data,
|
376
377
|
highpass=highpass,
|
377
378
|
lowpass=lowpass,
|
378
379
|
tr=tr,
|
379
380
|
)
|
381
|
+
# If the input data space is native already, the original path should
|
382
|
+
# be propagated down as it might be required for transforming
|
383
|
+
# coordinates to native space via get_coordinates(), else the alff
|
384
|
+
# / falff map path should be passed for use later if required.
|
385
|
+
if input_data["space"] == "native":
|
386
|
+
return alff_map, falff_map, input_data["path"], input_data["path"]
|
387
|
+
|
388
|
+
return alff_map, falff_map, alff_map_path, falff_map_path
|
@@ -110,7 +110,8 @@ class ReHoBase(BaseMarker):
|
|
110
110
|
Niimg-like object
|
111
111
|
The ReHo map as NIfTI.
|
112
112
|
pathlib.Path
|
113
|
-
The path to the ReHo map as NIfTI
|
113
|
+
The path to the ReHo map as NIfTI or the input data path if the
|
114
|
+
input data space is "native".
|
114
115
|
|
115
116
|
References
|
116
117
|
----------
|
@@ -462,12 +462,9 @@ class ReHoEstimator:
|
|
462
462
|
if use_afni:
|
463
463
|
# Create new temporary directory before using AFNI
|
464
464
|
self.temp_dir_path = WorkDirManager().get_tempdir(prefix="reho")
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
data, **reho_params
|
469
|
-
)
|
470
|
-
return output, output_path
|
465
|
+
return self._compute_reho_afni(data, **reho_params)
|
466
|
+
|
467
|
+
return self._compute_reho_python(data, **reho_params)
|
471
468
|
|
472
469
|
def fit_transform(
|
473
470
|
self,
|
@@ -491,14 +488,15 @@ class ReHoEstimator:
|
|
491
488
|
Niimg-like object
|
492
489
|
The ReHo map as NIfTI.
|
493
490
|
pathlib.Path
|
494
|
-
The path to the ReHo map as NIfTI
|
491
|
+
The path to the ReHo map as NIfTI or the input data path if the
|
492
|
+
input data space is "native".
|
495
493
|
|
496
494
|
"""
|
497
495
|
bold_path = input_data["path"]
|
498
496
|
bold_data = input_data["data"]
|
499
497
|
# Clear cache if file path is different from when caching was done
|
500
498
|
if self._file_path != bold_path:
|
501
|
-
logger.info(f"Removing ReHo map cache
|
499
|
+
logger.info(f"Removing ReHo map cache for {self._file_path}.")
|
502
500
|
# Clear the cache
|
503
501
|
self._compute.cache_clear()
|
504
502
|
# Clear temporary directory files
|
@@ -507,9 +505,19 @@ class ReHoEstimator:
|
|
507
505
|
# Set the new file path
|
508
506
|
self._file_path = bold_path
|
509
507
|
else:
|
510
|
-
logger.info(f"Using ReHo map cache
|
508
|
+
logger.info(f"Using ReHo map cache for {self._file_path}.")
|
511
509
|
# Compute
|
512
|
-
|
510
|
+
reho_map, reho_map_path = self._compute(
|
511
|
+
use_afni, bold_data, **reho_params
|
512
|
+
)
|
513
|
+
# If the input data space is native already, the original path should
|
514
|
+
# be propagated down as it might be required for transforming
|
515
|
+
# coordinates to native space via get_coordinates(), else the reho map
|
516
|
+
# path should be passed for use later if required.
|
517
|
+
if input_data["space"] == "native":
|
518
|
+
return reho_map, input_data["path"]
|
519
|
+
|
520
|
+
return reho_map, reho_map_path
|
513
521
|
|
514
522
|
|
515
523
|
def _kendall_w_reho(
|
@@ -127,6 +127,9 @@ class ReHoParcels(ReHoBase):
|
|
127
127
|
"""
|
128
128
|
logger.info("Calculating ReHo for parcels.")
|
129
129
|
# Calculate reho map
|
130
|
+
# If the input data space is "native", then reho_file_path points to
|
131
|
+
# the input data path as it might be required to use in
|
132
|
+
# get_coordinates() for transforming coordinates to native space.
|
130
133
|
if self.reho_params is not None:
|
131
134
|
reho_map, reho_file_path = self.compute_reho_map(
|
132
135
|
input=input, **self.reho_params
|
@@ -139,6 +139,9 @@ class ReHoSpheres(ReHoBase):
|
|
139
139
|
"""
|
140
140
|
logger.info("Calculating ReHo for spheres.")
|
141
141
|
# Calculate reho map
|
142
|
+
# If the input data space is "native", then reho_file_path points to
|
143
|
+
# the input data path as it might be required to use in
|
144
|
+
# get_coordinates() for transforming coordinates to native space.
|
142
145
|
if self.reho_params is not None:
|
143
146
|
reho_map, reho_file_path = self.compute_reho_map(
|
144
147
|
input=input, **self.reho_params
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: junifer
|
3
|
-
Version: 0.0.4.
|
3
|
+
Version: 0.0.4.dev477
|
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>
|
@@ -73,6 +73,7 @@ Requires-Dist: bctpy ==0.6.0 ; extra == 'onthefly'
|
|
73
73
|
[](https://github.com/charliermarsh/ruff)
|
74
74
|
[](https://github.com/pre-commit/pre-commit)
|
75
75
|
[](https://doi.org/10.5281/zenodo.8176570)
|
76
|
+
[](https://fairsoftwarechecklist.net/v0.2?f=31&a=32113&i=32322&r=133)
|
76
77
|
|
77
78
|
## About
|
78
79
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
junifer/__init__.py,sha256=x1UR2jUcrUdm2HNl-3Qvyi4UUrU6ms5qm2qcmNY7zZk,391
|
2
|
-
junifer/_version.py,sha256=
|
2
|
+
junifer/_version.py,sha256=M4X3STs52HWvFyMwLZ_m-ldav_VVRF4lDp3N_LiwSn8,428
|
3
3
|
junifer/stats.py,sha256=KUX4jJcLWnlE34coet8EkdFypFd-td4Vtpx5LvlomVs,5879
|
4
4
|
junifer/api/__init__.py,sha256=YILu9M7SC0Ri4CVd90fELH2OnK_gvCYAXCoqBNCFE8E,257
|
5
5
|
junifer/api/cli.py,sha256=xScav2mF-Jr8JjVFt8kaHuLpX5l_jVTaQGPgQL3VNvA,12881
|
@@ -133,8 +133,8 @@ junifer/markers/complexity/tests/test_range_entropy_auc.py,sha256=SOpUjFRbNopfMU
|
|
133
133
|
junifer/markers/complexity/tests/test_sample_entropy.py,sha256=3IeDnDgSeFNmUoPxQAJTSZvwN6S04-5r7NDvb0lzHmI,2025
|
134
134
|
junifer/markers/complexity/tests/test_weighted_perm_entropy.py,sha256=M7Qt_SFZSmptMi0cBGh5Merd1_3hPieIddl_pz7MWbs,2088
|
135
135
|
junifer/markers/falff/__init__.py,sha256=QAUIVtaOFWDL7B8xFrDgsmRum7Q0DCENyDYD1cPMJmM,197
|
136
|
-
junifer/markers/falff/falff_base.py,sha256=
|
137
|
-
junifer/markers/falff/falff_estimator.py,sha256=
|
136
|
+
junifer/markers/falff/falff_base.py,sha256=isHD643TvDFg7YJxpopHSrpJlgUwx2fW0tzJeSio6c8,6323
|
137
|
+
junifer/markers/falff/falff_estimator.py,sha256=ayXdQWHUyYyeR7NulOPZpYXkjQ2V8HlbHhy-jDKtZI0,12869
|
138
138
|
junifer/markers/falff/falff_parcels.py,sha256=UTADrIl96eO_xZ90LtOIt7tuN2eLDPnfIJghr9HAO88,4550
|
139
139
|
junifer/markers/falff/falff_spheres.py,sha256=XR2pcBRxjyTZ-J7j_HOjL20_2IHgYO0dI9x4LlQFoVE,5086
|
140
140
|
junifer/markers/falff/tests/test_falff_estimator.py,sha256=aVnkFvPqA5mTb9dXegwAJPku8Tf-1jWtDkfXhdcjDj8,8259
|
@@ -154,10 +154,10 @@ junifer/markers/functional_connectivity/tests/test_functional_connectivity_base.
|
|
154
154
|
junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py,sha256=CN6buyF0hxqzQUefz0KBkQSndwSXoZ5ius-H-WGhslY,3210
|
155
155
|
junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py,sha256=KOaMkLf7CEd1H8A92WpZAy6X6VNf6TADzYqsqXqvV4Q,4278
|
156
156
|
junifer/markers/reho/__init__.py,sha256=9IfeAxKEVgMWbhud-8T54Le07I4pR6A29sMKeFtvEPg,189
|
157
|
-
junifer/markers/reho/reho_base.py,sha256=
|
158
|
-
junifer/markers/reho/reho_estimator.py,sha256
|
159
|
-
junifer/markers/reho/reho_parcels.py,sha256=
|
160
|
-
junifer/markers/reho/reho_spheres.py,sha256=
|
157
|
+
junifer/markers/reho/reho_base.py,sha256=d6oxynZ41EGd7f3zorRww6vMtFYF0PjD6RdAVlLq9BA,3932
|
158
|
+
junifer/markers/reho/reho_estimator.py,sha256=88Ki-Ysq7MfmODynA_wk-7tvYdggmB_Z5HDa3gaZeoM,19692
|
159
|
+
junifer/markers/reho/reho_parcels.py,sha256=Q-gkB9aO0ncxgEQ68XEQKekpLLu_kXiYC6Xqkv8cdvY,6048
|
160
|
+
junifer/markers/reho/reho_spheres.py,sha256=ng5JzYorEnYmFVlxRMOMwkLNFsq2FlMN4o95B_BBVo0,6565
|
161
161
|
junifer/markers/reho/tests/test_reho_estimator.py,sha256=V_584X3I5a-XXAIs8YtR4TMuSqhMvGd5E1vcoDj8gQA,10168
|
162
162
|
junifer/markers/reho/tests/test_reho_parcels.py,sha256=XJk5VKw6kj31cNrOK5aA2EIlChq1MvPfmf474OQUYqU,5392
|
163
163
|
junifer/markers/reho/tests/test_reho_spheres.py,sha256=HSz6Kh92EmtCRovDnSQyeOhtMdNgXFniznS9BzfkuSw,5400
|
@@ -226,10 +226,10 @@ junifer/utils/fs.py,sha256=Jd9AoV2fIF7pT7KhXsn8T1O1fJ1_SFZgaFuOBAM7DG8,460
|
|
226
226
|
junifer/utils/logging.py,sha256=4kH8j9X_J2bMdnBJMldVF95C5sURa5UAsLmSgRaD9Ig,9117
|
227
227
|
junifer/utils/tests/test_fs.py,sha256=WQS7cKlKEZ742CIuiOYYpueeAhY9PqlastfDVpVVtvE,923
|
228
228
|
junifer/utils/tests/test_logging.py,sha256=l8oo-AiBV7H6_IzlsNcj__cLeZBUvgIGoaMszD9VaJg,7754
|
229
|
-
junifer-0.0.4.
|
230
|
-
junifer-0.0.4.
|
231
|
-
junifer-0.0.4.
|
232
|
-
junifer-0.0.4.
|
233
|
-
junifer-0.0.4.
|
234
|
-
junifer-0.0.4.
|
235
|
-
junifer-0.0.4.
|
229
|
+
junifer-0.0.4.dev477.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
|
230
|
+
junifer-0.0.4.dev477.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
|
231
|
+
junifer-0.0.4.dev477.dist-info/METADATA,sha256=rRpLolV-SBGOl-4ktutkDrIhIpWnB9fjsFS55rS66QM,7707
|
232
|
+
junifer-0.0.4.dev477.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
233
|
+
junifer-0.0.4.dev477.dist-info/entry_points.txt,sha256=DxFvKq0pOqRunAK0FxwJcoDfV1-dZvsFDpD5HRqSDhw,48
|
234
|
+
junifer-0.0.4.dev477.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
|
235
|
+
junifer-0.0.4.dev477.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|