spacr 0.9.0__tar.gz → 0.9.2__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.
- spacr-0.9.2/PKG-INFO +193 -0
- spacr-0.9.2/README.rst +111 -0
- {spacr-0.9.0 → spacr-0.9.2}/setup.py +1 -1
- {spacr-0.9.0 → spacr-0.9.2}/spacr/gui_core.py +0 -75
- {spacr-0.9.0 → spacr-0.9.2}/spacr/measure.py +219 -7
- {spacr-0.9.0 → spacr-0.9.2}/spacr/plot.py +0 -122
- spacr-0.9.2/spacr/resources/icons/flow_chart_v2.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/settings.py +6 -30
- {spacr-0.9.0 → spacr-0.9.2}/spacr/timelapse.py +0 -90
- {spacr-0.9.0 → spacr-0.9.2}/spacr/utils.py +10 -49
- spacr-0.9.2/spacr.egg-info/PKG-INFO +193 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr.egg-info/SOURCES.txt +1 -0
- spacr-0.9.0/PKG-INFO +0 -144
- spacr-0.9.0/README.rst +0 -62
- spacr-0.9.0/spacr.egg-info/PKG-INFO +0 -144
- {spacr-0.9.0 → spacr-0.9.2}/LICENSE +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/MANIFEST.in +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/deploy_docs.sh +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/.doctrees/environment.pickle +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_images/logo_spacr.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/SetupDict.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/BasePredictor.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/BaseTrainer.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/Baseline/Predictor.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/Baseline/Trainer.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/Baseline/utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/MEDIAR/EnsemblePredictor.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/MEDIAR/Predictor.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/MEDIAR/Trainer.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/MEDIAR/utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/core/utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/evaluate.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/generate_mapping.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/main.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/predict.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_annotate.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_classify.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_make_masks.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_mask.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_measure.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_sequencing.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/app_umap.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/chat_bot.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/core.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/deep_spacr.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/gui.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/gui_core.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/gui_elements.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/gui_utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/io.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/logger.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/measure.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/mediar.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/ml.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/plot.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/sequencing.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/settings.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/sim.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/sp_stats.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/spacr_cellpose.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/submodules.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/timelapse.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/toxo.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/spacr/version.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/data_utils/custom/CellAware.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/data_utils/custom/LoadImage.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/data_utils/custom/NormalizeImage.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/data_utils/datasetter.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/data_utils/transforms.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/data_utils/utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/measures.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/models/MEDIARFormer.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_modules/train_tools/utils.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/SetupDict/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/BasePredictor/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/BaseTrainer/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/Baseline/Predictor/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/Baseline/Trainer/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/Baseline/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/Baseline/utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/MEDIAR/EnsemblePredictor/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/MEDIAR/Predictor/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/MEDIAR/Trainer/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/MEDIAR/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/MEDIAR/utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/core/utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/evaluate/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/generate_mapping/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/main/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/predict/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_annotate/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_classify/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_make_masks/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_mask/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_measure/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_sequencing/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/app_umap/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/chat_bot/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/core/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/deep_spacr/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/gui/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/gui_core/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/gui_elements/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/gui_utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/io/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/logger/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/measure/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/mediar/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/ml/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/openai/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/plot/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/sequencing/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/settings/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/sim/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/sp_stats/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/spacr_cellpose/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/submodules/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/timelapse/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/toxo/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/spacr/version/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/custom/CellAware/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/custom/LoadImage/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/custom/NormalizeImage/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/custom/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/datasetter/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/transforms/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/data_utils/utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/measures/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/models/MEDIARFormer/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/models/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/api/train_tools/utils/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_sources/index.rst.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/basic.css +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/badge_only.css +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-bold-italic.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-bold.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-bold.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-normal-italic.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-normal.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/fonts/lato-normal.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/css/theme.css +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/doctools.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/documentation_options.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/file.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bold.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bold.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bold.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-italic.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-italic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-italic.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-italic.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-regular.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-regular.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-regular.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/Lato/lato-regular.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/graphviz.css +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/js/badge_only.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/js/theme.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/js/versions.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/language_data.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/logo_spacr.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/minus.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/plus.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/pygments.css +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/searchtools.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/_static/sphinx_highlight.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/SetupDict/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/BasePredictor/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/BaseTrainer/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/Baseline/Predictor/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/Baseline/Trainer/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/Baseline/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/Baseline/utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/MEDIAR/EnsemblePredictor/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/MEDIAR/Predictor/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/MEDIAR/Trainer/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/MEDIAR/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/MEDIAR/utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/core/utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/evaluate/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/generate_mapping/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/main/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/predict/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_annotate/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_classify/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_make_masks/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_mask/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_measure/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_sequencing/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/app_umap/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/chat_bot/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/core/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/deep_spacr/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/gui/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/gui_core/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/gui_elements/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/gui_utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/io/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/logger/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/measure/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/mediar/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/ml/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/openai/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/plot/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/sequencing/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/settings/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/sim/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/sp_stats/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/spacr_cellpose/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/submodules/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/timelapse/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/toxo/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/spacr/version/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/custom/CellAware/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/custom/LoadImage/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/custom/NormalizeImage/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/custom/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/datasetter/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/transforms/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/data_utils/utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/measures/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/models/MEDIARFormer/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/models/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/api/train_tools/utils/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/genindex.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/index.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/objects.inv +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/py-modindex.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/search.html +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/searchindex.js +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/source/_static/custom.css +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/source/_static/logo_spacr.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/source/conf.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/docs/source/index.rst +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/environment.yaml +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/fonts/OpenSans-Regular.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/requirements.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/rtd_trigger.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/setup.cfg +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/setup_docs.sh +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/__init__.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/__main__.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_annotate.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_classify.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_make_masks.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_mask.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_measure.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_sequencing.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/app_umap.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/chat_bot.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/core.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/deep_spacr.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/gui.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/gui_elements.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/gui_utils.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/io.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/logger.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/ml.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/data/lopit.csv +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/data/toxoplasma_metadata.csv +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/OFL.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/OpenSans-Italic-VariableFont_wdth,wght.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/OpenSans-VariableFont_wdth,wght.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/README.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-Bold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-BoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-ExtraBold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-ExtraBoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-Italic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-Light.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-LightItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-Medium.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-MediumItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-Regular.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-SemiBold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans-SemiBoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Bold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-BoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-ExtraBold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-ExtraBoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Italic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Light.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-LightItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Medium.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-MediumItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Regular.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-SemiBold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_Condensed-SemiBoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Bold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-BoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-ExtraBold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-ExtraBoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Italic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Light.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-LightItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Medium.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-MediumItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Regular.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-SemiBold.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/abort.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/annotate.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/cellpose_all.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/cellpose_masks.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/classify.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/convert.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/default.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/dna_matrix.mp4 +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/download.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/logo.pdf +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/logo_spacr.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/logo_spacr_1.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/make_masks.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/map_barcodes.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/mask.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/measure.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/ml_analyze.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/plaque.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/recruitment.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/regression.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/run.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/sequencing.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/settings.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/train_cellpose.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/icons/umap.png +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/images/plate1_E01_T0001F001L01A01Z01C02.tif +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/images/plate1_E01_T0001F001L01A02Z01C01.tif +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/resources/images/plate1_E01_T0001F001L01A03Z01C03.tif +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/sequencing.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/sim.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/sp_stats.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/spacr_cellpose.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/submodules.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/toxo.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr/version.py +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr.egg-info/dependency_links.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr.egg-info/entry_points.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr.egg-info/requires.txt +0 -0
- {spacr-0.9.0 → spacr-0.9.2}/spacr.egg-info/top_level.txt +0 -0
spacr-0.9.2/PKG-INFO
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: spacr
|
3
|
+
Version: 0.9.2
|
4
|
+
Summary: Spatial phenotype analysis of crisp screens (SpaCr)
|
5
|
+
Home-page: https://github.com/EinarOlafsson/spacr
|
6
|
+
Author: Einar Birnir Olafsson
|
7
|
+
Author-email: olafsson@med.umich.com
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Description-Content-Type: text/x-rst
|
12
|
+
License-File: LICENSE
|
13
|
+
Requires-Dist: numpy<2.0,>=1.26.4
|
14
|
+
Requires-Dist: pandas<3.0,>=2.2.1
|
15
|
+
Requires-Dist: scipy<2.0,>=1.12.0
|
16
|
+
Requires-Dist: cellpose<4.0,>=3.0.6
|
17
|
+
Requires-Dist: scikit-image<1.0,>=0.22.0
|
18
|
+
Requires-Dist: scikit-learn<2.0,>=1.4.1
|
19
|
+
Requires-Dist: scikit-posthocs<0.20,>=0.10.0
|
20
|
+
Requires-Dist: mahotas<2.0,>=1.4.13
|
21
|
+
Requires-Dist: btrack<1.0,>=0.6.5
|
22
|
+
Requires-Dist: trackpy<1.0,>=0.6.2
|
23
|
+
Requires-Dist: statsmodels<1.0,>=0.14.1
|
24
|
+
Requires-Dist: shap<1.0,>=0.45.0
|
25
|
+
Requires-Dist: torch<3.0,>=2.0
|
26
|
+
Requires-Dist: torchvision<1.0,>=0.1
|
27
|
+
Requires-Dist: torch-geometric<3.0,>=2.5
|
28
|
+
Requires-Dist: torchcam<1.0,>=0.4.0
|
29
|
+
Requires-Dist: transformers<5.0,>=4.45.2
|
30
|
+
Requires-Dist: segmentation_models_pytorch>=0.3.3
|
31
|
+
Requires-Dist: monai>=1.3.0
|
32
|
+
Requires-Dist: captum<1.0,>=0.7.0
|
33
|
+
Requires-Dist: seaborn<1.0,>=0.13.2
|
34
|
+
Requires-Dist: matplotlib<4.0,>=3.8.3
|
35
|
+
Requires-Dist: matplotlib_venn<2.0,>=1.1
|
36
|
+
Requires-Dist: adjustText<2.0,>=1.2.0
|
37
|
+
Requires-Dist: bottleneck<2.0,>=1.3.6
|
38
|
+
Requires-Dist: numexpr<3.0,>=2.8.4
|
39
|
+
Requires-Dist: opencv-python-headless<5.0,>=4.9.0.80
|
40
|
+
Requires-Dist: pillow<11.0,>=10.2.0
|
41
|
+
Requires-Dist: tifffile>=2023.4.12
|
42
|
+
Requires-Dist: nd2reader<4.0,>=3.3.0
|
43
|
+
Requires-Dist: czifile
|
44
|
+
Requires-Dist: pylibCZIrw<6.0,>=5.0.0
|
45
|
+
Requires-Dist: aicspylibczi
|
46
|
+
Requires-Dist: readlif
|
47
|
+
Requires-Dist: imageio<3.0,>=2.34.0
|
48
|
+
Requires-Dist: pingouin<1.0,>=0.5.5
|
49
|
+
Requires-Dist: umap-learn<1.0,>=0.5.6
|
50
|
+
Requires-Dist: ttkthemes<4.0,>=3.2.2
|
51
|
+
Requires-Dist: xgboost<3.0,>=2.0.3
|
52
|
+
Requires-Dist: PyWavelets<2.0,>=1.6.0
|
53
|
+
Requires-Dist: ttf_opensans>=2020.10.30
|
54
|
+
Requires-Dist: customtkinter<6.0,>=5.2.2
|
55
|
+
Requires-Dist: biopython<2.0,>=1.80
|
56
|
+
Requires-Dist: lxml<6.0,>=5.1.0
|
57
|
+
Requires-Dist: psutil<6.0,>=5.9.8
|
58
|
+
Requires-Dist: gputil<2.0,>=1.4.0
|
59
|
+
Requires-Dist: gpustat<2.0,>=1.1.1
|
60
|
+
Requires-Dist: pyautogui<1.0,>=0.9.54
|
61
|
+
Requires-Dist: tables<4.0,>=3.8.0
|
62
|
+
Requires-Dist: rapidfuzz<4.0,>=3.9
|
63
|
+
Requires-Dist: keyring<16.0,>=15.1
|
64
|
+
Requires-Dist: screeninfo<1.0,>=0.8.1
|
65
|
+
Requires-Dist: fastremap>=1.14.1
|
66
|
+
Requires-Dist: pytz>=2023.3.post1
|
67
|
+
Requires-Dist: tqdm>=4.65.0
|
68
|
+
Requires-Dist: wandb>=0.16.2
|
69
|
+
Requires-Dist: openai<2.0,>=1.50.2
|
70
|
+
Requires-Dist: gdown
|
71
|
+
Requires-Dist: IPython<9.0,>=8.18.1
|
72
|
+
Requires-Dist: ipykernel
|
73
|
+
Requires-Dist: ipywidgets<9.0,>=8.1.2
|
74
|
+
Requires-Dist: brokenaxes<1.0,>=0.6.2
|
75
|
+
Requires-Dist: huggingface-hub<0.25,>=0.24.0
|
76
|
+
Provides-Extra: dev
|
77
|
+
Requires-Dist: pytest<3.11,>=3.9; extra == "dev"
|
78
|
+
Provides-Extra: headless
|
79
|
+
Requires-Dist: opencv-python-headless; extra == "headless"
|
80
|
+
Provides-Extra: full
|
81
|
+
Requires-Dist: opencv-python; extra == "full"
|
82
|
+
|
83
|
+
.. |Docs| image:: https://github.com/EinarOlafsson/spacr/actions/workflows/pages/pages-build-deployment/badge.svg
|
84
|
+
:target: https://einarolafsson.github.io/spacr/index.html
|
85
|
+
.. |PyPI version| image:: https://badge.fury.io/py/spacr.svg
|
86
|
+
:target: https://badge.fury.io/py/spacr
|
87
|
+
.. |Python version| image:: https://img.shields.io/pypi/pyversions/spacr
|
88
|
+
:target: https://pypistats.org/packages/spacr
|
89
|
+
.. |Licence: GPL v3| image:: https://img.shields.io/github/license/EinarOlafsson/spacr
|
90
|
+
:target: https://github.com/EinarOlafsson/spacr/blob/master/LICENSE
|
91
|
+
.. |repo size| image:: https://img.shields.io/github/repo-size/EinarOlafsson/spacr
|
92
|
+
:target: https://github.com/EinarOlafsson/spacr/
|
93
|
+
|
94
|
+
.. _docs: https://einarolafsson.github.io/spacr/index.html
|
95
|
+
|
96
|
+
Badges
|
97
|
+
------
|
98
|
+
|Docs| |PyPI version| |Python version| |Licence: GPL v3| |repo size|
|
99
|
+
|
100
|
+
SpaCr
|
101
|
+
=====
|
102
|
+
|
103
|
+
**Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr).**
|
104
|
+
|
105
|
+
The spatial organization of organelles and proteins within cells constitutes a key level of functional regulation. In the context of infectious disease, the spatial relationships between host cell structures and intracellular pathogens are critical to understanding host clearance mechanisms and how pathogens evade them. SpaCr is a Python-based software package for generating single-cell image data for deep-learning sub-cellular/cellular phenotypic classification from pooled genetic CRISPR-Cas9 screens. SpaCr provides a flexible toolset to extract single-cell images and measurements from high-content cell painting experiments, train deep-learning models to classify cellular/subcellular phenotypes, simulate, and analyze pooled CRISPR-Cas9 imaging screens.
|
106
|
+
|
107
|
+
Features
|
108
|
+
--------
|
109
|
+
|
110
|
+
- **Generate Masks:** Generate cellpose masks of cell, nuclei, and pathogen objects.
|
111
|
+
- **Object Measurements:** Measurements for each object including scikit-image regionprops, intensity percentiles, shannon-entropy, Pearson’s and Manders’ correlations, homogeneity, and radial distribution. Measurements are saved to a SQL database in object-level tables.
|
112
|
+
- **Crop Images:** Save objects (cells, nuclei, pathogen, cytoplasm) as images. Object image paths are saved in a SQL database.
|
113
|
+
- **Train CNNs or Transformers:** Train Torch models to classify single object images.
|
114
|
+
- **Manual Annotation:** Supports manual annotation of single-cell images and segmentation to refine training datasets for training CNNs/Transformers or cellpose, respectively.
|
115
|
+
- **Finetune Cellpose Models:** Adjust pre-existing Cellpose models to your specific dataset for improved performance.
|
116
|
+
- **Timelapse Data Support:** Track objects in timelapse image data.
|
117
|
+
- **Simulations:** Simulate spatial phenotype screens.
|
118
|
+
- **Sequencing:** Map FASTQ reads to barcode and gRNA barcode metadata.
|
119
|
+
- **Misc:** Analyze Ca oscillation, recruitment, infection rate, plaque size/count.
|
120
|
+
|
121
|
+
.. image:: https://github.com/EinarOlafsson/spacr/raw/main/spacr/resources/icons/flow_chart_v2.png
|
122
|
+
:alt: SpaCr workflow
|
123
|
+
:align: center
|
124
|
+
|
125
|
+
|
126
|
+
**Overview and data organization of spaCR.**
|
127
|
+
|
128
|
+
**a.** Schematic workflow of the spaCR pipeline for pooled image-based CRISPR screens. Microscopy images (TIFF, LIF, CZI, NDI) and sequencing reads (FASTQ) are used as inputs (black). The main modules (teal) are: (1) Mask: generates object masks for cells, nuclei, pathogens, and cytoplasm; (2) Measure: extracts object-level features and crops object images, storing quantitative data in an SQL database; (3) Classify—applies machine learning (ML, e.g., XGBoost) or deep learning (DL, e.g., PyTorch) models to classify objects, summarizing results as well-level classification scores; (4) Map Barcodes: extracts and maps row, column, and gRNA barcodes from sequencing data to corresponding wells; (5) Regression: estimates gRNA effect sizes and gene scores via multiple linear regression using well-level summary statistics.
|
129
|
+
**b.** Downstream submodules available for extended analyses at each stage.
|
130
|
+
**c.** Output folder structure for each module, including locations for raw and processed images, masks, object-level measurements, datasets, and results.
|
131
|
+
**d.** List of all spaCR package modules.
|
132
|
+
|
133
|
+
Installation
|
134
|
+
------------
|
135
|
+
|
136
|
+
**Linux recommended.**
|
137
|
+
If using Windows, switch to Linux—it's free, open-source, and better.
|
138
|
+
|
139
|
+
**macOS prerequisites (before install):**
|
140
|
+
|
141
|
+
::
|
142
|
+
|
143
|
+
brew install libomp
|
144
|
+
brew install hdf5
|
145
|
+
|
146
|
+
**Linux GUI requirement:**
|
147
|
+
SpaCr GUI requires Tkinter.
|
148
|
+
|
149
|
+
::
|
150
|
+
|
151
|
+
sudo apt-get install python3-tk
|
152
|
+
|
153
|
+
**Installation:**
|
154
|
+
|
155
|
+
::
|
156
|
+
|
157
|
+
pip install spacr
|
158
|
+
|
159
|
+
**Run SpaCr GUI:**
|
160
|
+
|
161
|
+
::
|
162
|
+
|
163
|
+
spacr
|
164
|
+
|
165
|
+
Data Availability
|
166
|
+
-----------------
|
167
|
+
|
168
|
+
- **Raw sequencing data** are available from NCBI BioProject `PRJNA1261935 <https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1261935>`_ and SRA accessions: `SRR33531217 <https://www.ncbi.nlm.nih.gov/sra/SRR33531217>`_, `SRR33531218 <https://www.ncbi.nlm.nih.gov/sra/SRR33531218>`_, `SRR33531219 <https://www.ncbi.nlm.nih.gov/sra/SRR33531219>`_, `SRR33531220 <https://www.ncbi.nlm.nih.gov/sra/SRR33531220>`_
|
169
|
+
|
170
|
+
- **Image data** is deposited at EBI BioStudies under accession: `S-BIAD2076 <https://www.ebi.ac.uk/biostudies/studies/S-BIAD2076>`_
|
171
|
+
|
172
|
+
Example Notebooks
|
173
|
+
-----------------
|
174
|
+
|
175
|
+
The following example Jupyter notebooks illustrate common workflows using spaCR.
|
176
|
+
|
177
|
+
- `1_spacr_generate_masks.ipynb <Notebooks/1_spacr_generate_masks.ipynb>`_
|
178
|
+
*Generate cell, nuclei, and pathogen segmentation masks from microscopy images using Cellpose.*
|
179
|
+
|
180
|
+
- `2_spacr_generate_mesurments_crop_images.ipynb <Notebooks/2_spacr_generate_mesurments_crop_images.ipynb>`_
|
181
|
+
*Extract object-level measurements and crop single-cell images for downstream analysis.*
|
182
|
+
|
183
|
+
- `3a_spacr_machine_learning.ipynb <Notebooks/3a_spacr_machine_learning.ipynb>`_
|
184
|
+
*Train traditional machine learning models (e.g., XGBoost) to classify cell phenotypes based on extracted features.*
|
185
|
+
|
186
|
+
- `3b_spacr_computer_vision.ipynb <Notebooks/3b_spacr_computer_vision.ipynb>`_
|
187
|
+
*Train and evaluate deep learning models (PyTorch CNNs/Transformers) on cropped object images.*
|
188
|
+
|
189
|
+
- `4_spacr_map_barecodes.ipynb <Notebooks/4_spacr_map_barecodes.ipynb>`_
|
190
|
+
*Map sequencing reads to row, column, and gRNA barcodes for CRISPR screen genotype-phenotype mapping.*
|
191
|
+
|
192
|
+
- `5_spacr_train_cellpose.ipynb <Notebooks/5_spacr_train_cellpose.ipynb>`_
|
193
|
+
*Finetune Cellpose models using your own annotated training data for improved segmentation accuracy.*
|
spacr-0.9.2/README.rst
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
.. |Docs| image:: https://github.com/EinarOlafsson/spacr/actions/workflows/pages/pages-build-deployment/badge.svg
|
2
|
+
:target: https://einarolafsson.github.io/spacr/index.html
|
3
|
+
.. |PyPI version| image:: https://badge.fury.io/py/spacr.svg
|
4
|
+
:target: https://badge.fury.io/py/spacr
|
5
|
+
.. |Python version| image:: https://img.shields.io/pypi/pyversions/spacr
|
6
|
+
:target: https://pypistats.org/packages/spacr
|
7
|
+
.. |Licence: GPL v3| image:: https://img.shields.io/github/license/EinarOlafsson/spacr
|
8
|
+
:target: https://github.com/EinarOlafsson/spacr/blob/master/LICENSE
|
9
|
+
.. |repo size| image:: https://img.shields.io/github/repo-size/EinarOlafsson/spacr
|
10
|
+
:target: https://github.com/EinarOlafsson/spacr/
|
11
|
+
|
12
|
+
.. _docs: https://einarolafsson.github.io/spacr/index.html
|
13
|
+
|
14
|
+
Badges
|
15
|
+
------
|
16
|
+
|Docs| |PyPI version| |Python version| |Licence: GPL v3| |repo size|
|
17
|
+
|
18
|
+
SpaCr
|
19
|
+
=====
|
20
|
+
|
21
|
+
**Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr).**
|
22
|
+
|
23
|
+
The spatial organization of organelles and proteins within cells constitutes a key level of functional regulation. In the context of infectious disease, the spatial relationships between host cell structures and intracellular pathogens are critical to understanding host clearance mechanisms and how pathogens evade them. SpaCr is a Python-based software package for generating single-cell image data for deep-learning sub-cellular/cellular phenotypic classification from pooled genetic CRISPR-Cas9 screens. SpaCr provides a flexible toolset to extract single-cell images and measurements from high-content cell painting experiments, train deep-learning models to classify cellular/subcellular phenotypes, simulate, and analyze pooled CRISPR-Cas9 imaging screens.
|
24
|
+
|
25
|
+
Features
|
26
|
+
--------
|
27
|
+
|
28
|
+
- **Generate Masks:** Generate cellpose masks of cell, nuclei, and pathogen objects.
|
29
|
+
- **Object Measurements:** Measurements for each object including scikit-image regionprops, intensity percentiles, shannon-entropy, Pearson’s and Manders’ correlations, homogeneity, and radial distribution. Measurements are saved to a SQL database in object-level tables.
|
30
|
+
- **Crop Images:** Save objects (cells, nuclei, pathogen, cytoplasm) as images. Object image paths are saved in a SQL database.
|
31
|
+
- **Train CNNs or Transformers:** Train Torch models to classify single object images.
|
32
|
+
- **Manual Annotation:** Supports manual annotation of single-cell images and segmentation to refine training datasets for training CNNs/Transformers or cellpose, respectively.
|
33
|
+
- **Finetune Cellpose Models:** Adjust pre-existing Cellpose models to your specific dataset for improved performance.
|
34
|
+
- **Timelapse Data Support:** Track objects in timelapse image data.
|
35
|
+
- **Simulations:** Simulate spatial phenotype screens.
|
36
|
+
- **Sequencing:** Map FASTQ reads to barcode and gRNA barcode metadata.
|
37
|
+
- **Misc:** Analyze Ca oscillation, recruitment, infection rate, plaque size/count.
|
38
|
+
|
39
|
+
.. image:: https://github.com/EinarOlafsson/spacr/raw/main/spacr/resources/icons/flow_chart_v2.png
|
40
|
+
:alt: SpaCr workflow
|
41
|
+
:align: center
|
42
|
+
|
43
|
+
|
44
|
+
**Overview and data organization of spaCR.**
|
45
|
+
|
46
|
+
**a.** Schematic workflow of the spaCR pipeline for pooled image-based CRISPR screens. Microscopy images (TIFF, LIF, CZI, NDI) and sequencing reads (FASTQ) are used as inputs (black). The main modules (teal) are: (1) Mask: generates object masks for cells, nuclei, pathogens, and cytoplasm; (2) Measure: extracts object-level features and crops object images, storing quantitative data in an SQL database; (3) Classify—applies machine learning (ML, e.g., XGBoost) or deep learning (DL, e.g., PyTorch) models to classify objects, summarizing results as well-level classification scores; (4) Map Barcodes: extracts and maps row, column, and gRNA barcodes from sequencing data to corresponding wells; (5) Regression: estimates gRNA effect sizes and gene scores via multiple linear regression using well-level summary statistics.
|
47
|
+
**b.** Downstream submodules available for extended analyses at each stage.
|
48
|
+
**c.** Output folder structure for each module, including locations for raw and processed images, masks, object-level measurements, datasets, and results.
|
49
|
+
**d.** List of all spaCR package modules.
|
50
|
+
|
51
|
+
Installation
|
52
|
+
------------
|
53
|
+
|
54
|
+
**Linux recommended.**
|
55
|
+
If using Windows, switch to Linux—it's free, open-source, and better.
|
56
|
+
|
57
|
+
**macOS prerequisites (before install):**
|
58
|
+
|
59
|
+
::
|
60
|
+
|
61
|
+
brew install libomp
|
62
|
+
brew install hdf5
|
63
|
+
|
64
|
+
**Linux GUI requirement:**
|
65
|
+
SpaCr GUI requires Tkinter.
|
66
|
+
|
67
|
+
::
|
68
|
+
|
69
|
+
sudo apt-get install python3-tk
|
70
|
+
|
71
|
+
**Installation:**
|
72
|
+
|
73
|
+
::
|
74
|
+
|
75
|
+
pip install spacr
|
76
|
+
|
77
|
+
**Run SpaCr GUI:**
|
78
|
+
|
79
|
+
::
|
80
|
+
|
81
|
+
spacr
|
82
|
+
|
83
|
+
Data Availability
|
84
|
+
-----------------
|
85
|
+
|
86
|
+
- **Raw sequencing data** are available from NCBI BioProject `PRJNA1261935 <https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1261935>`_ and SRA accessions: `SRR33531217 <https://www.ncbi.nlm.nih.gov/sra/SRR33531217>`_, `SRR33531218 <https://www.ncbi.nlm.nih.gov/sra/SRR33531218>`_, `SRR33531219 <https://www.ncbi.nlm.nih.gov/sra/SRR33531219>`_, `SRR33531220 <https://www.ncbi.nlm.nih.gov/sra/SRR33531220>`_
|
87
|
+
|
88
|
+
- **Image data** is deposited at EBI BioStudies under accession: `S-BIAD2076 <https://www.ebi.ac.uk/biostudies/studies/S-BIAD2076>`_
|
89
|
+
|
90
|
+
Example Notebooks
|
91
|
+
-----------------
|
92
|
+
|
93
|
+
The following example Jupyter notebooks illustrate common workflows using spaCR.
|
94
|
+
|
95
|
+
- `1_spacr_generate_masks.ipynb <Notebooks/1_spacr_generate_masks.ipynb>`_
|
96
|
+
*Generate cell, nuclei, and pathogen segmentation masks from microscopy images using Cellpose.*
|
97
|
+
|
98
|
+
- `2_spacr_generate_mesurments_crop_images.ipynb <Notebooks/2_spacr_generate_mesurments_crop_images.ipynb>`_
|
99
|
+
*Extract object-level measurements and crop single-cell images for downstream analysis.*
|
100
|
+
|
101
|
+
- `3a_spacr_machine_learning.ipynb <Notebooks/3a_spacr_machine_learning.ipynb>`_
|
102
|
+
*Train traditional machine learning models (e.g., XGBoost) to classify cell phenotypes based on extracted features.*
|
103
|
+
|
104
|
+
- `3b_spacr_computer_vision.ipynb <Notebooks/3b_spacr_computer_vision.ipynb>`_
|
105
|
+
*Train and evaluate deep learning models (PyTorch CNNs/Transformers) on cropped object images.*
|
106
|
+
|
107
|
+
- `4_spacr_map_barecodes.ipynb <Notebooks/4_spacr_map_barecodes.ipynb>`_
|
108
|
+
*Map sequencing reads to row, column, and gRNA barcodes for CRISPR screen genotype-phenotype mapping.*
|
109
|
+
|
110
|
+
- `5_spacr_train_cellpose.ipynb <Notebooks/5_spacr_train_cellpose.ipynb>`_
|
111
|
+
*Finetune Cellpose models using your own annotated training data for improved segmentation accuracy.*
|
@@ -1083,81 +1083,6 @@ def process_console_queue():
|
|
1083
1083
|
# **Continue processing if no error was detected**
|
1084
1084
|
after_id = console_output.after(uppdate_frequency, process_console_queue)
|
1085
1085
|
parent_frame.after_tasks.append(after_id)
|
1086
|
-
|
1087
|
-
def process_console_queue_v2():
|
1088
|
-
global q, console_output, parent_frame, progress_bar, process_console_queue
|
1089
|
-
|
1090
|
-
# Initialize function attribute if it doesn't exist
|
1091
|
-
if not hasattr(process_console_queue, "completed_tasks"):
|
1092
|
-
process_console_queue.completed_tasks = []
|
1093
|
-
if not hasattr(process_console_queue, "current_maximum"):
|
1094
|
-
process_console_queue.current_maximum = None
|
1095
|
-
|
1096
|
-
ansi_escape_pattern = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
|
1097
|
-
|
1098
|
-
while not q.empty():
|
1099
|
-
message = q.get_nowait()
|
1100
|
-
clean_message = ansi_escape_pattern.sub('', message)
|
1101
|
-
|
1102
|
-
# **Abort Execution if an Error Message is Detected**
|
1103
|
-
if clean_message.startswith("Error:"):
|
1104
|
-
console_output.insert(tk.END, clean_message + "\n", "error")
|
1105
|
-
console_output.see(tk.END)
|
1106
|
-
print("Run aborted due to error:", clean_message) # Debug message
|
1107
|
-
return # **Exit immediately to stop further execution**
|
1108
|
-
|
1109
|
-
# Check if the message contains progress information
|
1110
|
-
if clean_message.startswith("Progress:"):
|
1111
|
-
try:
|
1112
|
-
# Extract the progress information
|
1113
|
-
match = re.search(r'Progress: (\d+)/(\d+), operation_type: ([\w\s]*),(.*)', clean_message)
|
1114
|
-
|
1115
|
-
if match:
|
1116
|
-
current_progress = int(match.group(1))
|
1117
|
-
total_progress = int(match.group(2))
|
1118
|
-
operation_type = match.group(3).strip()
|
1119
|
-
additional_info = match.group(4).strip() # Capture everything after operation_type
|
1120
|
-
|
1121
|
-
# Check if the maximum value has changed
|
1122
|
-
if process_console_queue.current_maximum != total_progress:
|
1123
|
-
process_console_queue.current_maximum = total_progress
|
1124
|
-
process_console_queue.completed_tasks = []
|
1125
|
-
|
1126
|
-
# Add the task to the completed set
|
1127
|
-
process_console_queue.completed_tasks.append(current_progress)
|
1128
|
-
|
1129
|
-
# Calculate the unique progress count
|
1130
|
-
unique_progress_count = len(np.unique(process_console_queue.completed_tasks))
|
1131
|
-
|
1132
|
-
# Update the progress bar
|
1133
|
-
if progress_bar:
|
1134
|
-
progress_bar['maximum'] = total_progress
|
1135
|
-
progress_bar['value'] = unique_progress_count
|
1136
|
-
|
1137
|
-
# Store operation type and additional info
|
1138
|
-
if operation_type:
|
1139
|
-
progress_bar.operation_type = operation_type
|
1140
|
-
progress_bar.additional_info = additional_info
|
1141
|
-
|
1142
|
-
# Update the progress label
|
1143
|
-
if progress_bar.progress_label:
|
1144
|
-
progress_bar.update_label()
|
1145
|
-
|
1146
|
-
# Clear completed tasks when progress is complete
|
1147
|
-
if unique_progress_count >= total_progress:
|
1148
|
-
process_console_queue.completed_tasks.clear()
|
1149
|
-
|
1150
|
-
except Exception as e:
|
1151
|
-
print(f"Error parsing progress message: {e}")
|
1152
|
-
|
1153
|
-
else:
|
1154
|
-
# Insert non-progress messages into the console
|
1155
|
-
console_output.insert(tk.END, clean_message + "\n")
|
1156
|
-
console_output.see(tk.END)
|
1157
|
-
|
1158
|
-
# **Continue processing if no error was detected**
|
1159
|
-
after_id = console_output.after(uppdate_frequency, process_console_queue)
|
1160
|
-
parent_frame.after_tasks.append(after_id)
|
1161
1086
|
|
1162
1087
|
def main_thread_update_function(root, q, fig_queue, canvas_widget):
|
1163
1088
|
global uppdate_frequency
|
@@ -2,12 +2,11 @@ import os, cv2, time, sqlite3, traceback, shutil
|
|
2
2
|
import numpy as np
|
3
3
|
import pandas as pd
|
4
4
|
from collections import defaultdict
|
5
|
-
from scipy.stats import pearsonr
|
5
|
+
from scipy.stats import pearsonr, skew, kurtosis, mode
|
6
6
|
import multiprocessing as mp
|
7
|
-
from scipy.ndimage import distance_transform_edt, generate_binary_structure
|
7
|
+
from scipy.ndimage import distance_transform_edt, generate_binary_structure, binary_dilation, gaussian_filter, center_of_mass
|
8
8
|
from skimage.measure import regionprops, regionprops_table, shannon_entropy
|
9
9
|
from skimage.exposure import rescale_intensity
|
10
|
-
from scipy.ndimage import binary_dilation
|
11
10
|
from skimage.segmentation import find_boundaries
|
12
11
|
from skimage.feature import graycomatrix, graycoprops
|
13
12
|
from mahotas.features import zernike_moments
|
@@ -16,7 +15,6 @@ from skimage.util import img_as_bool
|
|
16
15
|
import matplotlib.pyplot as plt
|
17
16
|
from math import ceil, sqrt
|
18
17
|
|
19
|
-
|
20
18
|
def get_components(cell_mask, nucleus_mask, pathogen_mask):
|
21
19
|
"""
|
22
20
|
Get the components (nucleus and pathogens) for each cell in the given masks.
|
@@ -250,6 +248,148 @@ def _create_dataframe(radial_distributions, object_type):
|
|
250
248
|
return df
|
251
249
|
|
252
250
|
def _extended_regionprops_table(labels, image, intensity_props):
|
251
|
+
"""
|
252
|
+
Calculate extended region properties table, adding a suite of advanced quantitative features.
|
253
|
+
"""
|
254
|
+
|
255
|
+
def _gini(array):
|
256
|
+
# Compute Gini coefficient (nan safe)
|
257
|
+
array = np.abs(array[~np.isnan(array)])
|
258
|
+
n = array.size
|
259
|
+
if n == 0:
|
260
|
+
return np.nan
|
261
|
+
array = np.sort(array)
|
262
|
+
index = np.arange(1, n + 1)
|
263
|
+
return (np.sum((2 * index - n - 1) * array)) / (n * np.sum(array)) if np.sum(array) else np.nan
|
264
|
+
|
265
|
+
props = regionprops_table(labels, image, properties=intensity_props)
|
266
|
+
df = pd.DataFrame(props)
|
267
|
+
|
268
|
+
regions = regionprops(labels, intensity_image=image)
|
269
|
+
integrated_intensity = []
|
270
|
+
std_intensity = []
|
271
|
+
median_intensity = []
|
272
|
+
skew_intensity = []
|
273
|
+
kurtosis_intensity = []
|
274
|
+
mode_intensity = []
|
275
|
+
range_intensity = []
|
276
|
+
iqr_intensity = []
|
277
|
+
cv_intensity = []
|
278
|
+
gini_intensity = []
|
279
|
+
frac_high90 = []
|
280
|
+
frac_low10 = []
|
281
|
+
entropy_intensity = []
|
282
|
+
|
283
|
+
for region in regions:
|
284
|
+
intens = region.intensity_image[region.image]
|
285
|
+
intens = intens[~np.isnan(intens)]
|
286
|
+
if intens.size == 0:
|
287
|
+
integrated_intensity.append(np.nan)
|
288
|
+
std_intensity.append(np.nan)
|
289
|
+
median_intensity.append(np.nan)
|
290
|
+
skew_intensity.append(np.nan)
|
291
|
+
kurtosis_intensity.append(np.nan)
|
292
|
+
mode_intensity.append(np.nan)
|
293
|
+
range_intensity.append(np.nan)
|
294
|
+
iqr_intensity.append(np.nan)
|
295
|
+
cv_intensity.append(np.nan)
|
296
|
+
gini_intensity.append(np.nan)
|
297
|
+
frac_high90.append(np.nan)
|
298
|
+
frac_low10.append(np.nan)
|
299
|
+
entropy_intensity.append(np.nan)
|
300
|
+
else:
|
301
|
+
integrated_intensity.append(np.sum(intens))
|
302
|
+
std_intensity.append(np.std(intens))
|
303
|
+
median_intensity.append(np.median(intens))
|
304
|
+
skew_intensity.append(skew(intens) if intens.size > 2 else np.nan)
|
305
|
+
kurtosis_intensity.append(kurtosis(intens) if intens.size > 3 else np.nan)
|
306
|
+
# Mode (use first mode value if multimodal)
|
307
|
+
try:
|
308
|
+
mode_val = mode(intens, nan_policy='omit').mode
|
309
|
+
mode_intensity.append(mode_val[0] if len(mode_val) > 0 else np.nan)
|
310
|
+
except Exception:
|
311
|
+
mode_intensity.append(np.nan)
|
312
|
+
range_intensity.append(np.ptp(intens))
|
313
|
+
iqr_intensity.append(np.percentile(intens, 75) - np.percentile(intens, 25))
|
314
|
+
cv_intensity.append(np.std(intens) / np.mean(intens) if np.mean(intens) != 0 else np.nan)
|
315
|
+
gini_intensity.append(_gini(intens))
|
316
|
+
frac_high90.append(np.mean(intens > np.percentile(intens, 90)))
|
317
|
+
frac_low10.append(np.mean(intens < np.percentile(intens, 10)))
|
318
|
+
entropy_intensity.append(shannon_entropy(intens) if intens.size > 1 else 0.0)
|
319
|
+
|
320
|
+
df['integrated_intensity'] = integrated_intensity
|
321
|
+
df['std_intensity'] = std_intensity
|
322
|
+
df['median_intensity'] = median_intensity
|
323
|
+
df['skew_intensity'] = skew_intensity
|
324
|
+
df['kurtosis_intensity'] = kurtosis_intensity
|
325
|
+
df['mode_intensity'] = mode_intensity
|
326
|
+
df['range_intensity'] = range_intensity
|
327
|
+
df['iqr_intensity'] = iqr_intensity
|
328
|
+
df['cv_intensity'] = cv_intensity
|
329
|
+
df['gini_intensity'] = gini_intensity
|
330
|
+
df['frac_high90'] = frac_high90
|
331
|
+
df['frac_low10'] = frac_low10
|
332
|
+
df['entropy_intensity'] = entropy_intensity
|
333
|
+
|
334
|
+
percentiles = [5, 10, 25, 50, 75, 85, 95]
|
335
|
+
for p in percentiles:
|
336
|
+
df[f'percentile_{p}'] = [
|
337
|
+
np.percentile(region.intensity_image[region.image], p)
|
338
|
+
for region in regions
|
339
|
+
]
|
340
|
+
return df
|
341
|
+
|
342
|
+
def _extended_regionprops_table_v2(labels, image, intensity_props):
|
343
|
+
"""
|
344
|
+
Calculate extended region properties table, adding integrated intensity,
|
345
|
+
skewness, kurtosis, std, and median intensity per region.
|
346
|
+
"""
|
347
|
+
# regionprops_table gives you vectorized props, but not everything you want
|
348
|
+
props = regionprops_table(labels, image, properties=intensity_props)
|
349
|
+
df = pd.DataFrame(props)
|
350
|
+
|
351
|
+
# Compute extra features region-by-region
|
352
|
+
regions = regionprops(labels, intensity_image=image)
|
353
|
+
integrated_intensity = []
|
354
|
+
std_intensity = []
|
355
|
+
median_intensity = []
|
356
|
+
skew_intensity = []
|
357
|
+
kurtosis_intensity = []
|
358
|
+
for region in regions:
|
359
|
+
intens = region.intensity_image[region.image]
|
360
|
+
# Handle empty region edge-case (shouldn't happen)
|
361
|
+
if intens.size == 0:
|
362
|
+
integrated_intensity.append(np.nan)
|
363
|
+
std_intensity.append(np.nan)
|
364
|
+
median_intensity.append(np.nan)
|
365
|
+
skew_intensity.append(np.nan)
|
366
|
+
kurtosis_intensity.append(np.nan)
|
367
|
+
else:
|
368
|
+
integrated_intensity.append(np.sum(intens))
|
369
|
+
std_intensity.append(np.std(intens))
|
370
|
+
median_intensity.append(np.median(intens))
|
371
|
+
# Only valid for >2 pixels
|
372
|
+
skew_intensity.append(skew(intens) if intens.size > 2 else np.nan)
|
373
|
+
kurtosis_intensity.append(kurtosis(intens) if intens.size > 3 else np.nan)
|
374
|
+
|
375
|
+
df['integrated_intensity'] = integrated_intensity
|
376
|
+
df['std_intensity'] = std_intensity
|
377
|
+
df['median_intensity'] = median_intensity
|
378
|
+
df['skew_intensity'] = skew_intensity
|
379
|
+
df['kurtosis_intensity'] = kurtosis_intensity
|
380
|
+
|
381
|
+
# You can add other features here if desired
|
382
|
+
|
383
|
+
# Percentiles (your existing code—optional if you want to keep)
|
384
|
+
percentiles = [5, 10, 25, 50, 75, 85, 95]
|
385
|
+
for p in percentiles:
|
386
|
+
df[f'percentile_{p}'] = [
|
387
|
+
np.percentile(region.intensity_image[region.image], p)
|
388
|
+
for region in regions
|
389
|
+
]
|
390
|
+
return df
|
391
|
+
|
392
|
+
def _extended_regionprops_table_v1(labels, image, intensity_props):
|
253
393
|
"""
|
254
394
|
Calculate extended region properties table.
|
255
395
|
|
@@ -495,8 +635,75 @@ def _estimate_blur(image):
|
|
495
635
|
# Compute and return the variance of the Laplacian
|
496
636
|
return lap.var()
|
497
637
|
|
638
|
+
def _measure_intensity_distance(cell_mask, nucleus_mask, pathogen_mask, channel_arrays, settings):
|
639
|
+
"""
|
640
|
+
Compute Gaussian-smoothed intensity-weighted centroid distances for each cell object.
|
641
|
+
"""
|
642
|
+
|
643
|
+
sigma = settings.get('distance_gaussian_sigma', 1.0)
|
644
|
+
cell_labels = np.unique(cell_mask)
|
645
|
+
cell_labels = cell_labels[cell_labels > 0]
|
646
|
+
|
647
|
+
dfs = []
|
648
|
+
nucleus_dt = distance_transform_edt(nucleus_mask == 0)
|
649
|
+
pathogen_dt = distance_transform_edt(pathogen_mask == 0)
|
650
|
+
|
651
|
+
for ch in range(channel_arrays.shape[-1]):
|
652
|
+
channel_img = channel_arrays[:, :, ch]
|
653
|
+
blurred_img = gaussian_filter(channel_img, sigma=sigma)
|
654
|
+
|
655
|
+
data = []
|
656
|
+
for label in cell_labels:
|
657
|
+
cell_coords = np.argwhere(cell_mask == label)
|
658
|
+
if cell_coords.size == 0:
|
659
|
+
data.append([label, np.nan, np.nan])
|
660
|
+
continue
|
661
|
+
|
662
|
+
minr, minc = np.min(cell_coords, axis=0)
|
663
|
+
maxr, maxc = np.max(cell_coords, axis=0) + 1
|
664
|
+
|
665
|
+
cell_submask = (cell_mask[minr:maxr, minc:maxc] == label)
|
666
|
+
blurred_subimg = blurred_img[minr:maxr, minc:maxc]
|
667
|
+
|
668
|
+
if np.sum(cell_submask) == 0:
|
669
|
+
data.append([label, np.nan, np.nan])
|
670
|
+
continue
|
671
|
+
|
672
|
+
masked_intensity = blurred_subimg * cell_submask
|
673
|
+
com_local = center_of_mass(masked_intensity)
|
674
|
+
if np.isnan(com_local[0]):
|
675
|
+
data.append([label, np.nan, np.nan])
|
676
|
+
continue
|
677
|
+
|
678
|
+
com_global = (com_local[0] + minr, com_local[1] + minc)
|
679
|
+
com_global_int = tuple(np.round(com_global).astype(int))
|
680
|
+
|
681
|
+
x, y = com_global_int
|
682
|
+
if not (0 <= x < cell_mask.shape[0] and 0 <= y < cell_mask.shape[1]):
|
683
|
+
data.append([label, np.nan, np.nan])
|
684
|
+
continue
|
685
|
+
|
686
|
+
nucleus_dist = nucleus_dt[x, y]
|
687
|
+
pathogen_dist = pathogen_dt[x, y]
|
688
|
+
|
689
|
+
data.append([label, nucleus_dist, pathogen_dist])
|
690
|
+
|
691
|
+
df = pd.DataFrame(data, columns=['label',
|
692
|
+
f'cell_channel_{ch}_distance_to_nucleus',
|
693
|
+
f'cell_channel_{ch}_distance_to_pathogen'])
|
694
|
+
dfs.append(df)
|
695
|
+
|
696
|
+
# Merge all channel dataframes on label
|
697
|
+
merged_df = dfs[0]
|
698
|
+
for df in dfs[1:]:
|
699
|
+
merged_df = merged_df.merge(df, on='label', how='outer')
|
700
|
+
|
701
|
+
return merged_df
|
702
|
+
|
703
|
+
|
498
704
|
#@log_function_call
|
499
705
|
def _intensity_measurements(cell_mask, nucleus_mask, pathogen_mask, cytoplasm_mask, channel_arrays, settings, sizes=[3, 6, 12, 24], periphery=True, outside=True):
|
706
|
+
|
500
707
|
"""
|
501
708
|
Calculate various intensity measurements for different regions in the image.
|
502
709
|
|
@@ -536,8 +743,8 @@ def _intensity_measurements(cell_mask, nucleus_mask, pathogen_mask, cytoplasm_ma
|
|
536
743
|
df.append(empty_df)
|
537
744
|
continue
|
538
745
|
|
539
|
-
mask_intensity_df = _extended_regionprops_table(label, channel, intensity_props)
|
540
|
-
mask_intensity_df['shannon_entropy'] = shannon_entropy(channel, base=2)
|
746
|
+
mask_intensity_df = _extended_regionprops_table(label, channel, intensity_props)
|
747
|
+
#mask_intensity_df['shannon_entropy'] = shannon_entropy(channel, base=2)
|
541
748
|
|
542
749
|
if homogeneity:
|
543
750
|
homogeneity_df = _calculate_homogeneity(label, channel, distances)
|
@@ -558,6 +765,10 @@ def _intensity_measurements(cell_mask, nucleus_mask, pathogen_mask, cytoplasm_ma
|
|
558
765
|
|
559
766
|
mask_intensity_df.columns = [f'{ls[j]}_channel_{i}_{col}' if col != 'label' else col for col in mask_intensity_df.columns]
|
560
767
|
df.append(mask_intensity_df)
|
768
|
+
|
769
|
+
if isinstance(settings['distance_gaussian_sigma'], int):
|
770
|
+
intensity_distance_df = _measure_intensity_distance(cell_mask, nucleus_mask, pathogen_mask, channel_arrays, settings)
|
771
|
+
cell_dfs.append(intensity_distance_df)
|
561
772
|
|
562
773
|
if radial_dist:
|
563
774
|
if np.max(nucleus_mask) != 0:
|
@@ -565,7 +776,7 @@ def _intensity_measurements(cell_mask, nucleus_mask, pathogen_mask, cytoplasm_ma
|
|
565
776
|
nucleus_df = _create_dataframe(nucleus_radial_distributions, 'nucleus')
|
566
777
|
dfs[1].append(nucleus_df)
|
567
778
|
|
568
|
-
if np.max(
|
779
|
+
if np.max(pathogen_mask) != 0:
|
569
780
|
pathogen_radial_distributions = _calculate_radial_distribution(cell_mask, pathogen_mask, channel_arrays, num_bins=6)
|
570
781
|
pathogen_df = _create_dataframe(pathogen_radial_distributions, 'pathogen')
|
571
782
|
dfs[2].append(pathogen_df)
|
@@ -785,6 +996,7 @@ def _measure_crop_core(index, time_ls, file, settings):
|
|
785
996
|
#merge skeleton_df with cell_df here
|
786
997
|
|
787
998
|
cell_intensity_df, nucleus_intensity_df, pathogen_intensity_df, cytoplasm_intensity_df = _intensity_measurements(cell_mask, nucleus_mask, pathogen_mask, cytoplasm_mask, channel_arrays, settings, sizes=[1, 2, 3, 4, 5], periphery=True, outside=True)
|
999
|
+
|
788
1000
|
if settings['cell_mask_dim'] is not None:
|
789
1001
|
cell_merged_df = _merge_and_save_to_database(cell_df, cell_intensity_df, 'cell', source_folder, file_name, settings['experiment'], settings['timelapse'])
|
790
1002
|
if settings['nucleus_mask_dim'] is not None:
|