junifer 0.0.2.dev311__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.
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/PKG-INFO +1 -1
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/changes/latest.inc +2 -0
- junifer-0.0.2.dev320/junifer/_version.py +4 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/__init__.py +1 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/parcellations.py +83 -2
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/tests/test_parcellations.py +173 -48
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/datalad_base.py +1 -3
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/parcel_aggregation.py +10 -62
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer.egg-info/PKG-INFO +1 -1
- junifer-0.0.2.dev311/junifer/_version.py +0 -4
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/dataset-request.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/documention-request.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/marker-request.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/pull_request_template.md +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/workflows/ci-docs.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/workflows/ci.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/workflows/docs-preview.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/workflows/docs.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/workflows/lint.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/workflows/pypi.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.gitignore +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.gitmodules +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/AUTHORS.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/LICENSE.md +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/README.md +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/codecov.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/conda-env.yml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/Makefile +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/_static/css/custom.css +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/_static/js/custom.js +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/_templates/versions.html +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/api.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/configs.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/data.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/datagrabbers.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/datareaders.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/index.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/markers.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/nilearn.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/pipeline.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/preprocessing.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/stats.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/storage.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/testing.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/api/utils.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/builtin.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/changes/0.0.1.inc +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/changes/contributors.inc +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/conf.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/contribution.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/coordinates.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/datagrabber.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/extension.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/index.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/marker.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/masks.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/extending/parcellations.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/faq.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/images/junifer_logo.png +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/images/pipeline/pipeline.001.png +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/images/pipeline/pipeline.002.png +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/index.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/installation.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/links.inc +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/maintaining.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/redirect.html +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/sphinxext/gh_substitutions.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/data.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/datagrabber.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/datareader.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/index.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/marker.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/pipeline.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/preprocess.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/understanding/storage.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/using/codeless.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/using/index.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/using/masks.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/using/queueing.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/using/running.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/docs/whats_new.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/README.rst +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/norun_hcpfc_pearson.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/norun_ukbvm_gmd.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/run_compute_parcel_mean.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/run_datagrabber_bids_datalad.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/run_ets_rss_marker.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/run_junifer_julearn.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/run_run_gmd_mean.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/yamls/gmd_mean.yaml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/yamls/gmd_mean_htcondor.yaml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/examples/yamls/ukb_gmd_mean.yaml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/ignore_words.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/cli.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/decorators.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/functions.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/parser.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/res/afni/3dAFNItoNIFTI +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/res/afni/3dRSFC +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/res/afni/3dReHo +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/res/afni/afni +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/res/afni/run_afni_docker.sh +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/res/run_conda.sh +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/tests/data/gmd_mean.yaml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/tests/data/gmd_mean_htcondor.yaml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/tests/test_api_utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/tests/test_cli.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/tests/test_functions.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/tests/test_parser.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/api/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/aomic_id1000_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/camcan_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/ixi_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_aomic_id1000_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_camcan_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_ixi_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_ucla.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/tests/test_ukb_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/ucla.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/juseless/datagrabbers/ukb_vbm.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/configs/tests/test_juseless.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/CogAC_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/CogAR_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/DMNBuckner_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Dosenbach2010_MNI_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Empathy_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Motor_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/MultiTask_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/PhysioStress_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Power2011_MNI_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Rew_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/Somatosensory_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/ToM_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/VigAtt_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/WM_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/eMDN_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/eSAD_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/VOIs/meta/extDMN_VOIs.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/coordinates.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/masks/vickery-patil/CAT12_IXI555_MNI152_TMP_GS_GMprob0.2_clean.nii.gz +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/masks/vickery-patil/CAT12_IXI555_MNI152_TMP_GS_GMprob0.2_clean_3mm.nii.gz +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/masks/vickery-patil/GMprob0.2_cortex_3mm_NA_rm.nii.gz +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/masks.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/tests/test_coordinates.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/tests/test_data_utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/tests/test_masks.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/data/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/id1000.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/piop1.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/piop2.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/tests/test_id1000.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/tests/test_piop1.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/aomic/tests/test_piop2.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/hcp.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/multiple.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/pattern.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/pattern_datalad.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_datagrabber_utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_datalad_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_hcp.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_multiple.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_pattern.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/tests/test_pattern_datalad.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datagrabber/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datareader/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datareader/default.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/datareader/tests/test_default_reader.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/_h5io.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/_version.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/chunked_array.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/h5io/h5io/chunked_list.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/nilearn/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/nilearn/junifer_nifti_spheres_masker.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/external/nilearn/tests/test_junifer_nifti_spheres_masker.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/collection.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/ets_rss.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_estimator.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/falff_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/tests/test_falff_estimator.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/tests/test_falff_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/falff/tests/test_falff_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/crossparcellation_functional_connectivity.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/edge_functional_connectivity_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/edge_functional_connectivity_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/functional_connectivity_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/functional_connectivity_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/functional_connectivity_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_crossparcellation_functional_connectivity.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_edge_functional_connectivity_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_functional_connectivity_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_functional_connectivity_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/functional_connectivity/tests/test_functional_connectivity_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_estimator.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/reho_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/tests/test_reho_estimator.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/tests/test_reho_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/reho/tests/test_reho_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/sphere_aggregation.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/temporal_snr_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/temporal_snr_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/temporal_snr_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/tests/test_temporal_snr_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/tests/test_temporal_snr_parcels.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/temporal_snr/tests/test_temporal_snr_spheres.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/tests/test_collection.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/tests/test_ets_rss.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/tests/test_marker_utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/tests/test_markers_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/tests/test_parcel_aggregation.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/tests/test_sphere_aggregation.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/markers/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/pipeline_step_mixin.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/registry.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/tests/test_pipeline_step_mixin.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/tests/test_registry.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/tests/test_update_meta_mixin.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/update_meta_mixin.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/pipeline/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/preprocess/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/preprocess/base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/preprocess/confounds/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/preprocess/confounds/fmriprep_confound_remover.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/preprocess/tests/test_preprocess_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/stats.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/hdf5.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/pandas_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/sqlite.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/tests/test_hdf5.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/tests/test_pandas_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/tests/test_sqlite.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/tests/test_storage_base.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/tests/test_utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/storage/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/data/sub-0001_task-anticipation_acq-seq_desc-confounds_regressors.tsv +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/datagrabbers.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/registry.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/tests/test_oasisvmbtesting_datagrabber.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/tests/test_partlycloudytesting_datagrabber.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/tests/test_spmauditory_datagrabber.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/tests/test_testing_registry.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/testing/utils.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/tests/test_main.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/tests/test_stats.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/utils/__init__.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/utils/fs.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/utils/logging.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/utils/tests/test_fs.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer/utils/tests/test_logging.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer.egg-info/SOURCES.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer.egg-info/dependency_links.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer.egg-info/entry_points.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer.egg-info/requires.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/junifer.egg-info/top_level.txt +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/pyproject.toml +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/setup.cfg +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/setup.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/tools/create_aomic1000_example_dataset.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/tools/create_aomicpiop1_example_dataset.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/tools/create_aomicpiop2_example_dataset.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/tools/create_bids_example_dataset.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/tools/create_bids_example_dataset_sessions.py +0 -0
- {junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/tools/create_hcp1200_example_dataset.py +0 -0
- {junifer-0.0.2.dev311 → 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.
|
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>
|
@@ -67,6 +67,8 @@ Enhancements
|
|
67
67
|
|
68
68
|
- Add more documentation on registering parcellations, coordinates, and masks (:gh:`166` by `Leonard Sasse`_)
|
69
69
|
|
70
|
+
- Expose a :func:`junifer.data.parcellations.merge_parcellations` function to merge a list of parcellations (:gh:`146` by Leonard Sasse`_).
|
71
|
+
|
70
72
|
Bugs
|
71
73
|
~~~~
|
72
74
|
|
@@ -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
|
@@ -9,6 +9,7 @@ from pathlib import Path
|
|
9
9
|
from typing import List
|
10
10
|
|
11
11
|
import nibabel as nib
|
12
|
+
import numpy as np
|
12
13
|
import pytest
|
13
14
|
from nilearn.image import new_img_like
|
14
15
|
from numpy.testing import assert_array_almost_equal, assert_array_equal
|
@@ -20,6 +21,7 @@ from junifer.data.parcellations import (
|
|
20
21
|
_retrieve_tian,
|
21
22
|
list_parcellations,
|
22
23
|
load_parcellation,
|
24
|
+
merge_parcellations,
|
23
25
|
register_parcellation,
|
24
26
|
)
|
25
27
|
|
@@ -236,9 +238,7 @@ def test_schaefer_parcellation(tmp_path: Path) -> None:
|
|
236
238
|
)
|
237
239
|
# Load parcellation
|
238
240
|
img2, lbl, fname = load_parcellation(
|
239
|
-
name="Schaefer100x7",
|
240
|
-
parcellations_dir=tmp_path,
|
241
|
-
resolution=3,
|
241
|
+
name="Schaefer100x7", parcellations_dir=tmp_path, resolution=3
|
242
242
|
)
|
243
243
|
# Check parcellation values
|
244
244
|
assert fname.name == fname2
|
@@ -247,9 +247,7 @@ def test_schaefer_parcellation(tmp_path: Path) -> None:
|
|
247
247
|
assert_array_equal(img2.header["pixdim"][1:4], [2, 2, 2]) # type: ignore
|
248
248
|
# Load parcellation
|
249
249
|
img2, lbl, fname = load_parcellation(
|
250
|
-
"Schaefer100x7",
|
251
|
-
parcellations_dir=tmp_path,
|
252
|
-
resolution=2.1,
|
250
|
+
"Schaefer100x7", parcellations_dir=tmp_path, resolution=2.1
|
253
251
|
)
|
254
252
|
# Check parcellation values
|
255
253
|
assert fname.name == fname2
|
@@ -258,9 +256,7 @@ def test_schaefer_parcellation(tmp_path: Path) -> None:
|
|
258
256
|
assert_array_equal(img2.header["pixdim"][1:4], [2, 2, 2]) # type: ignore
|
259
257
|
# Load parcellation
|
260
258
|
img2, lbl, fname = load_parcellation(
|
261
|
-
"Schaefer100x7",
|
262
|
-
parcellations_dir=tmp_path,
|
263
|
-
resolution=1.99,
|
259
|
+
"Schaefer100x7", parcellations_dir=tmp_path, resolution=1.99
|
264
260
|
)
|
265
261
|
# Check parcellation values
|
266
262
|
assert fname.name == fname1
|
@@ -269,9 +265,7 @@ def test_schaefer_parcellation(tmp_path: Path) -> None:
|
|
269
265
|
assert_array_equal(img2.header["pixdim"][1:4], [1, 1, 1]) # type: ignore
|
270
266
|
# Load parcellation
|
271
267
|
img2, lbl, fname = load_parcellation(
|
272
|
-
"Schaefer100x7",
|
273
|
-
parcellations_dir=tmp_path,
|
274
|
-
resolution=0.5,
|
268
|
+
"Schaefer100x7", parcellations_dir=tmp_path, resolution=0.5
|
275
269
|
)
|
276
270
|
# Check parcellation values
|
277
271
|
assert fname.name == fname1
|
@@ -383,18 +377,10 @@ def test_retrieve_suit_incorrect_space(tmp_path: Path) -> None:
|
|
383
377
|
|
384
378
|
|
385
379
|
@pytest.mark.parametrize(
|
386
|
-
"scale, n_label",
|
387
|
-
[
|
388
|
-
(1, 16),
|
389
|
-
(2, 32),
|
390
|
-
(3, 50),
|
391
|
-
(4, 54),
|
392
|
-
],
|
380
|
+
"scale, n_label", [(1, 16), (2, 32), (3, 50), (4, 54)]
|
393
381
|
)
|
394
382
|
def test_tian_3T_6thgeneration(
|
395
|
-
tmp_path: Path,
|
396
|
-
scale: int,
|
397
|
-
n_label: int,
|
383
|
+
tmp_path: Path, scale: int, n_label: int
|
398
384
|
) -> None:
|
399
385
|
"""Test Tian parcellation.
|
400
386
|
|
@@ -415,8 +401,7 @@ def test_tian_3T_6thgeneration(
|
|
415
401
|
assert "TianxS4x3TxMNI6thgeneration" in parcellations
|
416
402
|
# Load parcellation
|
417
403
|
img, lbl, fname = load_parcellation(
|
418
|
-
name=f"TianxS{scale}x3TxMNI6thgeneration",
|
419
|
-
parcellations_dir=tmp_path,
|
404
|
+
name=f"TianxS{scale}x3TxMNI6thgeneration", parcellations_dir=tmp_path
|
420
405
|
)
|
421
406
|
fname1 = f"Tian_Subcortex_S{scale}_3T_1mm.nii.gz"
|
422
407
|
assert img is not None
|
@@ -437,18 +422,10 @@ def test_tian_3T_6thgeneration(
|
|
437
422
|
|
438
423
|
|
439
424
|
@pytest.mark.parametrize(
|
440
|
-
"scale, n_label",
|
441
|
-
[
|
442
|
-
(1, 16),
|
443
|
-
(2, 32),
|
444
|
-
(3, 50),
|
445
|
-
(4, 54),
|
446
|
-
],
|
425
|
+
"scale, n_label", [(1, 16), (2, 32), (3, 50), (4, 54)]
|
447
426
|
)
|
448
427
|
def test_tian_3T_nonlinear2009cAsym(
|
449
|
-
tmp_path: Path,
|
450
|
-
scale: int,
|
451
|
-
n_label: int,
|
428
|
+
tmp_path: Path, scale: int, n_label: int
|
452
429
|
) -> None:
|
453
430
|
"""Test Tian parcellation.
|
454
431
|
|
@@ -480,18 +457,10 @@ def test_tian_3T_nonlinear2009cAsym(
|
|
480
457
|
|
481
458
|
|
482
459
|
@pytest.mark.parametrize(
|
483
|
-
"scale, n_label",
|
484
|
-
[
|
485
|
-
(1, 16),
|
486
|
-
(2, 34),
|
487
|
-
(3, 54),
|
488
|
-
(4, 62),
|
489
|
-
],
|
460
|
+
"scale, n_label", [(1, 16), (2, 34), (3, 54), (4, 62)]
|
490
461
|
)
|
491
462
|
def test_tian_7T_6thgeneration(
|
492
|
-
tmp_path: Path,
|
493
|
-
scale: int,
|
494
|
-
n_label: int,
|
463
|
+
tmp_path: Path, scale: int, n_label: int
|
495
464
|
) -> None:
|
496
465
|
"""Test Tian parcellation.
|
497
466
|
|
@@ -534,10 +503,7 @@ def test_retrieve_tian_incorrect_space(tmp_path: Path) -> None:
|
|
534
503
|
"""
|
535
504
|
with pytest.raises(ValueError, match=r"The parameter `space`"):
|
536
505
|
_retrieve_tian(
|
537
|
-
parcellations_dir=tmp_path,
|
538
|
-
resolution=1,
|
539
|
-
scale=1,
|
540
|
-
space="wrong",
|
506
|
+
parcellations_dir=tmp_path, resolution=1, scale=1, space="wrong"
|
541
507
|
)
|
542
508
|
|
543
509
|
with pytest.raises(ValueError, match=r"MNI6thgeneration"):
|
@@ -584,3 +550,162 @@ def test_retrieve_tian_incorrect_scale(tmp_path: Path) -> None:
|
|
584
550
|
scale=5,
|
585
551
|
space="MNI6thgeneration",
|
586
552
|
)
|
553
|
+
|
554
|
+
|
555
|
+
def test_merge_parcellations() -> None:
|
556
|
+
"""Test merging parcellations."""
|
557
|
+
# load some parcellations for testing
|
558
|
+
schaefer_parcellation, schaefer_labels, _ = load_parcellation(
|
559
|
+
"Schaefer100x17"
|
560
|
+
)
|
561
|
+
tian_parcellation, tian_labels, _ = load_parcellation(
|
562
|
+
"TianxS2x3TxMNInonlinear2009cAsym"
|
563
|
+
)
|
564
|
+
# prepare the list of the actual parcellations
|
565
|
+
parcellation_list = [schaefer_parcellation, tian_parcellation]
|
566
|
+
# prepare a list of names
|
567
|
+
names = ["Schaefer100x17", "TianxS2x3TxMNInonlinear2009cAsym"]
|
568
|
+
# prepare a list of label lists
|
569
|
+
labels_lists = [schaefer_labels, tian_labels]
|
570
|
+
# merge the parcellations
|
571
|
+
merged_parc, labels = merge_parcellations(
|
572
|
+
parcellation_list, names, labels_lists
|
573
|
+
)
|
574
|
+
|
575
|
+
# we should have 132 integer labels plus 1 for background
|
576
|
+
parc_data = merged_parc.get_fdata()
|
577
|
+
assert len(np.unique(parc_data)) == 133
|
578
|
+
# no background label, so labels is one less
|
579
|
+
assert len(labels) == 132
|
580
|
+
|
581
|
+
|
582
|
+
def test_merge_parcellations_3D_multiple_non_overlapping(
|
583
|
+
tmp_path: Path,
|
584
|
+
) -> None:
|
585
|
+
"""Test merge_parcellations with multiple non-overlapping parcellations.
|
586
|
+
|
587
|
+
Parameters
|
588
|
+
----------
|
589
|
+
tmp_path : pathlib.Path
|
590
|
+
The path to the test directory.
|
591
|
+
|
592
|
+
"""
|
593
|
+
# Get the testing parcellation
|
594
|
+
parcellation, labels, _ = load_parcellation("Schaefer100x7")
|
595
|
+
|
596
|
+
assert parcellation is not None
|
597
|
+
|
598
|
+
# Create two parcellations from it
|
599
|
+
parcellation_data = parcellation.get_fdata()
|
600
|
+
parcellation1_data = parcellation_data.copy()
|
601
|
+
parcellation1_data[parcellation1_data > 50] = 0
|
602
|
+
parcellation2_data = parcellation_data.copy()
|
603
|
+
parcellation2_data[parcellation2_data <= 50] = 0
|
604
|
+
parcellation2_data[parcellation2_data > 0] -= 50
|
605
|
+
labels1 = labels[:50]
|
606
|
+
labels2 = labels[50:]
|
607
|
+
|
608
|
+
parcellation1_img = new_img_like(parcellation, parcellation1_data)
|
609
|
+
parcellation2_img = new_img_like(parcellation, parcellation2_data)
|
610
|
+
|
611
|
+
parcellation_list = [parcellation1_img, parcellation2_img]
|
612
|
+
names = ["high", "low"]
|
613
|
+
labels_lists = [labels1, labels2]
|
614
|
+
|
615
|
+
merged_parc, merged_labels = merge_parcellations(
|
616
|
+
parcellation_list, names, labels_lists
|
617
|
+
)
|
618
|
+
|
619
|
+
parc_data = parcellation.get_fdata()
|
620
|
+
assert_array_equal(parc_data, merged_parc.get_fdata())
|
621
|
+
assert len(labels) == 100
|
622
|
+
assert len(np.unique(parc_data)) == 101 # 100 + 1 because background 0
|
623
|
+
|
624
|
+
|
625
|
+
def test_merge_parcellations_3D_multiple_overlapping(tmp_path: Path) -> None:
|
626
|
+
"""Test merge_parcellations with multiple overlapping parcellations.
|
627
|
+
|
628
|
+
Parameters
|
629
|
+
----------
|
630
|
+
tmp_path : pathlib.Path
|
631
|
+
The path to the test directory.
|
632
|
+
|
633
|
+
"""
|
634
|
+
|
635
|
+
# Get the testing parcellation
|
636
|
+
parcellation, labels, _ = load_parcellation("Schaefer100x7")
|
637
|
+
|
638
|
+
assert parcellation is not None
|
639
|
+
|
640
|
+
# Create two parcellations from it
|
641
|
+
parcellation_data = parcellation.get_fdata()
|
642
|
+
parcellation1_data = parcellation_data.copy()
|
643
|
+
parcellation1_data[parcellation1_data > 50] = 0
|
644
|
+
parcellation2_data = parcellation_data.copy()
|
645
|
+
|
646
|
+
# Make the second parcellation overlap with the first
|
647
|
+
parcellation2_data[parcellation2_data <= 45] = 0
|
648
|
+
parcellation2_data[parcellation2_data > 0] -= 45
|
649
|
+
labels1 = [f"low_{x}" for x in labels[:50]] # Change the labels
|
650
|
+
labels2 = [f"high_{x}" for x in labels[45:]] # Change the labels
|
651
|
+
|
652
|
+
parcellation1_img = new_img_like(parcellation, parcellation1_data)
|
653
|
+
parcellation2_img = new_img_like(parcellation, parcellation2_data)
|
654
|
+
|
655
|
+
parcellation_list = [parcellation1_img, parcellation2_img]
|
656
|
+
names = ["high", "low"]
|
657
|
+
labels_lists = [labels1, labels2]
|
658
|
+
|
659
|
+
with pytest.warns(RuntimeWarning, match="overlapping voxels"):
|
660
|
+
merged_parc, merged_labels = merge_parcellations(
|
661
|
+
parcellation_list, names, labels_lists
|
662
|
+
)
|
663
|
+
|
664
|
+
parc_data = parcellation.get_fdata()
|
665
|
+
assert len(labels) == 100
|
666
|
+
assert len(np.unique(parc_data)) == 101 # 100 + 1 because background 0
|
667
|
+
|
668
|
+
|
669
|
+
def test_merge_parcellations_3D_multiple_duplicated_labels(
|
670
|
+
tmp_path: Path,
|
671
|
+
) -> None:
|
672
|
+
"""Test merge_parcellations with two parcellations with duplicated labels.
|
673
|
+
|
674
|
+
Parameters
|
675
|
+
----------
|
676
|
+
tmp_path : pathlib.Path
|
677
|
+
The path to the test directory.
|
678
|
+
|
679
|
+
"""
|
680
|
+
|
681
|
+
# Get the testing parcellation
|
682
|
+
parcellation, labels, _ = load_parcellation("Schaefer100x7")
|
683
|
+
|
684
|
+
assert parcellation is not None
|
685
|
+
|
686
|
+
# Create two parcellations from it
|
687
|
+
parcellation_data = parcellation.get_fdata()
|
688
|
+
parcellation1_data = parcellation_data.copy()
|
689
|
+
parcellation1_data[parcellation1_data > 50] = 0
|
690
|
+
parcellation2_data = parcellation_data.copy()
|
691
|
+
parcellation2_data[parcellation2_data <= 50] = 0
|
692
|
+
parcellation2_data[parcellation2_data > 0] -= 50
|
693
|
+
labels1 = labels[:50]
|
694
|
+
labels2 = labels[49:-1] # One label is duplicated
|
695
|
+
|
696
|
+
parcellation1_img = new_img_like(parcellation, parcellation1_data)
|
697
|
+
parcellation2_img = new_img_like(parcellation, parcellation2_data)
|
698
|
+
|
699
|
+
parcellation_list = [parcellation1_img, parcellation2_img]
|
700
|
+
names = ["high", "low"]
|
701
|
+
labels_lists = [labels1, labels2]
|
702
|
+
|
703
|
+
with pytest.warns(RuntimeWarning, match="duplicated labels."):
|
704
|
+
merged_parc, merged_labels = merge_parcellations(
|
705
|
+
parcellation_list, names, labels_lists
|
706
|
+
)
|
707
|
+
|
708
|
+
parc_data = parcellation.get_fdata()
|
709
|
+
assert_array_equal(parc_data, merged_parc.get_fdata())
|
710
|
+
assert len(labels) == 100
|
711
|
+
assert len(np.unique(parc_data)) == 101 # 100 + 1 because background 0
|
@@ -178,9 +178,7 @@ class DataladDataGrabber(BaseDataGrabber):
|
|
178
178
|
try:
|
179
179
|
dl_out = self._dataset.get(to_get, result_renderer="disabled")
|
180
180
|
except IncompleteResultsError as e:
|
181
|
-
raise_error(
|
182
|
-
f"Failed to get from dataset: {e.failed}"
|
183
|
-
)
|
181
|
+
raise_error(f"Failed to get from dataset: {e.failed}")
|
184
182
|
if not self._was_cloned:
|
185
183
|
# If the dataset was already installed, check that the
|
186
184
|
# file was actually downloaded to avoid removing a
|
@@ -7,13 +7,13 @@
|
|
7
7
|
from typing import Any, Dict, List, Optional, Union
|
8
8
|
|
9
9
|
import numpy as np
|
10
|
-
from nilearn.image import math_img,
|
10
|
+
from nilearn.image import math_img, resample_to_img
|
11
11
|
from nilearn.maskers import NiftiMasker
|
12
12
|
|
13
13
|
from ..api.decorators import register_marker
|
14
|
-
from ..data import get_mask, load_parcellation
|
14
|
+
from ..data import get_mask, load_parcellation, merge_parcellations
|
15
15
|
from ..stats import get_aggfunc_by_name
|
16
|
-
from ..utils import logger
|
16
|
+
from ..utils import logger
|
17
17
|
from .base import BaseMarker
|
18
18
|
|
19
19
|
|
@@ -98,9 +98,7 @@ class ParcelAggregation(BaseMarker):
|
|
98
98
|
raise ValueError(f"Unknown input kind for {input_type}")
|
99
99
|
|
100
100
|
def compute(
|
101
|
-
self,
|
102
|
-
input: Dict[str, Any],
|
103
|
-
extra_input: Optional[Dict] = None,
|
101
|
+
self, input: Dict[str, Any], extra_input: Optional[Dict] = None
|
104
102
|
) -> Dict:
|
105
103
|
"""Compute.
|
106
104
|
|
@@ -129,8 +127,7 @@ class ParcelAggregation(BaseMarker):
|
|
129
127
|
t_input_img = input["data"]
|
130
128
|
logger.debug(f"Parcel aggregation using {self.method}")
|
131
129
|
agg_func = get_aggfunc_by_name(
|
132
|
-
name=self.method,
|
133
|
-
func_params=self.method_params,
|
130
|
+
name=self.method, func_params=self.method_params
|
134
131
|
)
|
135
132
|
# Get the min of the voxels sizes and use it as the resolution
|
136
133
|
resolution = np.min(t_input_img.header.get_zooms()[:3])
|
@@ -140,15 +137,11 @@ class ParcelAggregation(BaseMarker):
|
|
140
137
|
all_labels = []
|
141
138
|
for t_parc_name in self.parcellation:
|
142
139
|
t_parcellation, t_labels, _ = load_parcellation(
|
143
|
-
name=t_parc_name,
|
144
|
-
resolution=resolution,
|
140
|
+
name=t_parc_name, resolution=resolution
|
145
141
|
)
|
146
142
|
# Resample all of them to the image
|
147
143
|
t_parcellation_img_res = resample_to_img(
|
148
|
-
t_parcellation,
|
149
|
-
t_input_img,
|
150
|
-
interpolation="nearest",
|
151
|
-
copy=True,
|
144
|
+
t_parcellation, t_input_img, interpolation="nearest", copy=True
|
152
145
|
)
|
153
146
|
all_parcelations.append(t_parcellation_img_res)
|
154
147
|
all_labels.append(t_labels)
|
@@ -159,56 +152,11 @@ class ParcelAggregation(BaseMarker):
|
|
159
152
|
labels = all_labels[0]
|
160
153
|
else:
|
161
154
|
# Merge the parcellations
|
162
|
-
|
163
|
-
|
164
|
-
all_labels_flat = [
|
165
|
-
item for sublist in all_labels for item in sublist
|
166
|
-
]
|
167
|
-
if len(all_labels_flat) != len(set(all_labels_flat)):
|
168
|
-
warn_with_log(
|
169
|
-
"The parcellations have duplicated labels. "
|
170
|
-
"Each label will be prefixed with the parcellation name."
|
171
|
-
)
|
172
|
-
for i_parcellation, t_labels in enumerate(all_labels):
|
173
|
-
all_labels[i_parcellation] = [
|
174
|
-
f"{self.parcellation[i_parcellation]}_{t_label}"
|
175
|
-
for t_label in t_labels
|
176
|
-
]
|
177
|
-
overlapping_voxels = False
|
178
|
-
parc_data = all_parcelations[0].get_fdata()
|
179
|
-
labels = all_labels[0]
|
180
|
-
for t_parc, t_labels in zip(all_parcelations[1:], all_labels[1:]):
|
181
|
-
# Get the data from this parcellation
|
182
|
-
t_parc_data = t_parc.get_fdata().copy() # must be copied
|
183
|
-
# Increase the values of each ROI to match the labels
|
184
|
-
t_parc_data[t_parc_data != 0] += len(labels)
|
185
|
-
|
186
|
-
# Only set new values for the voxels that are 0
|
187
|
-
# This makes sure that the voxels that are in multiple
|
188
|
-
# parcellations are assigned to the parcellation that was
|
189
|
-
# first in the list.
|
190
|
-
if np.any(parc_data[t_parc_data != 0] != 0):
|
191
|
-
overlapping_voxels = True
|
192
|
-
|
193
|
-
parc_data[parc_data == 0] += t_parc_data[parc_data == 0]
|
194
|
-
labels.extend(t_labels)
|
195
|
-
|
196
|
-
if overlapping_voxels:
|
197
|
-
warn_with_log(
|
198
|
-
"The parcellations have overlapping voxels. "
|
199
|
-
"The overlapping voxels will be assigned to the "
|
200
|
-
"parcellation that was first in the list."
|
201
|
-
)
|
202
|
-
|
203
|
-
parcellation_img_res = new_img_like(
|
204
|
-
all_parcelations[0],
|
205
|
-
parc_data,
|
155
|
+
parcellation_img_res, labels = merge_parcellations(
|
156
|
+
all_parcelations, self.parcellation, all_labels
|
206
157
|
)
|
207
158
|
|
208
|
-
parcellation_bin = math_img(
|
209
|
-
"img != 0",
|
210
|
-
img=parcellation_img_res,
|
211
|
-
)
|
159
|
+
parcellation_bin = math_img("img != 0", img=parcellation_img_res)
|
212
160
|
|
213
161
|
if self.masks is not None:
|
214
162
|
logger.debug(f"Masking with {self.masks}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: junifer
|
3
|
-
Version: 0.0.2.
|
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>
|
File without changes
|
File without changes
|
File without changes
|
{junifer-0.0.2.dev311 → junifer-0.0.2.dev320}/.github/ISSUE_TEMPLATE/documention-request.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|