junifer 0.0.2.dev297__tar.gz → 0.0.2.dev320__tar.gz

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 (293) hide show
  1. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/PKG-INFO +1 -1
  2. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/builtin.rst +2 -0
  3. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/changes/latest.inc +4 -0
  4. junifer-0.0.2.dev320/docs/extending/coordinates.rst +132 -0
  5. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/extending/index.rst +4 -1
  6. junifer-0.0.2.dev320/docs/extending/masks.rst +82 -0
  7. junifer-0.0.2.dev320/docs/extending/parcellations.rst +123 -0
  8. junifer-0.0.2.dev320/junifer/_version.py +4 -0
  9. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/__init__.py +1 -0
  10. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/coordinates.py +4 -1
  11. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/parcellations.py +83 -2
  12. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/tests/test_parcellations.py +173 -48
  13. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/datalad_base.py +1 -3
  14. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/parcel_aggregation.py +10 -62
  15. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer.egg-info/PKG-INFO +1 -1
  16. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer.egg-info/SOURCES.txt +3 -0
  17. junifer-0.0.2.dev297/junifer/_version.py +0 -4
  18. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  19. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  20. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/dataset-request.yml +0 -0
  21. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/documention-request.yml +0 -0
  22. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  23. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/marker-request.yml +0 -0
  24. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/pull_request_template.md +0 -0
  25. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/workflows/ci-docs.yml +0 -0
  26. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/workflows/ci.yml +0 -0
  27. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/workflows/docs-preview.yml +0 -0
  28. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/workflows/docs.yml +0 -0
  29. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/workflows/lint.yml +0 -0
  30. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.github/workflows/pypi.yml +0 -0
  31. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.gitignore +0 -0
  32. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/.gitmodules +0 -0
  33. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/AUTHORS.rst +0 -0
  34. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/LICENSE.md +0 -0
  35. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/README.md +0 -0
  36. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/codecov.yml +0 -0
  37. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/conda-env.yml +0 -0
  38. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/Makefile +0 -0
  39. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/_static/css/custom.css +0 -0
  40. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/_static/js/custom.js +0 -0
  41. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/_templates/versions.html +0 -0
  42. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/api.rst +0 -0
  43. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/configs.rst +0 -0
  44. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/data.rst +0 -0
  45. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/datagrabbers.rst +0 -0
  46. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/datareaders.rst +0 -0
  47. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/index.rst +0 -0
  48. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/markers.rst +0 -0
  49. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/nilearn.rst +0 -0
  50. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/pipeline.rst +0 -0
  51. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/preprocessing.rst +0 -0
  52. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/stats.rst +0 -0
  53. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/storage.rst +0 -0
  54. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/testing.rst +0 -0
  55. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/api/utils.rst +0 -0
  56. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/changes/0.0.1.inc +0 -0
  57. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/changes/contributors.inc +0 -0
  58. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/conf.py +0 -0
  59. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/contribution.rst +0 -0
  60. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/extending/datagrabber.rst +0 -0
  61. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/extending/extension.rst +0 -0
  62. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/extending/marker.rst +0 -0
  63. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/faq.rst +0 -0
  64. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/images/junifer_logo.png +0 -0
  65. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/images/pipeline/pipeline.001.png +0 -0
  66. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/images/pipeline/pipeline.002.png +0 -0
  67. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/index.rst +0 -0
  68. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/installation.rst +0 -0
  69. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/links.inc +0 -0
  70. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/maintaining.rst +0 -0
  71. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/redirect.html +0 -0
  72. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/sphinxext/gh_substitutions.py +0 -0
  73. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/data.rst +0 -0
  74. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/datagrabber.rst +0 -0
  75. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/datareader.rst +0 -0
  76. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/index.rst +0 -0
  77. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/marker.rst +0 -0
  78. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/pipeline.rst +0 -0
  79. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/preprocess.rst +0 -0
  80. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/understanding/storage.rst +0 -0
  81. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/using/codeless.rst +0 -0
  82. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/using/index.rst +0 -0
  83. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/using/masks.rst +0 -0
  84. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/using/queueing.rst +0 -0
  85. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/using/running.rst +0 -0
  86. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/docs/whats_new.rst +0 -0
  87. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/README.rst +0 -0
  88. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/norun_hcpfc_pearson.py +0 -0
  89. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/norun_ukbvm_gmd.py +0 -0
  90. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/run_compute_parcel_mean.py +0 -0
  91. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/run_datagrabber_bids_datalad.py +0 -0
  92. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/run_ets_rss_marker.py +0 -0
  93. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/run_junifer_julearn.py +0 -0
  94. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/run_run_gmd_mean.py +0 -0
  95. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/yamls/gmd_mean.yaml +0 -0
  96. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/yamls/gmd_mean_htcondor.yaml +0 -0
  97. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/examples/yamls/ukb_gmd_mean.yaml +0 -0
  98. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/ignore_words.txt +0 -0
  99. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/__init__.py +0 -0
  100. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/__init__.py +0 -0
  101. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/cli.py +0 -0
  102. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/decorators.py +0 -0
  103. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/functions.py +0 -0
  104. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/parser.py +0 -0
  105. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/res/afni/3dAFNItoNIFTI +0 -0
  106. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/res/afni/3dRSFC +0 -0
  107. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/res/afni/3dReHo +0 -0
  108. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/res/afni/afni +0 -0
  109. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/res/afni/run_afni_docker.sh +0 -0
  110. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/res/run_conda.sh +0 -0
  111. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/tests/data/gmd_mean.yaml +0 -0
  112. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/tests/data/gmd_mean_htcondor.yaml +0 -0
  113. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/tests/test_api_utils.py +0 -0
  114. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/tests/test_cli.py +0 -0
  115. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/tests/test_functions.py +0 -0
  116. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/tests/test_parser.py +0 -0
  117. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/api/utils.py +0 -0
  118. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/__init__.py +0 -0
  119. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/__init__.py +0 -0
  120. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/__init__.py +0 -0
  121. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +0 -0
  122. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/camcan_vbm.py +0 -0
  123. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/ixi_vbm.py +0 -0
  124. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_aomic_id1000_vbm.py +0 -0
  125. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_camcan_vbm.py +0 -0
  126. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_ixi_vbm.py +0 -0
  127. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_ucla.py +0 -0
  128. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_ukb_vbm.py +0 -0
  129. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/ucla.py +0 -0
  130. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/ukb_vbm.py +0 -0
  131. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/configs/tests/test_juseless.py +0 -0
  132. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/CogAC_VOIs.txt +0 -0
  133. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/CogAR_VOIs.txt +0 -0
  134. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/DMNBuckner_VOIs.txt +0 -0
  135. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Dosenbach2010_MNI_VOIs.txt +0 -0
  136. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Empathy_VOIs.txt +0 -0
  137. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Motor_VOIs.txt +0 -0
  138. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/MultiTask_VOIs.txt +0 -0
  139. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/PhysioStress_VOIs.txt +0 -0
  140. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Power2011_MNI_VOIs.txt +0 -0
  141. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Rew_VOIs.txt +0 -0
  142. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Somatosensory_VOIs.txt +0 -0
  143. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/ToM_VOIs.txt +0 -0
  144. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/VigAtt_VOIs.txt +0 -0
  145. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/WM_VOIs.txt +0 -0
  146. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/eMDN_VOIs.txt +0 -0
  147. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/eSAD_VOIs.txt +0 -0
  148. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/extDMN_VOIs.txt +0 -0
  149. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/masks/vickery-patil/CAT12_IXI555_MNI152_TMP_GS_GMprob0.2_clean.nii.gz +0 -0
  150. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/masks/vickery-patil/CAT12_IXI555_MNI152_TMP_GS_GMprob0.2_clean_3mm.nii.gz +0 -0
  151. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/masks/vickery-patil/GMprob0.2_cortex_3mm_NA_rm.nii.gz +0 -0
  152. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/masks.py +0 -0
  153. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/tests/test_coordinates.py +0 -0
  154. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/tests/test_data_utils.py +0 -0
  155. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/tests/test_masks.py +0 -0
  156. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/data/utils.py +0 -0
  157. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/__init__.py +0 -0
  158. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/__init__.py +0 -0
  159. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/id1000.py +0 -0
  160. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/piop1.py +0 -0
  161. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/piop2.py +0 -0
  162. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/tests/test_id1000.py +0 -0
  163. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/tests/test_piop1.py +0 -0
  164. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/tests/test_piop2.py +0 -0
  165. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/base.py +0 -0
  166. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/hcp.py +0 -0
  167. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/multiple.py +0 -0
  168. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/pattern.py +0 -0
  169. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/pattern_datalad.py +0 -0
  170. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_base.py +0 -0
  171. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_datagrabber_utils.py +0 -0
  172. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_datalad_base.py +0 -0
  173. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_hcp.py +0 -0
  174. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_multiple.py +0 -0
  175. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_pattern.py +0 -0
  176. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_pattern_datalad.py +0 -0
  177. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datagrabber/utils.py +0 -0
  178. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datareader/__init__.py +0 -0
  179. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datareader/default.py +0 -0
  180. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/datareader/tests/test_default_reader.py +0 -0
  181. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/__init__.py +0 -0
  182. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/__init__.py +0 -0
  183. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/_h5io.py +0 -0
  184. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/_version.py +0 -0
  185. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/chunked_array.py +0 -0
  186. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/chunked_list.py +0 -0
  187. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/nilearn/__init__.py +0 -0
  188. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/nilearn/junifer_nifti_spheres_masker.py +0 -0
  189. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/external/nilearn/tests/test_junifer_nifti_spheres_masker.py +0 -0
  190. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/__init__.py +0 -0
  191. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/base.py +0 -0
  192. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/collection.py +0 -0
  193. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/ets_rss.py +0 -0
  194. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/__init__.py +0 -0
  195. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_base.py +0 -0
  196. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_estimator.py +0 -0
  197. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_parcels.py +0 -0
  198. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_spheres.py +0 -0
  199. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/tests/test_falff_estimator.py +0 -0
  200. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/tests/test_falff_parcels.py +0 -0
  201. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/falff/tests/test_falff_spheres.py +0 -0
  202. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/__init__.py +0 -0
  203. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +0 -0
  204. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +0 -0
  205. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +0 -0
  206. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/functional_connectivity_base.py +0 -0
  207. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/functional_connectivity_parcels.py +0 -0
  208. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/functional_connectivity_spheres.py +0 -0
  209. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_crossparcellation_functional_connectivity.py +0 -0
  210. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +0 -0
  211. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +0 -0
  212. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_functional_connectivity_base.py +0 -0
  213. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +0 -0
  214. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +0 -0
  215. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/__init__.py +0 -0
  216. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_base.py +0 -0
  217. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_estimator.py +0 -0
  218. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_parcels.py +0 -0
  219. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_spheres.py +0 -0
  220. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/tests/test_reho_estimator.py +0 -0
  221. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/tests/test_reho_parcels.py +0 -0
  222. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/reho/tests/test_reho_spheres.py +0 -0
  223. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/sphere_aggregation.py +0 -0
  224. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/__init__.py +0 -0
  225. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/temporal_snr_base.py +0 -0
  226. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/temporal_snr_parcels.py +0 -0
  227. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/temporal_snr_spheres.py +0 -0
  228. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/tests/test_temporal_snr_base.py +0 -0
  229. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/tests/test_temporal_snr_parcels.py +0 -0
  230. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/tests/test_temporal_snr_spheres.py +0 -0
  231. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/tests/test_collection.py +0 -0
  232. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/tests/test_ets_rss.py +0 -0
  233. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/tests/test_marker_utils.py +0 -0
  234. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/tests/test_markers_base.py +0 -0
  235. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/tests/test_parcel_aggregation.py +0 -0
  236. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/tests/test_sphere_aggregation.py +0 -0
  237. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/markers/utils.py +0 -0
  238. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/__init__.py +0 -0
  239. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/pipeline_step_mixin.py +0 -0
  240. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/registry.py +0 -0
  241. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/tests/test_pipeline_step_mixin.py +0 -0
  242. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/tests/test_registry.py +0 -0
  243. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/tests/test_update_meta_mixin.py +0 -0
  244. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/update_meta_mixin.py +0 -0
  245. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/pipeline/utils.py +0 -0
  246. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/preprocess/__init__.py +0 -0
  247. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/preprocess/base.py +0 -0
  248. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/preprocess/confounds/__init__.py +0 -0
  249. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/preprocess/confounds/fmriprep_confound_remover.py +0 -0
  250. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +0 -0
  251. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/preprocess/tests/test_preprocess_base.py +0 -0
  252. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/stats.py +0 -0
  253. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/__init__.py +0 -0
  254. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/base.py +0 -0
  255. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/hdf5.py +0 -0
  256. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/pandas_base.py +0 -0
  257. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/sqlite.py +0 -0
  258. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/tests/test_hdf5.py +0 -0
  259. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/tests/test_pandas_base.py +0 -0
  260. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/tests/test_sqlite.py +0 -0
  261. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/tests/test_storage_base.py +0 -0
  262. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/tests/test_utils.py +0 -0
  263. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/storage/utils.py +0 -0
  264. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/__init__.py +0 -0
  265. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/data/sub-0001_task-anticipation_acq-seq_desc-confounds_regressors.tsv +0 -0
  266. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/datagrabbers.py +0 -0
  267. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/registry.py +0 -0
  268. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/tests/test_oasisvmbtesting_datagrabber.py +0 -0
  269. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/tests/test_partlycloudytesting_datagrabber.py +0 -0
  270. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/tests/test_spmauditory_datagrabber.py +0 -0
  271. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/tests/test_testing_registry.py +0 -0
  272. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/testing/utils.py +0 -0
  273. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/tests/test_main.py +0 -0
  274. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/tests/test_stats.py +0 -0
  275. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/utils/__init__.py +0 -0
  276. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/utils/fs.py +0 -0
  277. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/utils/logging.py +0 -0
  278. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/utils/tests/test_fs.py +0 -0
  279. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer/utils/tests/test_logging.py +0 -0
  280. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer.egg-info/dependency_links.txt +0 -0
  281. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer.egg-info/entry_points.txt +0 -0
  282. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer.egg-info/requires.txt +0 -0
  283. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/junifer.egg-info/top_level.txt +0 -0
  284. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/pyproject.toml +0 -0
  285. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/setup.cfg +0 -0
  286. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/setup.py +0 -0
  287. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tools/create_aomic1000_example_dataset.py +0 -0
  288. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tools/create_aomicpiop1_example_dataset.py +0 -0
  289. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tools/create_aomicpiop2_example_dataset.py +0 -0
  290. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tools/create_bids_example_dataset.py +0 -0
  291. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tools/create_bids_example_dataset_sessions.py +0 -0
  292. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tools/create_hcp1200_example_dataset.py +0 -0
  293. {junifer-0.0.2.dev297 → junifer-0.0.2.dev320}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junifer
3
- Version: 0.0.2.dev297
3
+ Version: 0.0.2.dev320
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,5 +1,7 @@
1
1
  .. include:: links.inc
2
2
 
3
+ .. _builtin:
4
+
3
5
  Built-in Pipeline steps and data
4
6
  ================================
5
7
 
@@ -65,6 +65,10 @@ Enhancements
65
65
 
66
66
  - Force datalad to be non-interactive on _queued_ jobs (:gh:`201` by `Fede Raimondo`_).
67
67
 
68
+ - Add more documentation on registering parcellations, coordinates, and masks (:gh:`166` by `Leonard Sasse`_)
69
+
70
+ - Expose a :func:`junifer.data.parcellations.merge_parcellations` function to merge a list of parcellations (:gh:`146` by Leonard Sasse`_).
71
+
68
72
  Bugs
69
73
  ~~~~
70
74
 
@@ -0,0 +1,132 @@
1
+ .. include:: ../links.inc
2
+
3
+ .. _adding_coordinates:
4
+
5
+ Adding Coordinates
6
+ ==================
7
+
8
+ Instead of using whole-brain parcellations to aggregate voxel-wise signals from
9
+ MR images (as for example in the
10
+ :class:`junifer.markers.parcel_aggregation.ParcelAggregation` marker), Junifer
11
+ allows you to specify a set of coordinates around which to draw spheres to
12
+ aggregate (for example using the
13
+ :class:`junifer.markers.sphere_aggregation.SphereAggregation` marker) the MR
14
+ signals from individual voxels. Now, before you start specifying your own sets
15
+ of coordinates, check the coordinates that Junifer already has
16
+ :ref:`built in already<builtin>`. If you simply want to use a well known set of
17
+ coordinates from the literature, there is a reasonable chance, that Junifer
18
+ provides them already.
19
+
20
+ If you checked the in-built coordinates, and they are not there already (for
21
+ example if you came up with your own set of coordinates), then Junifer provides
22
+ an easy way for you to register them using the
23
+ :func:`junifer.data.coordinates.register_coordinates` function, so you can use
24
+ your own set of coordinates within a Junifer pipeline.
25
+
26
+ From the API reference, we can see that it has 3 positional arguments
27
+ (``name``, ``coordinates``, and ``voi_names``) as well as one
28
+ optional keyword argument (``overwrite``).
29
+
30
+ The ``name`` argument takes a string indicating the name you want to give to
31
+ this set of coordinates. This ``name`` can be used to obtain and operate on a
32
+ set of coordinates in Junifer. For example, you can obtain your coordinates
33
+ after registration by providing ``name`` to
34
+ :func:`junifer.data.coordinates.load_coordinates`. We could simply call it
35
+ ``"my_set_of_coordinates"``, but likely you want a more descriptive and more
36
+ informative name most of the time.
37
+
38
+ The ``coordinates`` argument takes the actual coordinates as a 2-dimensional
39
+ :func:`numpy.array`. It contains one row for every location, and three columns
40
+ (one for each spatial dimension). That is, the first, second, and third columns
41
+ indicate the x-, y-, and z-coordinates in MNI space respectively. Note, that
42
+ Junifer (as of yet) only works in MNI space, and so therefore these coordinates
43
+ should always be real-world coordinates of the MNI space. From this description
44
+ it follows that the number of rows in the array correspond to the number of
45
+ coordinates that belong to this set.
46
+
47
+ Lastly, the ``voi_names`` argument takes a list of strings indicating the names
48
+ of each coordinate (i.e. volume-of-interest) in the ``coordinates`` array.
49
+ Therefore, the length of this list should correspond to the number of rows in
50
+ the coordinates array. Now, we know everything we need to register a set of
51
+ coordinates.
52
+
53
+ Step 1: Prepare code to register a set of coordinates
54
+ -----------------------------------------------------
55
+
56
+ Let's make a simple script to register our coordinates. We could simply call it
57
+ ``register_coordinates.py``. We may start by importing the appropriate
58
+ packages:
59
+
60
+ .. code-block:: python
61
+
62
+ from junifer.data import register_coordinates
63
+ import numpy as np
64
+
65
+ For the sake of this example, we can create a set of coordinates that belong
66
+ to the default mode network (DMN), and register this set of coordinates with
67
+ Junifer. Note, that Junifer already has a
68
+ :ref:`set of coordinates built-in<builtin>` ("DMNBuckner") that is associated
69
+ with the DMN. Here, we use the DMN coordinates used in a
70
+ `nilearn example <https://nilearn.github.io/dev/auto_examples/03_connectivity/plot_sphere_based_connectome.html>`_.
71
+
72
+ .. code-block:: python
73
+
74
+ dmn_coords = np.array(
75
+ [[0, -52, 18],
76
+ [-46, -68, 32],
77
+ [46, -68, 32],
78
+ [1, 50, -5]]
79
+ )
80
+ voi_names = [
81
+ "Posterior Cingulate Cortex",
82
+ "Left Temporoparietal junction",
83
+ "Right Temporoparietal junction",
84
+ "Medial prefrontal cortex",
85
+ ]
86
+
87
+ As you can see, we have four rows, and therefore four locations in the brain
88
+ associated with this set of coordinates. The variable ``voi_names`` reflects this
89
+ as it contains four strings indicating the name of each location. We can now
90
+ simply use this to register our coordinates:
91
+
92
+ .. code-block:: python
93
+
94
+ register_coordinates(
95
+ name="DMNCustom",
96
+ coordinates=dmn_coords,
97
+ voi_names=voi_names
98
+ )
99
+
100
+ Now, when we run this script, Junifer registers these coordinates and we can
101
+ use them in subsequent analyses. Let's now consider how to use coordinate
102
+ registration in combination with
103
+ :ref:`codeless configuration using a YAML file<codeless>`.
104
+
105
+ Step 2: Add coordinate registration to the YAML file
106
+ ----------------------------------------------------
107
+
108
+ In order to register your coordinates for a pipeline configured by a YAML file,
109
+ you can use the ``with`` keyword provided by Junifer:
110
+
111
+ .. code-block:: yaml
112
+
113
+ with:
114
+ - registering_my_parcellation.py
115
+
116
+ Afterwards continue configuring the rest of your pipeline in this YAML file,
117
+ and you will be able to use this set of coordinates using the name you gave it
118
+ during registration (in our example "DMNCustom"). We can add a
119
+ :class:`junifer.markers.sphere_aggregation.SphereAggregation` to demonstrate
120
+ how this can be done:
121
+
122
+ .. code-block:: yaml
123
+
124
+ markers:
125
+ - name: DMNCustom_mean
126
+ kind: SphereAggregation
127
+ coords: DMNCustom
128
+ radius: 5
129
+ method: mean
130
+
131
+ This will aggregate signals from a sphere around each of our coordinates with a
132
+ radius of 5mm.
@@ -25,4 +25,7 @@ datagrabbers, preprocessing and markers, following the *junifer* way.
25
25
 
26
26
  extension
27
27
  datagrabber
28
- marker
28
+ marker
29
+ parcellations
30
+ coordinates
31
+ masks
@@ -0,0 +1,82 @@
1
+ .. include:: ../links.inc
2
+
3
+ .. _adding_masks:
4
+
5
+ Adding Masks
6
+ ============
7
+
8
+ Many processing steps and markers in Junifer allow you to specify a binary
9
+ mask to select voxels you want to include in the analysis. There are a number
10
+ of masks :ref:`in-built in Junifer already<builtin>`, so check if any of them
11
+ suit your needs. Check how to use these masks :ref:`here<using_masks>`. Once
12
+ you know how to use these masks, and you checked whether the in-built masks
13
+ suit your needs, and you have found that they don't, you can come back here to
14
+ learn how to use your own masks.
15
+
16
+ The principle is fairly simple and quite similar to :ref:`adding_parcellations`
17
+ and :ref:`adding_coordinates`. Junifer provides a
18
+ :func:`junifer.data.masks.register_mask` function that lets you register your
19
+ own custom masks. It consists of two positional arguments (``name`` and
20
+ ``mask_path``) and one optional keyword argument (``overwrite``).
21
+
22
+ The ``name`` argument is a string indicating the name of the mask. This name
23
+ is used to refer to that mask in Junifer internally in order to obtain the
24
+ actual mask data and perform operations on it. For example, using the name you
25
+ can load a mask after registration using the
26
+ :func:`junifer.data.masks.load_mask` function.
27
+
28
+ The ``mask_path`` should contain the path to a valid NIfTI image with binary
29
+ voxel values (i.e. 0 or 1). This data can then be used by Junifer to mask other
30
+ MR images.
31
+
32
+ Step 1: Prepare code to register a mask
33
+ ---------------------------------------
34
+
35
+ A simple script called ``register_mask.py`` to register a mask could look as
36
+ follows:
37
+
38
+ .. code-block:: python
39
+
40
+ from junifer.data import register_custom_mask
41
+ from pathlib import Path
42
+
43
+ # this path is only an example, of course use the correct path
44
+ # on your system:
45
+ mask_path = Path("..") / ".." / "my_custom_mask.nii.gz"
46
+
47
+ register_mask(name="my_custom_mask", mask_path=mask_path)
48
+
49
+ Simple, right? Now we just have to configure a YAML file to register this mask
50
+ so we can use it for :ref:`codeless configuration of junifer<codeless>`.
51
+
52
+ Step 2: Configure a YAML file for registration of a mask
53
+ --------------------------------------------------------
54
+
55
+ In order to do this, we can use the ``with`` keyword provided by Junifer:
56
+
57
+ .. code-block:: yaml
58
+
59
+ with:
60
+ - register_custom_mask.py
61
+
62
+ Then we can use this mask for any processing step or marker that takes in a
63
+ mask as an argument. For example:
64
+
65
+ .. code-block:: yaml
66
+
67
+ markers:
68
+ - name: CustomMaskParcelAggregation_mean
69
+ kind: ParcelAggregation
70
+ parcellation: Schaefer200x17
71
+ method: mean
72
+ masks: "my_custom_mask"
73
+
74
+ Now, you can simply use this YAML file to run your pipeline. One important
75
+ point to keep in mind is that if the paths given in ``register_custom_mask.py``
76
+ are relative paths, they will be interpreted by Junifer as relative to the
77
+ jobs directory (i.e. where Junifer will create submit files, logs directory and
78
+ so on). For simplicity, you may just want to use absolute paths to avoid
79
+ confusion, yet using relative paths is likely a better way to make your
80
+ pipeline directory/repository more portable and therefore more reproducible for
81
+ others. Really, once you understand how these paths are interpreted by Junifer,
82
+ it is quite easy.
@@ -0,0 +1,123 @@
1
+ .. include:: ../links.inc
2
+
3
+ .. _adding_parcellations:
4
+
5
+ Adding Parcellations
6
+ ====================
7
+
8
+ Before you start adding your own parcellations, check whether Junifer has
9
+ the parcellation :ref:`in-built already<builtin>`. Perhaps, what is available
10
+ there will suffice to achieve your goals. However, of course Junifer will not
11
+ have every parcellation available that you may want to use, and if so, it will
12
+ be nice to be able to add it yourself using a format that Junifer understands.
13
+ Similarly, you may even be interested in creating your own custom parcellations
14
+ and then adding them to Junifer, so you can use Junifer to obtain different
15
+ markers to assess and validate your own parcellation. So, how can you do this?
16
+
17
+ Since both of these use-cases are quite common, and not being able to use your
18
+ favourite parcellation is of course quite a buzzkill, Junifer actually provides
19
+ the easy-to-use :func:`junifer.data.parcellations.register_parcellation`
20
+ function to do just that. Let's try to understand the API reference
21
+ and then use this function to register our own parcellation.
22
+
23
+ From the API reference, we can see that it has 3 positional arguments
24
+ (``name``, ``parcellation_path``, and ``parcels_labels``) as well as one
25
+ optional keyword argument (``overwrite``).
26
+
27
+ The ``name`` of the parcellation is up to you and will be the name that Junifer
28
+ will use to refer to this particular parcellation. You can think of this as
29
+ being similar to a key in a python dictionary, i.e. a key that is used to
30
+ obtain and operate on the actual parcellation data. This ``name`` must always
31
+ be a string. For example, we could call our parcellation
32
+ ``"my_custom_parcellation"`` (Note, that in a real-world use case this is
33
+ likely not a good name, and you should try to choose a meaningful name that
34
+ conveys as much relevant information about your parcellation as necessary).
35
+
36
+ The ``parcellation_path`` must be a ``str`` or ``Path`` object indicating a
37
+ path to a valid ``NIfTI`` image, which contains integer labels indicating the
38
+ individual regions-of-interest (ROIs) of your parcellation. The background in
39
+ this parcellation should be indicated by 0, and the labels of ROIs should go
40
+ from 1 to N (where N is the total number of ROIs in your parcellation). Now,
41
+ we nearly have everything we need.
42
+
43
+ Lastly, we also want to make sure that we can associate each integer label with
44
+ a human readable name (i.e. the name for each ROI). This serves naming the
45
+ features that parcellation-based markers produce in an unambiguous way, such
46
+ that a user can easily identify which ROIs were used to produce a specific
47
+ feature (multiple ROIs, because some features consist of information from two
48
+ or more ROIs, as for example in functional connectivity). Therefore, we provide
49
+ Junifer with a list of strings, that contains the names for each ROI. In this
50
+ list, the label at the i-th position indicates the i-th integer label (i.e. the
51
+ first label in this list corresponds to the first integer label in the
52
+ parcellation and so on).
53
+
54
+ Step 1: Prepare code to register a parcellation
55
+ -----------------------------------------------
56
+
57
+ Now we know everything that we need to know to make sure Junifer can use our
58
+ own parcellation to compute any parcellation-based marker. For example,
59
+ a simple example could look like this:
60
+
61
+ .. code-block:: python
62
+
63
+ from junifer.data import register_parcellation
64
+
65
+ from pathlib import Path
66
+ import numpy as np
67
+
68
+ # these are of course just example paths, replace it with your own:
69
+ path_to_parcellation = (
70
+ Path("..") / ".." / "parcellations" / "my_custom_parcellation.nii.gz"
71
+ )
72
+ path_to_labels = (
73
+ Path("..") / ".." / "labels" / "my_custom_parcellation_labels.txt"
74
+ )
75
+
76
+ my_labels = list(np.loadtxt(path_to_labels, dtype=str))
77
+
78
+ register_parcellation(
79
+ name="my_custom_parcellation",
80
+ parcellation_path=path_to_parcellation,
81
+ parcels_labels=my_labels
82
+ )
83
+
84
+ We can run this code and it seems to work, however, how can we actually
85
+ include the custom parcellation in a Junifer pipeline using a
86
+ :ref:`code-less YAML configuration<codeless>`?
87
+
88
+ Step 2: Add parcellation registration to the YAML file
89
+ ------------------------------------------------------
90
+
91
+ In order to use the parcellation in a Junifer pipeline configured by a YAML
92
+ file, we can save the above code in a python file, say
93
+ ``registering_my_parcellation.py``. We can then simply add this file using the
94
+ ``with`` keyword provided by Junifer:
95
+
96
+ .. code-block:: yaml
97
+
98
+ with:
99
+ - registering_my_parcellation.py
100
+
101
+ Afterwards continue configuring the rest of the pipeline in this YAML file, and
102
+ you will be able to use this parcellation using the name you gave the
103
+ parcellation when registering it. For example, we can add a
104
+ :class:`junifer.markers.parcel_aggregation.ParcelAggregation` marker to
105
+ demonstrate how this can be done:
106
+
107
+ .. code-block:: yaml
108
+
109
+ markers:
110
+ - name: CustomParcellation_mean
111
+ kind: ParcelAggregation
112
+ parcellation: my_custom_parcellation
113
+ method: mean
114
+
115
+ Now, you can simply use this YAML file to run your pipeline. One important
116
+ point to keep in mind is that if the paths given in
117
+ ``registering_my_parcellation.py`` are relative paths, they will be interpreted
118
+ by Junifer as relative to the jobs directory (i.e. where Junifer will create
119
+ submit files, logs directory and so on). For simplicity, you may just want to
120
+ use absolute paths to avoid confusion, yet using relative paths is likely a
121
+ better way to make your pipeline directory/repository more portable and
122
+ therefore more reproducible for others. Really, once you understand how these
123
+ paths are interpreted by Junifer, it is quite easy.
@@ -0,0 +1,4 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ __version__ = version = '0.0.2.dev320'
4
+ __version_tuple__ = version_tuple = (0, 0, 2, 'dev320')
@@ -13,6 +13,7 @@ from .parcellations import (
13
13
  list_parcellations,
14
14
  load_parcellation,
15
15
  register_parcellation,
16
+ merge_parcellations,
16
17
  )
17
18
 
18
19
  from .masks import (
@@ -64,7 +64,10 @@ def register_coordinates(
64
64
  name : str
65
65
  The name of the coordinates.
66
66
  coordinates : numpy.ndarray
67
- The coordinates.
67
+ The coordinates. This should be a 2-dimensional array with three
68
+ columns. Each row corresponds to a volume-of-interest (VOI) and each
69
+ column corresponds to a spatial dimension (i.e. x, y, and
70
+ z-coordinates).
68
71
  voi_names : list of str
69
72
  The names of the VOIs.
70
73
  overwrite : bool, optional
@@ -16,9 +16,9 @@ import nibabel as nib
16
16
  import numpy as np
17
17
  import pandas as pd
18
18
  import requests
19
- from nilearn import datasets
19
+ from nilearn import datasets, image
20
20
 
21
- from ..utils.logging import logger, raise_error
21
+ from ..utils.logging import logger, raise_error, warn_with_log
22
22
  from .utils import closest_resolution
23
23
 
24
24
 
@@ -700,3 +700,84 @@ def _retrieve_suit(
700
700
  ].to_list()
701
701
 
702
702
  return parcellation_fname, labels
703
+
704
+
705
+ def merge_parcellations(
706
+ parcellations_list: List["Nifti1Image"],
707
+ parcellations_names: List[str],
708
+ labels_lists: List[List[str]],
709
+ ) -> Tuple["Nifti1Image", List[str]]:
710
+ """Merge all parcellations from a list into one parcellation.
711
+
712
+ Parameters
713
+ ----------
714
+ parcellations_list : list of niimg-like object
715
+ List of parcellations to merge.
716
+ parcellations_names: list of str
717
+ List of names for parcellations at the corresponding indices.
718
+ labels_lists : list of list of str
719
+ A list of lists. Each list in the list contains the labels for the
720
+ parcellation at the corresponding index.
721
+
722
+ Returns
723
+ -------
724
+ parcellation : niimg-like object
725
+ The parcellation that results from merging the list of input
726
+ parcellations.
727
+ labels : list of str
728
+ List of labels for the resultant parcellation.
729
+
730
+ """
731
+ # Check for duplicated labels
732
+ labels_lists_flat = [item for sublist in labels_lists for item in sublist]
733
+ if len(labels_lists_flat) != len(set(labels_lists_flat)):
734
+ warn_with_log(
735
+ "The parcellations have duplicated labels. "
736
+ "Each label will be prefixed with the parcellation name."
737
+ )
738
+ for i_parcellation, t_labels in enumerate(labels_lists):
739
+ labels_lists[i_parcellation] = [
740
+ f"{parcellations_names[i_parcellation]}_{t_label}"
741
+ for t_label in t_labels
742
+ ]
743
+ overlapping_voxels = False
744
+ ref_parc = parcellations_list[0]
745
+ parc_data = ref_parc.get_fdata()
746
+
747
+ labels = labels_lists[0]
748
+
749
+ for t_parc, t_labels in zip(parcellations_list[1:], labels_lists[1:]):
750
+ if t_parc.shape != ref_parc.shape:
751
+ warn_with_log(
752
+ "The parcellations have different resolutions!"
753
+ "Resampling all parcellations to the first one in the list."
754
+ )
755
+ t_parc = image.resample_to_img(
756
+ t_parc, ref_parc, interpolation="nearest", copy=True
757
+ )
758
+
759
+ # Get the data from this parcellation
760
+ t_parc_data = t_parc.get_fdata().copy() # must be copied
761
+ # Increase the values of each ROI to match the labels
762
+ t_parc_data[t_parc_data != 0] += len(labels)
763
+
764
+ # Only set new values for the voxels that are 0
765
+ # This makes sure that the voxels that are in multiple
766
+ # parcellations are assigned to the parcellation that was
767
+ # first in the list.
768
+ if np.any(parc_data[t_parc_data != 0] != 0):
769
+ overlapping_voxels = True
770
+
771
+ parc_data[parc_data == 0] += t_parc_data[parc_data == 0]
772
+ labels.extend(t_labels)
773
+
774
+ if overlapping_voxels:
775
+ warn_with_log(
776
+ "The parcellations have overlapping voxels. "
777
+ "The overlapping voxels will be assigned to the "
778
+ "parcellation that was first in the list."
779
+ )
780
+
781
+ parcellation_img_res = image.new_img_like(parcellations_list[0], parc_data)
782
+
783
+ return parcellation_img_res, labels