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.
Files changed (134) hide show
  1. junifer/__init__.py +17 -0
  2. junifer/_version.py +2 -2
  3. junifer/api/__init__.py +3 -0
  4. junifer/api/decorators.py +9 -0
  5. junifer/api/functions.py +7 -4
  6. junifer/api/parser.py +3 -0
  7. junifer/api/queue_context/__init__.py +3 -0
  8. junifer/api/res/afni/run_afni_docker.sh +1 -1
  9. junifer/api/res/ants/run_ants_docker.sh +1 -1
  10. junifer/api/res/fsl/run_fsl_docker.sh +1 -1
  11. junifer/api/tests/test_api_utils.py +2 -0
  12. junifer/configs/juseless/__init__.py +3 -0
  13. junifer/configs/juseless/datagrabbers/__init__.py +9 -0
  14. junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +3 -0
  15. junifer/configs/juseless/datagrabbers/camcan_vbm.py +3 -0
  16. junifer/configs/juseless/datagrabbers/ixi_vbm.py +3 -0
  17. junifer/configs/juseless/datagrabbers/ucla.py +3 -0
  18. junifer/configs/juseless/datagrabbers/ukb_vbm.py +3 -0
  19. junifer/data/__init__.py +20 -0
  20. junifer/data/coordinates.py +8 -0
  21. junifer/data/masks.py +10 -0
  22. junifer/data/parcellations.py +9 -0
  23. junifer/data/template_spaces.py +3 -0
  24. junifer/data/tests/test_masks.py +1 -1
  25. junifer/data/utils.py +3 -0
  26. junifer/datagrabber/__init__.py +15 -0
  27. junifer/datagrabber/aomic/__init__.py +3 -0
  28. junifer/datagrabber/aomic/id1000.py +3 -0
  29. junifer/datagrabber/aomic/piop1.py +3 -0
  30. junifer/datagrabber/aomic/piop2.py +3 -0
  31. junifer/datagrabber/base.py +3 -0
  32. junifer/datagrabber/datalad_base.py +3 -0
  33. junifer/datagrabber/hcp1200/__init__.py +3 -0
  34. junifer/datagrabber/hcp1200/datalad_hcp1200.py +3 -0
  35. junifer/datagrabber/hcp1200/hcp1200.py +3 -0
  36. junifer/datagrabber/multiple.py +3 -0
  37. junifer/datagrabber/pattern.py +5 -1
  38. junifer/datagrabber/pattern_datalad.py +3 -0
  39. junifer/datagrabber/utils.py +3 -0
  40. junifer/datareader/__init__.py +3 -0
  41. junifer/datareader/default.py +3 -0
  42. junifer/external/BrainPrint/brainprint/__init__.py +4 -0
  43. junifer/external/BrainPrint/brainprint/_version.py +3 -0
  44. junifer/external/BrainPrint/brainprint/asymmetry.py +91 -0
  45. junifer/external/BrainPrint/brainprint/brainprint.py +441 -0
  46. junifer/external/BrainPrint/brainprint/surfaces.py +258 -0
  47. junifer/external/BrainPrint/brainprint/utils/__init__.py +1 -0
  48. junifer/external/BrainPrint/brainprint/utils/_config.py +112 -0
  49. junifer/external/BrainPrint/brainprint/utils/utils.py +188 -0
  50. junifer/markers/__init__.py +22 -0
  51. junifer/markers/base.py +21 -7
  52. junifer/markers/brainprint.py +665 -0
  53. junifer/markers/collection.py +3 -0
  54. junifer/markers/complexity/__init__.py +10 -0
  55. junifer/markers/complexity/complexity_base.py +3 -0
  56. junifer/markers/complexity/hurst_exponent.py +3 -0
  57. junifer/markers/complexity/multiscale_entropy_auc.py +3 -0
  58. junifer/markers/complexity/perm_entropy.py +3 -0
  59. junifer/markers/complexity/range_entropy.py +3 -0
  60. junifer/markers/complexity/range_entropy_auc.py +3 -0
  61. junifer/markers/complexity/sample_entropy.py +3 -0
  62. junifer/markers/complexity/tests/test_hurst_exponent.py +7 -0
  63. junifer/markers/complexity/tests/test_multiscale_entropy_auc.py +7 -0
  64. junifer/markers/complexity/tests/test_perm_entropy.py +7 -0
  65. junifer/markers/complexity/tests/test_range_entropy.py +7 -0
  66. junifer/markers/complexity/tests/test_range_entropy_auc.py +7 -0
  67. junifer/markers/complexity/tests/test_sample_entropy.py +7 -0
  68. junifer/markers/complexity/tests/test_weighted_perm_entropy.py +7 -0
  69. junifer/markers/complexity/weighted_perm_entropy.py +3 -0
  70. junifer/markers/ets_rss.py +3 -0
  71. junifer/markers/falff/__init__.py +3 -0
  72. junifer/markers/falff/_afni_falff.py +3 -0
  73. junifer/markers/falff/_junifer_falff.py +3 -0
  74. junifer/markers/falff/falff_base.py +3 -0
  75. junifer/markers/falff/falff_parcels.py +3 -0
  76. junifer/markers/falff/falff_spheres.py +3 -0
  77. junifer/markers/functional_connectivity/__init__.py +9 -0
  78. junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +3 -0
  79. junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +3 -0
  80. junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +3 -0
  81. junifer/markers/functional_connectivity/functional_connectivity_base.py +3 -0
  82. junifer/markers/functional_connectivity/functional_connectivity_parcels.py +3 -0
  83. junifer/markers/functional_connectivity/functional_connectivity_spheres.py +3 -0
  84. junifer/markers/parcel_aggregation.py +3 -0
  85. junifer/markers/reho/__init__.py +3 -0
  86. junifer/markers/reho/_afni_reho.py +4 -1
  87. junifer/markers/reho/_junifer_reho.py +4 -1
  88. junifer/markers/reho/reho_base.py +2 -0
  89. junifer/markers/reho/reho_parcels.py +5 -2
  90. junifer/markers/reho/reho_spheres.py +5 -2
  91. junifer/markers/sphere_aggregation.py +3 -0
  92. junifer/markers/temporal_snr/__init__.py +3 -0
  93. junifer/markers/temporal_snr/temporal_snr_base.py +3 -0
  94. junifer/markers/temporal_snr/temporal_snr_parcels.py +3 -0
  95. junifer/markers/temporal_snr/temporal_snr_spheres.py +3 -0
  96. junifer/markers/tests/test_brainprint.py +47 -0
  97. junifer/onthefly/__init__.py +3 -0
  98. junifer/onthefly/read_transform.py +3 -0
  99. junifer/pipeline/__init__.py +8 -0
  100. junifer/pipeline/pipeline_step_mixin.py +3 -0
  101. junifer/pipeline/registry.py +3 -0
  102. junifer/pipeline/singleton.py +3 -0
  103. junifer/pipeline/update_meta_mixin.py +3 -0
  104. junifer/pipeline/utils.py +3 -0
  105. junifer/pipeline/workdir_manager.py +3 -0
  106. junifer/preprocess/__init__.py +8 -0
  107. junifer/preprocess/base.py +4 -1
  108. junifer/preprocess/confounds/__init__.py +3 -0
  109. junifer/preprocess/confounds/fmriprep_confound_remover.py +3 -0
  110. junifer/preprocess/smoothing/__init__.py +3 -0
  111. junifer/preprocess/warping/__init__.py +3 -0
  112. junifer/preprocess/warping/_ants_warper.py +3 -0
  113. junifer/preprocess/warping/_fsl_warper.py +3 -0
  114. junifer/stats.py +3 -0
  115. junifer/storage/__init__.py +8 -0
  116. junifer/storage/base.py +3 -0
  117. junifer/storage/hdf5.py +3 -0
  118. junifer/storage/pandas_base.py +3 -0
  119. junifer/storage/sqlite.py +3 -0
  120. junifer/storage/utils.py +9 -0
  121. junifer/testing/__init__.py +3 -0
  122. junifer/testing/datagrabbers.py +7 -0
  123. junifer/testing/utils.py +3 -0
  124. junifer/utils/__init__.py +10 -0
  125. junifer/utils/fs.py +3 -0
  126. junifer/utils/helpers.py +3 -0
  127. junifer/utils/logging.py +10 -0
  128. {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/METADATA +2 -1
  129. {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/RECORD +134 -124
  130. {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/AUTHORS.rst +0 -0
  131. {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/LICENSE.md +0 -0
  132. {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/WHEEL +0 -0
  133. {junifer-0.0.5.dev110.dist-info → junifer-0.0.5.dev145.dist-info}/entry_points.txt +0 -0
  134. {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__ = ["HurstExponent"]
18
+
19
+
17
20
  @register_marker
18
21
  class HurstExponent(ComplexityBase):
19
22
  """Class for Hurst exponent 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__ = ["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__ = ["PermEntropy"]
18
+
19
+
17
20
  @register_marker
18
21
  class PermEntropy(ComplexityBase):
19
22
  """Class for permutation 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__ = ["RangeEntropy"]
18
+
19
+
17
20
  @register_marker
18
21
  class RangeEntropy(ComplexityBase):
19
22
  """Class for range 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,9 @@ from ...utils import logger, warn_with_log
14
14
  from .complexity_base import ComplexityBase
15
15
 
16
16
 
17
+ __all__ = ["SampleEntropy"]
18
+
19
+
17
20
  @register_marker
18
21
  class SampleEntropy(ComplexityBase):
19
22
  """Class for sample entropy of a time series.
@@ -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.
@@ -17,6 +17,9 @@ from .parcel_aggregation import ParcelAggregation
17
17
  from .utils import _ets
18
18
 
19
19
 
20
+ __all__ = ["RSSETSMarker"]
21
+
22
+
20
23
  @register_marker
21
24
  class RSSETSMarker(BaseMarker):
22
25
  """Class for root sum of squares of edgewise timeseries.
@@ -5,3 +5,6 @@
5
5
 
6
6
  from .falff_parcels import ALFFParcels
7
7
  from .falff_spheres import ALFFSpheres
8
+
9
+
10
+ __all__ = ["ALFFParcels", "ALFFSpheres"]
@@ -26,6 +26,9 @@ if TYPE_CHECKING:
26
26
  from nibabel import Nifti1Image
27
27
 
28
28
 
29
+ __all__ = ["AFNIALFF"]
30
+
31
+
29
32
  @singleton
30
33
  class AFNIALFF:
31
34
  """Class for computing ALFF using AFNI.
@@ -27,6 +27,9 @@ if TYPE_CHECKING:
27
27
  from nibabel import Nifti1Image
28
28
 
29
29
 
30
+ __all__ = ["JuniferALFF"]
31
+
32
+
30
33
  @singleton
31
34
  class JuniferALFF:
32
35
  """Class for computing ALFF using junifer.
@@ -29,6 +29,9 @@ if TYPE_CHECKING:
29
29
  from nibabel import Nifti1Image
30
30
 
31
31
 
32
+ __all__ = ["ALFFBase"]
33
+
34
+
32
35
  class ALFFBase(BaseMarker):
33
36
  """Base class for (fractional) Amplitude Low Frequency Fluctuation.
34
37
 
@@ -14,6 +14,9 @@ from ..parcel_aggregation import ParcelAggregation
14
14
  from .falff_base import ALFFBase
15
15
 
16
16
 
17
+ __all__ = ["ALFFParcels"]
18
+
19
+
17
20
  @register_marker
18
21
  class ALFFParcels(ALFFBase):
19
22
  """Class for ALFF / fALFF on parcels.
@@ -14,6 +14,9 @@ from ..sphere_aggregation import SphereAggregation
14
14
  from .falff_base import ALFFBase
15
15
 
16
16
 
17
+ __all__ = ["ALFFSpheres"]
18
+
19
+
17
20
  @register_marker
18
21
  class ALFFSpheres(ALFFBase):
19
22
  """Class for computing ALFF / fALFF on spheres.
@@ -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).
@@ -14,6 +14,9 @@ from ...utils import raise_error
14
14
  from ..base import BaseMarker
15
15
 
16
16
 
17
+ __all__ = ["FunctionalConnectivityBase"]
18
+
19
+
17
20
  class FunctionalConnectivityBase(BaseMarker):
18
21
  """Abstract base class for functional connectivity markers.
19
22
 
@@ -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).
@@ -17,6 +17,9 @@ from ..utils import logger, raise_error, warn_with_log
17
17
  from .base import BaseMarker
18
18
 
19
19
 
20
+ __all__ = ["ParcelAggregation"]
21
+
22
+
20
23
  @register_marker
21
24
  class ParcelAggregation(BaseMarker):
22
25
  """Class for parcel aggregation.
@@ -5,3 +5,6 @@
5
5
 
6
6
  from .reho_parcels import ReHoParcels
7
7
  from .reho_spheres import ReHoSpheres
8
+
9
+
10
+ __all__ = ["ReHoParcels", "ReHoSpheres"]
@@ -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 nieghbours
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 nieghbours
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
 
@@ -26,6 +26,8 @@ from ._junifer_reho import JuniferReHo
26
26
  if TYPE_CHECKING:
27
27
  from nibabel import Nifti1Image
28
28
 
29
+ __all__ = ["ReHoBase"]
30
+
29
31
 
30
32
  class ReHoBase(BaseMarker):
31
33
  """Base class for regional homogeneity computation.
@@ -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 nieghbours
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 nieghbours
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 nieghbours
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 nieghbours
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
 
@@ -14,6 +14,9 @@ from ..utils import logger, raise_error, warn_with_log
14
14
  from .base import BaseMarker
15
15
 
16
16
 
17
+ __all__ = ["SphereAggregation"]
18
+
19
+
17
20
  @register_marker
18
21
  class SphereAggregation(BaseMarker):
19
22
  """Class for sphere aggregation.
@@ -5,3 +5,6 @@
5
5
 
6
6
  from .temporal_snr_parcels import TemporalSNRParcels
7
7
  from .temporal_snr_spheres import TemporalSNRSpheres
8
+
9
+
10
+ __all__ = ["TemporalSNRParcels", "TemporalSNRSpheres"]
@@ -13,6 +13,9 @@ from ...utils import raise_error
13
13
  from ..base import BaseMarker
14
14
 
15
15
 
16
+ __all__ = ["TemporalSNRBase"]
17
+
18
+
16
19
  class TemporalSNRBase(BaseMarker):
17
20
  """Abstract base class for temporal SNR markers.
18
21
 
@@ -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())
@@ -4,3 +4,6 @@
4
4
  # License: AGPL
5
5
 
6
6
  from .read_transform import read_transform
7
+
8
+
9
+ __all__ = ["read_transform"]