junifer 0.0.5.dev110__py3-none-any.whl → 0.0.5.dev145__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 +17 -0
- junifer/_version.py +2 -2
- junifer/api/__init__.py +3 -0
- junifer/api/decorators.py +9 -0
- junifer/api/functions.py +7 -4
- junifer/api/parser.py +3 -0
- junifer/api/queue_context/__init__.py +3 -0
- 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 -0
- junifer/configs/juseless/__init__.py +3 -0
- junifer/configs/juseless/datagrabbers/__init__.py +9 -0
- junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +3 -0
- junifer/configs/juseless/datagrabbers/camcan_vbm.py +3 -0
- junifer/configs/juseless/datagrabbers/ixi_vbm.py +3 -0
- junifer/configs/juseless/datagrabbers/ucla.py +3 -0
- junifer/configs/juseless/datagrabbers/ukb_vbm.py +3 -0
- junifer/data/__init__.py +20 -0
- junifer/data/coordinates.py +8 -0
- junifer/data/masks.py +10 -0
- junifer/data/parcellations.py +9 -0
- junifer/data/template_spaces.py +3 -0
- junifer/data/tests/test_masks.py +1 -1
- junifer/data/utils.py +3 -0
- junifer/datagrabber/__init__.py +15 -0
- junifer/datagrabber/aomic/__init__.py +3 -0
- junifer/datagrabber/aomic/id1000.py +3 -0
- junifer/datagrabber/aomic/piop1.py +3 -0
- junifer/datagrabber/aomic/piop2.py +3 -0
- junifer/datagrabber/base.py +3 -0
- junifer/datagrabber/datalad_base.py +3 -0
- junifer/datagrabber/hcp1200/__init__.py +3 -0
- junifer/datagrabber/hcp1200/datalad_hcp1200.py +3 -0
- junifer/datagrabber/hcp1200/hcp1200.py +3 -0
- junifer/datagrabber/multiple.py +3 -0
- junifer/datagrabber/pattern.py +5 -1
- junifer/datagrabber/pattern_datalad.py +3 -0
- junifer/datagrabber/utils.py +3 -0
- junifer/datareader/__init__.py +3 -0
- junifer/datareader/default.py +3 -0
- junifer/external/BrainPrint/brainprint/__init__.py +4 -0
- junifer/external/BrainPrint/brainprint/_version.py +3 -0
- junifer/external/BrainPrint/brainprint/asymmetry.py +91 -0
- junifer/external/BrainPrint/brainprint/brainprint.py +441 -0
- junifer/external/BrainPrint/brainprint/surfaces.py +258 -0
- junifer/external/BrainPrint/brainprint/utils/__init__.py +1 -0
- junifer/external/BrainPrint/brainprint/utils/_config.py +112 -0
- junifer/external/BrainPrint/brainprint/utils/utils.py +188 -0
- junifer/markers/__init__.py +22 -0
- junifer/markers/base.py +21 -7
- junifer/markers/brainprint.py +665 -0
- junifer/markers/collection.py +3 -0
- junifer/markers/complexity/__init__.py +10 -0
- junifer/markers/complexity/complexity_base.py +3 -0
- junifer/markers/complexity/hurst_exponent.py +3 -0
- junifer/markers/complexity/multiscale_entropy_auc.py +3 -0
- junifer/markers/complexity/perm_entropy.py +3 -0
- junifer/markers/complexity/range_entropy.py +3 -0
- junifer/markers/complexity/range_entropy_auc.py +3 -0
- junifer/markers/complexity/sample_entropy.py +3 -0
- junifer/markers/complexity/tests/test_hurst_exponent.py +7 -0
- junifer/markers/complexity/tests/test_multiscale_entropy_auc.py +7 -0
- junifer/markers/complexity/tests/test_perm_entropy.py +7 -0
- junifer/markers/complexity/tests/test_range_entropy.py +7 -0
- junifer/markers/complexity/tests/test_range_entropy_auc.py +7 -0
- junifer/markers/complexity/tests/test_sample_entropy.py +7 -0
- junifer/markers/complexity/tests/test_weighted_perm_entropy.py +7 -0
- junifer/markers/complexity/weighted_perm_entropy.py +3 -0
- junifer/markers/ets_rss.py +3 -0
- junifer/markers/falff/__init__.py +3 -0
- junifer/markers/falff/_afni_falff.py +3 -0
- junifer/markers/falff/_junifer_falff.py +3 -0
- junifer/markers/falff/falff_base.py +3 -0
- junifer/markers/falff/falff_parcels.py +3 -0
- junifer/markers/falff/falff_spheres.py +3 -0
- junifer/markers/functional_connectivity/__init__.py +9 -0
- junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +3 -0
- junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +3 -0
- junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +3 -0
- junifer/markers/functional_connectivity/functional_connectivity_base.py +3 -0
- junifer/markers/functional_connectivity/functional_connectivity_parcels.py +3 -0
- junifer/markers/functional_connectivity/functional_connectivity_spheres.py +3 -0
- junifer/markers/parcel_aggregation.py +3 -0
- junifer/markers/reho/__init__.py +3 -0
- junifer/markers/reho/_afni_reho.py +4 -1
- junifer/markers/reho/_junifer_reho.py +4 -1
- junifer/markers/reho/reho_base.py +2 -0
- junifer/markers/reho/reho_parcels.py +5 -2
- junifer/markers/reho/reho_spheres.py +5 -2
- junifer/markers/sphere_aggregation.py +3 -0
- junifer/markers/temporal_snr/__init__.py +3 -0
- junifer/markers/temporal_snr/temporal_snr_base.py +3 -0
- junifer/markers/temporal_snr/temporal_snr_parcels.py +3 -0
- junifer/markers/temporal_snr/temporal_snr_spheres.py +3 -0
- junifer/markers/tests/test_brainprint.py +47 -0
- junifer/onthefly/__init__.py +3 -0
- junifer/onthefly/read_transform.py +3 -0
- junifer/pipeline/__init__.py +8 -0
- junifer/pipeline/pipeline_step_mixin.py +3 -0
- junifer/pipeline/registry.py +3 -0
- junifer/pipeline/singleton.py +3 -0
- junifer/pipeline/update_meta_mixin.py +3 -0
- junifer/pipeline/utils.py +3 -0
- junifer/pipeline/workdir_manager.py +3 -0
- junifer/preprocess/__init__.py +8 -0
- junifer/preprocess/base.py +4 -1
- junifer/preprocess/confounds/__init__.py +3 -0
- junifer/preprocess/confounds/fmriprep_confound_remover.py +3 -0
- junifer/preprocess/smoothing/__init__.py +3 -0
- junifer/preprocess/warping/__init__.py +3 -0
- junifer/preprocess/warping/_ants_warper.py +3 -0
- junifer/preprocess/warping/_fsl_warper.py +3 -0
- junifer/stats.py +3 -0
- junifer/storage/__init__.py +8 -0
- junifer/storage/base.py +3 -0
- junifer/storage/hdf5.py +3 -0
- junifer/storage/pandas_base.py +3 -0
- junifer/storage/sqlite.py +3 -0
- junifer/storage/utils.py +9 -0
- junifer/testing/__init__.py +3 -0
- junifer/testing/datagrabbers.py +7 -0
- junifer/testing/utils.py +3 -0
- junifer/utils/__init__.py +10 -0
- junifer/utils/fs.py +3 -0
- junifer/utils/helpers.py +3 -0
- junifer/utils/logging.py +10 -0
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/METADATA +2 -1
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/RECORD +134 -124
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/AUTHORS.rst +0 -0
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/LICENSE.md +0 -0
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/WHEEL +0 -0
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/entry_points.txt +0 -0
- {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/top_level.txt +0 -0
@@ -14,6 +14,9 @@ from ...utils import logger, warn_with_log
|
|
14
14
|
from .complexity_base import ComplexityBase
|
15
15
|
|
16
16
|
|
17
|
+
__all__ = ["MultiscaleEntropyAUC"]
|
18
|
+
|
19
|
+
|
17
20
|
@register_marker
|
18
21
|
class MultiscaleEntropyAUC(ComplexityBase):
|
19
22
|
"""Class for AUC of multiscale entropy of a time series.
|
@@ -14,6 +14,9 @@ from ...utils import logger, warn_with_log
|
|
14
14
|
from .complexity_base import ComplexityBase
|
15
15
|
|
16
16
|
|
17
|
+
__all__ = ["RangeEntropyAUC"]
|
18
|
+
|
19
|
+
|
17
20
|
@register_marker
|
18
21
|
class RangeEntropyAUC(ComplexityBase):
|
19
22
|
"""Class for AUC of range entropy values of a time series over r = 0 to 1.
|
@@ -14,6 +14,7 @@ pytest.importorskip("neurokit2")
|
|
14
14
|
|
15
15
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
16
16
|
from junifer.markers.complexity import HurstExponent # noqa: E402
|
17
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
17
18
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
18
19
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
19
20
|
SPMAuditoryTestingDataGrabber,
|
@@ -24,6 +25,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
24
25
|
PARCELLATION = "Schaefer100x17"
|
25
26
|
|
26
27
|
|
28
|
+
@pytest.mark.skipif(
|
29
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
30
|
+
)
|
27
31
|
def test_compute() -> None:
|
28
32
|
"""Test HurstExponent compute()."""
|
29
33
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -45,6 +49,9 @@ def test_get_output_type() -> None:
|
|
45
49
|
assert marker.get_output_type("BOLD") == "vector"
|
46
50
|
|
47
51
|
|
52
|
+
@pytest.mark.skipif(
|
53
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
54
|
+
)
|
48
55
|
def test_store(tmp_path: Path) -> None:
|
49
56
|
"""Test HurstExponent store().
|
50
57
|
|
@@ -13,6 +13,7 @@ pytest.importorskip("neurokit2")
|
|
13
13
|
|
14
14
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
15
15
|
from junifer.markers.complexity import MultiscaleEntropyAUC # noqa: E402
|
16
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
16
17
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
17
18
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
18
19
|
SPMAuditoryTestingDataGrabber,
|
@@ -23,6 +24,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
23
24
|
PARCELLATION = "Schaefer100x17"
|
24
25
|
|
25
26
|
|
27
|
+
@pytest.mark.skipif(
|
28
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
29
|
+
)
|
26
30
|
def test_compute() -> None:
|
27
31
|
"""Test MultiscaleEntropyAUC compute()."""
|
28
32
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -44,6 +48,9 @@ def test_get_output_type() -> None:
|
|
44
48
|
assert marker.get_output_type("BOLD") == "vector"
|
45
49
|
|
46
50
|
|
51
|
+
@pytest.mark.skipif(
|
52
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
53
|
+
)
|
47
54
|
def test_store(tmp_path: Path) -> None:
|
48
55
|
"""Test MultiscaleEntropyAUC store().
|
49
56
|
|
@@ -13,6 +13,7 @@ pytest.importorskip("neurokit2")
|
|
13
13
|
|
14
14
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
15
15
|
from junifer.markers.complexity import PermEntropy # noqa: E402
|
16
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
16
17
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
17
18
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
18
19
|
SPMAuditoryTestingDataGrabber,
|
@@ -23,6 +24,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
23
24
|
PARCELLATION = "Schaefer100x17"
|
24
25
|
|
25
26
|
|
27
|
+
@pytest.mark.skipif(
|
28
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
29
|
+
)
|
26
30
|
def test_compute() -> None:
|
27
31
|
"""Test PermEntropy compute()."""
|
28
32
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -44,6 +48,9 @@ def test_get_output_type() -> None:
|
|
44
48
|
assert marker.get_output_type("BOLD") == "vector"
|
45
49
|
|
46
50
|
|
51
|
+
@pytest.mark.skipif(
|
52
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
53
|
+
)
|
47
54
|
def test_store(tmp_path: Path) -> None:
|
48
55
|
"""Test PermEntropy store().
|
49
56
|
|
@@ -14,6 +14,7 @@ pytest.importorskip("neurokit2")
|
|
14
14
|
|
15
15
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
16
16
|
from junifer.markers.complexity import RangeEntropy # noqa: E402
|
17
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
17
18
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
18
19
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
19
20
|
SPMAuditoryTestingDataGrabber,
|
@@ -24,6 +25,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
24
25
|
PARCELLATION = "Schaefer100x17"
|
25
26
|
|
26
27
|
|
28
|
+
@pytest.mark.skipif(
|
29
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
30
|
+
)
|
27
31
|
def test_compute() -> None:
|
28
32
|
"""Test RangeEntropy compute()."""
|
29
33
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -45,6 +49,9 @@ def test_get_output_type() -> None:
|
|
45
49
|
assert marker.get_output_type("BOLD") == "vector"
|
46
50
|
|
47
51
|
|
52
|
+
@pytest.mark.skipif(
|
53
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
54
|
+
)
|
48
55
|
def test_store(tmp_path: Path) -> None:
|
49
56
|
"""Test RangeEntropy store().
|
50
57
|
|
@@ -14,6 +14,7 @@ pytest.importorskip("neurokit2")
|
|
14
14
|
|
15
15
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
16
16
|
from junifer.markers.complexity import RangeEntropyAUC # noqa: E402
|
17
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
17
18
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
18
19
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
19
20
|
SPMAuditoryTestingDataGrabber,
|
@@ -24,6 +25,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
24
25
|
PARCELLATION = "Schaefer100x17"
|
25
26
|
|
26
27
|
|
28
|
+
@pytest.mark.skipif(
|
29
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
30
|
+
)
|
27
31
|
def test_compute() -> None:
|
28
32
|
"""Test RangeEntropyAUC compute()."""
|
29
33
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -45,6 +49,9 @@ def test_get_output_type() -> None:
|
|
45
49
|
assert marker.get_output_type("BOLD") == "vector"
|
46
50
|
|
47
51
|
|
52
|
+
@pytest.mark.skipif(
|
53
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
54
|
+
)
|
48
55
|
def test_store(tmp_path: Path) -> None:
|
49
56
|
"""Test RangeEntropyAUC store().
|
50
57
|
|
@@ -13,6 +13,7 @@ pytest.importorskip("neurokit2")
|
|
13
13
|
|
14
14
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
15
15
|
from junifer.markers.complexity import SampleEntropy # noqa: E402
|
16
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
16
17
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
17
18
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
18
19
|
SPMAuditoryTestingDataGrabber,
|
@@ -23,6 +24,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
23
24
|
PARCELLATION = "Schaefer100x17"
|
24
25
|
|
25
26
|
|
27
|
+
@pytest.mark.skipif(
|
28
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
29
|
+
)
|
26
30
|
def test_compute() -> None:
|
27
31
|
"""Test SampleEntropy compute()."""
|
28
32
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -44,6 +48,9 @@ def test_get_output_type() -> None:
|
|
44
48
|
assert marker.get_output_type("BOLD") == "vector"
|
45
49
|
|
46
50
|
|
51
|
+
@pytest.mark.skipif(
|
52
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
53
|
+
)
|
47
54
|
def test_store(tmp_path: Path) -> None:
|
48
55
|
"""Test SampleEntropy store().
|
49
56
|
|
@@ -13,6 +13,7 @@ pytest.importorskip("neurokit2")
|
|
13
13
|
|
14
14
|
from junifer.datareader import DefaultDataReader # noqa: E402
|
15
15
|
from junifer.markers.complexity import WeightedPermEntropy # noqa: E402
|
16
|
+
from junifer.pipeline.utils import _check_ants # noqa: E402
|
16
17
|
from junifer.storage import SQLiteFeatureStorage # noqa: E402
|
17
18
|
from junifer.testing.datagrabbers import ( # noqa: E402
|
18
19
|
SPMAuditoryTestingDataGrabber,
|
@@ -23,6 +24,9 @@ from junifer.testing.datagrabbers import ( # noqa: E402
|
|
23
24
|
PARCELLATION = "Schaefer100x17"
|
24
25
|
|
25
26
|
|
27
|
+
@pytest.mark.skipif(
|
28
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
29
|
+
)
|
26
30
|
def test_compute() -> None:
|
27
31
|
"""Test WeightedPermEntropy compute()."""
|
28
32
|
with SPMAuditoryTestingDataGrabber() as dg:
|
@@ -44,6 +48,9 @@ def test_get_output_type() -> None:
|
|
44
48
|
assert marker.get_output_type("BOLD") == "vector"
|
45
49
|
|
46
50
|
|
51
|
+
@pytest.mark.skipif(
|
52
|
+
_check_ants() is False, reason="requires ANTs to be in PATH"
|
53
|
+
)
|
47
54
|
def test_store(tmp_path: Path) -> None:
|
48
55
|
"""Test WeightedPermEntropy store().
|
49
56
|
|
@@ -14,6 +14,9 @@ from ...utils import logger, warn_with_log
|
|
14
14
|
from .complexity_base import ComplexityBase
|
15
15
|
|
16
16
|
|
17
|
+
__all__ = ["WeightedPermEntropy"]
|
18
|
+
|
19
|
+
|
17
20
|
@register_marker
|
18
21
|
class WeightedPermEntropy(ComplexityBase):
|
19
22
|
"""Class for weighted permutation entropy of a time series.
|
junifer/markers/ets_rss.py
CHANGED
@@ -8,3 +8,12 @@ from .functional_connectivity_spheres import FunctionalConnectivitySpheres
|
|
8
8
|
from .crossparcellation_functional_connectivity import CrossParcellationFC
|
9
9
|
from .edge_functional_connectivity_parcels import EdgeCentricFCParcels
|
10
10
|
from .edge_functional_connectivity_spheres import EdgeCentricFCSpheres
|
11
|
+
|
12
|
+
|
13
|
+
__all__ = [
|
14
|
+
"FunctionalConnectivityParcels",
|
15
|
+
"FunctionalConnectivitySpheres",
|
16
|
+
"CrossParcellationFC",
|
17
|
+
"EdgeCentricFCParcels",
|
18
|
+
"EdgeCentricFCSpheres",
|
19
|
+
]
|
@@ -15,6 +15,9 @@ from ..parcel_aggregation import ParcelAggregation
|
|
15
15
|
from ..utils import _correlate_dataframes
|
16
16
|
|
17
17
|
|
18
|
+
__all__ = ["CrossParcellationFC"]
|
19
|
+
|
20
|
+
|
18
21
|
@register_marker
|
19
22
|
class CrossParcellationFC(BaseMarker):
|
20
23
|
"""Class for calculating parcel-wise correlations with 2 parcellations.
|
@@ -12,6 +12,9 @@ from ..utils import _ets
|
|
12
12
|
from .functional_connectivity_base import FunctionalConnectivityBase
|
13
13
|
|
14
14
|
|
15
|
+
__all__ = ["EdgeCentricFCParcels"]
|
16
|
+
|
17
|
+
|
15
18
|
@register_marker
|
16
19
|
class EdgeCentricFCParcels(FunctionalConnectivityBase):
|
17
20
|
"""Class for edge-centric FC using parcellations.
|
@@ -12,6 +12,9 @@ from ..utils import _ets, raise_error
|
|
12
12
|
from .functional_connectivity_base import FunctionalConnectivityBase
|
13
13
|
|
14
14
|
|
15
|
+
__all__ = ["EdgeCentricFCSpheres"]
|
16
|
+
|
17
|
+
|
15
18
|
@register_marker
|
16
19
|
class EdgeCentricFCSpheres(FunctionalConnectivityBase):
|
17
20
|
"""Class for edge-centric FC using coordinates (spheres).
|
@@ -12,6 +12,9 @@ from ..parcel_aggregation import ParcelAggregation
|
|
12
12
|
from .functional_connectivity_base import FunctionalConnectivityBase
|
13
13
|
|
14
14
|
|
15
|
+
__all__ = ["FunctionalConnectivityParcels"]
|
16
|
+
|
17
|
+
|
15
18
|
@register_marker
|
16
19
|
class FunctionalConnectivityParcels(FunctionalConnectivityBase):
|
17
20
|
"""Class for functional connectivity using parcellations.
|
@@ -13,6 +13,9 @@ from ..utils import raise_error
|
|
13
13
|
from .functional_connectivity_base import FunctionalConnectivityBase
|
14
14
|
|
15
15
|
|
16
|
+
__all__ = ["FunctionalConnectivitySpheres"]
|
17
|
+
|
18
|
+
|
16
19
|
@register_marker
|
17
20
|
class FunctionalConnectivitySpheres(FunctionalConnectivityBase):
|
18
21
|
"""Class for functional connectivity using coordinates (spheres).
|
junifer/markers/reho/__init__.py
CHANGED
@@ -26,6 +26,9 @@ if TYPE_CHECKING:
|
|
26
26
|
from nibabel import Nifti1Image
|
27
27
|
|
28
28
|
|
29
|
+
__all__ = ["AFNIReHo"]
|
30
|
+
|
31
|
+
|
29
32
|
@singleton
|
30
33
|
class AFNIReHo:
|
31
34
|
"""Class for computing ReHo using AFNI.
|
@@ -72,7 +75,7 @@ class AFNIReHo:
|
|
72
75
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
73
76
|
|
74
77
|
* 7 : for facewise neighbours only
|
75
|
-
* 19 : for face- and edge-wise
|
78
|
+
* 19 : for face- and edge-wise neighbours
|
76
79
|
* 27 : for face-, edge-, and node-wise neighbors
|
77
80
|
|
78
81
|
(default 27).
|
@@ -28,6 +28,9 @@ if TYPE_CHECKING:
|
|
28
28
|
from nibabel import Nifti1Image
|
29
29
|
|
30
30
|
|
31
|
+
__all__ = ["JuniferReHo"]
|
32
|
+
|
33
|
+
|
31
34
|
@singleton
|
32
35
|
class JuniferReHo:
|
33
36
|
"""Class for computing ReHo using junifer.
|
@@ -60,7 +63,7 @@ class JuniferReHo:
|
|
60
63
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
61
64
|
|
62
65
|
* 7 : for facewise neighbours only
|
63
|
-
* 19 : for face- and edge-wise
|
66
|
+
* 19 : for face- and edge-wise neighbours
|
64
67
|
* 27 : for face-, edge-, and node-wise neighbors
|
65
68
|
* 125 : for 5x5 cuboidal volume
|
66
69
|
|
@@ -14,6 +14,9 @@ from ..parcel_aggregation import ParcelAggregation
|
|
14
14
|
from .reho_base import ReHoBase
|
15
15
|
|
16
16
|
|
17
|
+
__all__ = ["ReHoParcels"]
|
18
|
+
|
19
|
+
|
17
20
|
@register_marker
|
18
21
|
class ReHoParcels(ReHoBase):
|
19
22
|
"""Class for regional homogeneity on parcels.
|
@@ -37,7 +40,7 @@ class ReHoParcels(ReHoBase):
|
|
37
40
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
38
41
|
|
39
42
|
- 7 : for facewise neighbours only
|
40
|
-
- 19 : for face- and edge-wise
|
43
|
+
- 19 : for face- and edge-wise neighbours
|
41
44
|
- 27 : for face-, edge-, and node-wise neighbors
|
42
45
|
|
43
46
|
* ``neigh_rad`` : positive float, optional
|
@@ -67,7 +70,7 @@ class ReHoParcels(ReHoBase):
|
|
67
70
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
68
71
|
|
69
72
|
* 7 : for facewise neighbours only
|
70
|
-
* 19 : for face- and edge-wise
|
73
|
+
* 19 : for face- and edge-wise neighbours
|
71
74
|
* 27 : for face-, edge-, and node-wise neighbors
|
72
75
|
* 125 : for 5x5 cuboidal volume
|
73
76
|
|
@@ -14,6 +14,9 @@ from ..sphere_aggregation import SphereAggregation
|
|
14
14
|
from .reho_base import ReHoBase
|
15
15
|
|
16
16
|
|
17
|
+
__all__ = ["ReHoSpheres"]
|
18
|
+
|
19
|
+
|
17
20
|
@register_marker
|
18
21
|
class ReHoSpheres(ReHoBase):
|
19
22
|
"""Class for regional homogeneity on spheres.
|
@@ -48,7 +51,7 @@ class ReHoSpheres(ReHoBase):
|
|
48
51
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
49
52
|
|
50
53
|
- 7 : for facewise neighbours only
|
51
|
-
- 19 : for face- and edge-wise
|
54
|
+
- 19 : for face- and edge-wise neighbours
|
52
55
|
- 27 : for face-, edge-, and node-wise neighbors
|
53
56
|
|
54
57
|
* ``neigh_rad`` : positive float, optional
|
@@ -78,7 +81,7 @@ class ReHoSpheres(ReHoBase):
|
|
78
81
|
Number of voxels in the neighbourhood, inclusive. Can be:
|
79
82
|
|
80
83
|
* 7 : for facewise neighbours only
|
81
|
-
* 19 : for face- and edge-wise
|
84
|
+
* 19 : for face- and edge-wise neighbours
|
82
85
|
* 27 : for face-, edge-, and node-wise neighbors
|
83
86
|
* 125 : for 5x5 cuboidal volume
|
84
87
|
|
@@ -10,6 +10,9 @@ from ..parcel_aggregation import ParcelAggregation
|
|
10
10
|
from .temporal_snr_base import TemporalSNRBase
|
11
11
|
|
12
12
|
|
13
|
+
__all__ = ["TemporalSNRParcels"]
|
14
|
+
|
15
|
+
|
13
16
|
@register_marker
|
14
17
|
class TemporalSNRParcels(TemporalSNRBase):
|
15
18
|
"""Class for temporal signal-to-noise ratio using parcellations.
|
@@ -11,6 +11,9 @@ from ..utils import raise_error
|
|
11
11
|
from .temporal_snr_base import TemporalSNRBase
|
12
12
|
|
13
13
|
|
14
|
+
__all__ = ["TemporalSNRSpheres"]
|
15
|
+
|
16
|
+
|
14
17
|
@register_marker
|
15
18
|
class TemporalSNRSpheres(TemporalSNRBase):
|
16
19
|
"""Class for temporal signal-to-noise ratio using coordinates (spheres).
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"""Provide tests for BrainPrint."""
|
2
|
+
|
3
|
+
# Authors: Synchon Mandal <s.mandal@fz-juelich.de>
|
4
|
+
# License: AGPL
|
5
|
+
|
6
|
+
import socket
|
7
|
+
|
8
|
+
import pytest
|
9
|
+
|
10
|
+
from junifer.datagrabber import DataladAOMICID1000
|
11
|
+
from junifer.datareader import DefaultDataReader
|
12
|
+
from junifer.markers import BrainPrint
|
13
|
+
from junifer.pipeline.utils import _check_freesurfer
|
14
|
+
|
15
|
+
|
16
|
+
def test_get_output_type() -> None:
|
17
|
+
"""Test BrainPrint get_output_type()."""
|
18
|
+
marker = BrainPrint()
|
19
|
+
assert marker.get_output_type("FreeSurfer") == "vector"
|
20
|
+
|
21
|
+
|
22
|
+
def test_validate() -> None:
|
23
|
+
"""Test BrainPrint validate()."""
|
24
|
+
marker = BrainPrint()
|
25
|
+
assert set(marker.validate(["FreeSurfer"])) == {"scalar_table", "vector"}
|
26
|
+
|
27
|
+
|
28
|
+
@pytest.mark.skipif(
|
29
|
+
_check_freesurfer() is False, reason="requires FreeSurfer to be in PATH"
|
30
|
+
)
|
31
|
+
@pytest.mark.skipif(
|
32
|
+
socket.gethostname() != "juseless",
|
33
|
+
reason="only for juseless",
|
34
|
+
)
|
35
|
+
def test_compute() -> None:
|
36
|
+
"""Test BrainPrint compute()."""
|
37
|
+
with DataladAOMICID1000(types="FreeSurfer") as dg:
|
38
|
+
# Fetch element
|
39
|
+
element = dg["sub-0001"]
|
40
|
+
# Fetch element data
|
41
|
+
element_data = DefaultDataReader().fit_transform(element)
|
42
|
+
# Initialize the marker
|
43
|
+
marker = BrainPrint()
|
44
|
+
# Compute the marker
|
45
|
+
feature_map = marker.fit_transform(element_data)
|
46
|
+
# Assert the output keys
|
47
|
+
assert {"eigenvalues", "areas", "volumes"} == set(feature_map.keys())
|