spacr 0.3.55__tar.gz → 0.3.61__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.3.55/spacr.egg-info → spacr-0.3.61}/PKG-INFO +1 -1
- spacr-0.3.61/notebooks/.ipynb_checkpoints/4_spacr_annotate-checkpoint.ipynb +48 -0
- spacr-0.3.61/notebooks/1_spacr_generate_masks.ipynb +72 -0
- spacr-0.3.61/notebooks/2_spacr_generate_mesurments_crop_images.ipynb +61 -0
- spacr-0.3.61/notebooks/3a_spacr_machine_learning.ipynb +110 -0
- spacr-0.3.61/notebooks/3b_spacr_computer_vision.ipynb +186 -0
- spacr-0.3.61/notebooks/4_spacr_annotate.ipynb +48 -0
- spacr-0.3.61/notebooks/old/.ipynb_checkpoints/figure_2-checkpoint.ipynb +2623 -0
- spacr-0.3.61/notebooks/old/.ipynb_checkpoints/interperate_vision_classes-checkpoint.ipynb +816 -0
- spacr-0.3.61/notebooks/old/.ipynb_checkpoints/spacr_image_umap-checkpoint.ipynb +96 -0
- spacr-0.3.61/notebooks/old/figure_2.ipynb +2623 -0
- spacr-0.3.61/notebooks/old/figure_3-Copy1.ipynb +2952 -0
- spacr-0.3.61/notebooks/old/figure_3.ipynb +9183 -0
- spacr-0.3.61/notebooks/old/interperate_vision_classes.ipynb +831 -0
- spacr-0.3.61/notebooks/old/spacr_image_umap.ipynb +878 -0
- {spacr-0.3.55 → spacr-0.3.61}/setup.py +1 -1
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_annotate.py +0 -8
- {spacr-0.3.55 → spacr-0.3.61}/spacr/core.py +12 -7
- {spacr-0.3.55 → spacr-0.3.61}/spacr/gui_utils.py +24 -8
- {spacr-0.3.55 → spacr-0.3.61}/spacr/io.py +4 -155
- {spacr-0.3.55 → spacr-0.3.61}/spacr/ml.py +18 -14
- {spacr-0.3.55 → spacr-0.3.61}/spacr/plot.py +82 -23
- {spacr-0.3.55 → spacr-0.3.61}/spacr/settings.py +4 -13
- {spacr-0.3.55 → spacr-0.3.61}/spacr/submodules.py +299 -5
- {spacr-0.3.55 → spacr-0.3.61}/spacr/utils.py +39 -2
- {spacr-0.3.55 → spacr-0.3.61/spacr.egg-info}/PKG-INFO +1 -1
- {spacr-0.3.55 → spacr-0.3.61}/spacr.egg-info/SOURCES.txt +19 -5
- {spacr-0.3.55 → spacr-0.3.61}/.readthedocs.yaml +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/LICENSE +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/MANIFEST.in +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/README.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/deploy_docs.sh +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/requirements.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/Makefile +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/doctrees/environment.pickle +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/index.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_annotate.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_classify.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_make_masks.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_mask.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_measure.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_sequencing.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/app_umap.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/core.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/deep_spacr.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/graph_learning.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/gui.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/gui_core.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/gui_elements.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/gui_utils.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/io.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/logger.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/measure.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/plot.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/sequencing.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/settings.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/sim.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/timelapse.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_modules/spacr/utils.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_sources/index.rst.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_sources/modules.rst.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_sources/spacr.rst.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/basic.css +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/badge_only.css +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-bold.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-normal.woff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/css/theme.css +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/doctools.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/documentation_options.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/file.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/jquery.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/js/badge_only.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/js/html5shiv.min.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/js/theme.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/language_data.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/minus.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/plus.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/pygments.css +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/searchtools.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/_static/sphinx_highlight.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/genindex.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/index.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/modules.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/objects.inv +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/py-modindex.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/search.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/searchindex.js +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/_build/html/spacr.html +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/conf.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/index.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/make.bat +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/modules.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/docs/source/spacr.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/environment.yaml +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/fonts/OpenSans-Regular.ttf +0 -0
- {spacr-0.3.55/notebooks → spacr-0.3.61/notebooks/old}/cv_scoring_nb.ipynb +0 -0
- {spacr-0.3.55/notebooks → spacr-0.3.61/notebooks/old}/deep_learning_spacr.ipynb +0 -0
- {spacr-0.3.55/notebooks → spacr-0.3.61/notebooks/old}/machine_learning_spacr_nb.ipynb +0 -0
- {spacr-0.3.55/notebooks → spacr-0.3.61/notebooks/old}/spacr_0.1_all_settings_git.ipynb +0 -0
- {spacr-0.3.55/notebooks → spacr-0.3.61/notebooks/old}/spacr_0.1_minimal.ipynb +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/path/home/carruthers/datasets/plate1/measurements/measurements.db +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/path/home/carruthers/datasets/plate1/settings/measure_crop_settings.csv +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/path/settings/preprocess_generate_masks_settings.csv +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/requirements.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/settings/measure_crop_settings.csv +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/setup.cfg +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/setup_docs.sh +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/source/conf.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/source/index.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/source/modules.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/source/setup.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/source/spacr.rst +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/__main__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_classify.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_make_masks.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_mask.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_measure.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_sequencing.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/app_umap.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/cellpose.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/chat_bot.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/deep_spacr.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/gui.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/gui_core.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/gui_elements.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/logger.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/measure.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/mediar.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/openai.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/.gitignore +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/LICENSE +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/README.md +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/SetupDict.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/baseline.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/mediar_example.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/pred/pred_mediar.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/step1_pretraining/phase1.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/step1_pretraining/phase2.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/step2_finetuning/finetuning1.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/step2_finetuning/finetuning2.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/step3_prediction/base_prediction.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/config/step3_prediction/ensemble_tta.json +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/BasePredictor.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/BaseTrainer.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/Baseline/Predictor.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/Baseline/Trainer.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/Baseline/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/Baseline/utils.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/MEDIAR/EnsemblePredictor.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/MEDIAR/Predictor.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/MEDIAR/Trainer.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/MEDIAR/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/MEDIAR/utils.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/core/utils.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/evaluate.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/generate_mapping.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/image/examples/img1.tiff +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/image/examples/img2.tif +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/image/failure_cases.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/image/mediar_framework.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/image/mediar_model.PNG +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/image/mediar_results.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/main.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/predict.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/requirements.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/custom/CellAware.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/custom/LoadImage.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/custom/NormalizeImage.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/custom/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/custom/modalities.pkl +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/datasetter.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/transforms.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/data_utils/utils.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/measures.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/models/MEDIARFormer.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/models/__init__.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/MEDIAR/train_tools/utils.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/data/lopit.csv +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/data/toxoplasma_metadata.csv +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/OFL.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/OpenSans-Italic-VariableFont_wdth,wght.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/OpenSans-VariableFont_wdth,wght.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/README.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-Bold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-BoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-ExtraBold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-ExtraBoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-Italic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-Light.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-LightItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-Medium.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-MediumItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-Regular.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-SemiBold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans-SemiBoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Bold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-BoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-ExtraBold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-ExtraBoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Italic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Light.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-LightItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Medium.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-MediumItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-Regular.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-SemiBold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_Condensed-SemiBoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Bold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-BoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-ExtraBold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-ExtraBoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Italic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Light.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-LightItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Medium.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-MediumItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Regular.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-SemiBold.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/abort.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/annotate.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/cellpose_all.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/cellpose_masks.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/classify.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/convert.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/default.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/dna_matrix.mp4 +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/download.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/logo.pdf +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/logo_spacr.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/logo_spacr_1.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/make_masks.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/map_barcodes.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/mask.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/measure.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/ml_analyze.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/plaque.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/recruitment.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/regression.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/run.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/sequencing.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/settings.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/train_cellpose.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/icons/umap.png +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/images/plate1_E01_T0001F001L01A01Z01C02.tif +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/images/plate1_E01_T0001F001L01A02Z01C01.tif +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/resources/images/plate1_E01_T0001F001L01A03Z01C03.tif +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/sequencing.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/sim.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/timelapse.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/toxo.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr/version.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr.egg-info/dependency_links.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr.egg-info/entry_points.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr.egg-info/requires.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/spacr.egg-info/top_level.txt +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_annotate_app.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_core.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_gui_classify_app.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_gui_mask_app.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_gui_measure_app.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_gui_sim_app.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_gui_utils.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_io.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_mask_app.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_measure.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_plot.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_sim.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_timelapse.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_train.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_umap.py +0 -0
- {spacr-0.3.55 → spacr-0.3.61}/tests/test_utils.py +0 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "d6a39408",
|
7
|
+
"metadata": {},
|
8
|
+
"outputs": [],
|
9
|
+
"source": [
|
10
|
+
"from spacr.gui_utils import annotate\n",
|
11
|
+
"\n",
|
12
|
+
"settings = {'src':'/nas_mnt/carruthers/Einar/tsg101_screen/TSG101SCREEN_20240826_140251/plate4', # (path) path to source folder (where origional images were stored)\n",
|
13
|
+
" 'image_type':'cell_png', # (Optional, string) string in the path of each image (used to filter images)\n",
|
14
|
+
" 'channels':['r', 'g', 'b'], # (list) - Channels to visualize ('r', 'g', and/or 'b')\n",
|
15
|
+
" 'img_size':200, # (integer) - Size of images on the screen (height and weight)\n",
|
16
|
+
" 'normalize_channels':['r','g','b'], # (list) - Channels to normalize\n",
|
17
|
+
" 'annotation_column':'test', # (string) - Column in the database containing/to contain annotations\n",
|
18
|
+
" 'normalize':False, # (bool) - Normalize images to percentiles\n",
|
19
|
+
" 'percentiles':(2,98), # (tuple) - Percentiles used for normalization\n",
|
20
|
+
" 'measurement':None, # (string or NoneType) - Measurement used to filter images\n",
|
21
|
+
" 'threshold':None} # (Integer or NoneType) - Threshold for measurement\n",
|
22
|
+
"\n",
|
23
|
+
"annotate(settings)"
|
24
|
+
]
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"metadata": {
|
28
|
+
"kernelspec": {
|
29
|
+
"display_name": "spacr",
|
30
|
+
"language": "python",
|
31
|
+
"name": "spacr"
|
32
|
+
},
|
33
|
+
"language_info": {
|
34
|
+
"codemirror_mode": {
|
35
|
+
"name": "ipython",
|
36
|
+
"version": 3
|
37
|
+
},
|
38
|
+
"file_extension": ".py",
|
39
|
+
"mimetype": "text/x-python",
|
40
|
+
"name": "python",
|
41
|
+
"nbconvert_exporter": "python",
|
42
|
+
"pygments_lexer": "ipython3",
|
43
|
+
"version": "3.9.19"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"nbformat": 4,
|
47
|
+
"nbformat_minor": 5
|
48
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "2c78f9de",
|
7
|
+
"metadata": {},
|
8
|
+
"outputs": [],
|
9
|
+
"source": [
|
10
|
+
"from spacr.core import preprocess_generate_masks\n",
|
11
|
+
"%matplotlib inline\n",
|
12
|
+
"\n",
|
13
|
+
"settings = {'metadata_type':'cellvoyager', # (string) - type of fime name metadata (cellvoyager, cq1, Nikon)\n",
|
14
|
+
" 'custom_regex':None, # (regex) - Regular expression if filename metadata not in metadata_type \n",
|
15
|
+
" 'experiment':'ubiquitin', # (string) - Name of experiment\n",
|
16
|
+
" 'channels':[0,1,2,3], # (list) - list of integers representing available channels\n",
|
17
|
+
" 'cell_channel':3, # (integer or NoneType) - Cell image dimension \n",
|
18
|
+
" 'cell_background':100, # (integer) - Background value in cell images\n",
|
19
|
+
" 'cell_Signal_to_noise':10, # (integer) - Signal to noise ration for cell channel\n",
|
20
|
+
" 'cell_CP_prob':-1, # (integer) - Cellpose Cell probability\n",
|
21
|
+
" 'remove_background_cell':False, # (bool) - Set background to 0 for cell channel\n",
|
22
|
+
" 'nucleus_channel':0, # (Optional, integer or NoneType) - Nucleus image dimension \n",
|
23
|
+
" 'nucleus_background':500, # (Optional, integer) - Background value in nucleus images\n",
|
24
|
+
" 'nucleus_Signal_to_noise':2, # (Optional, integer) - Signal to noise ration for nucleus channel\n",
|
25
|
+
" 'nucleus_CP_prob':0, # (Optional, integer) - Cellpose Nucleus probability\n",
|
26
|
+
" 'remove_background_nucleus':False, # (Optional, bool) - Set background to 0 for nucleus channel\n",
|
27
|
+
" 'pathogen_model':None, # (Optional, path or NoneType) - Custom cellpose model path for pathogen detection\n",
|
28
|
+
" 'pathogen_channel':1, # (Optional, integer or NoneType) - Pathogen image dimension \n",
|
29
|
+
" 'pathogen_background':200, # (Optional, integer) - Background value in pathogen images\n",
|
30
|
+
" 'pathogen_Signal_to_noise':5, # (Optional, integer) - Signal to noise ration for pathogen channel\n",
|
31
|
+
" 'pathogen_CP_prob':-1, # (Optional, integer) - Cellpose pathogen probability\n",
|
32
|
+
" 'remove_background_pathogen':True, # (Optional, bool) - Set background to 0 for pathogen channel\n",
|
33
|
+
" 'magnification':40, # (integer) - Objective magnefication used to aquire images (40, 60, 100)\n",
|
34
|
+
" 'save':True, # (bool) - Save masks and object data to database\n",
|
35
|
+
" 'preprocess':True, # (bool) - Preprocess images\n",
|
36
|
+
" 'masks':True, # (bool) - Generate masks\n",
|
37
|
+
" 'batch_size':50, # (bool) - Number of images to be normalized together and loaded onto the GPU\n",
|
38
|
+
" 'filter':False, # (bool) - Filter objects based on size\n",
|
39
|
+
" 'merge_pathogens':True, # (bool) - Merge pathogens that share > 75% perimiter\n",
|
40
|
+
" 'plot':False, # (bool) - Plot normalized intensity and object images\n",
|
41
|
+
" 'adjust_cells':True, # (bool) - If cell, nucleus and pathogen: merge cells that share a pathogen\n",
|
42
|
+
" 'test_mode':False, # (bool) - Test settings in test mode before analyzing entire experiment\n",
|
43
|
+
" 'test_images':10, # (integer) - Number of images to analyze in test mode\n",
|
44
|
+
" 'random_test':True} # (bool) - Randomize images for test mode\n",
|
45
|
+
"\n",
|
46
|
+
"src = 'path' # (path) path to source folder (where origional images were stored)\n",
|
47
|
+
"preprocess_generate_masks(src, settings=settings)"
|
48
|
+
]
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"metadata": {
|
52
|
+
"kernelspec": {
|
53
|
+
"display_name": "spacr",
|
54
|
+
"language": "python",
|
55
|
+
"name": "spacr"
|
56
|
+
},
|
57
|
+
"language_info": {
|
58
|
+
"codemirror_mode": {
|
59
|
+
"name": "ipython",
|
60
|
+
"version": 3
|
61
|
+
},
|
62
|
+
"file_extension": ".py",
|
63
|
+
"mimetype": "text/x-python",
|
64
|
+
"name": "python",
|
65
|
+
"nbconvert_exporter": "python",
|
66
|
+
"pygments_lexer": "ipython3",
|
67
|
+
"version": "3.9.19"
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"nbformat": 4,
|
71
|
+
"nbformat_minor": 5
|
72
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "8fddf2d9",
|
7
|
+
"metadata": {},
|
8
|
+
"outputs": [],
|
9
|
+
"source": [
|
10
|
+
"from spacr.measure import measure_crop\n",
|
11
|
+
"%matplotlib inline\n",
|
12
|
+
"\n",
|
13
|
+
"settings = {'src':'path', # (path) path to source folder (ens in /merged)\n",
|
14
|
+
" 'channels':[0,1,2,3],# (list) - list of integers representing available channels\n",
|
15
|
+
" 'cell_mask_dim':4, # (integer or NoneType) - Cell mask dimension \n",
|
16
|
+
" 'cell_min_size':2000, # (integer) - minimum size in px2 of cell objects\n",
|
17
|
+
" 'nucleus_mask_dim':5, # (integer or NoneType) - Nucleus mask dimension \n",
|
18
|
+
" 'nucleus_min_size':1000, # (integer) - minimum size in px2 of nuclei objects\n",
|
19
|
+
" 'pathogen_mask_dim':6, # (integer or NoneType) - Pathogen mask dimension \n",
|
20
|
+
" 'pathogen_min_size':400, # (integer) - minimum size in px2 of pathogen objects\n",
|
21
|
+
" 'cytoplasm_min_size':0, # (integer) - minimum size in px2 of cutoplasm (cell-(nucleus+pathogen)) objects\n",
|
22
|
+
" 'save_png':True, # (bool) - save objects as PNGs\n",
|
23
|
+
" 'crop_mode':['cell'], # (list) - Object(s) to be cropped into images ('cell', 'nuclei', 'pathogen')\n",
|
24
|
+
" 'use_bounding_box':False, # (bool) - Use bounding box for cropped images instead of object area\n",
|
25
|
+
" 'png_size':[[224,224]], # (list of lists) - size of single object pngs\n",
|
26
|
+
" 'normalize':False, # (bool or list) - normalize PNGs to percentiles\n",
|
27
|
+
" 'png_dims':[0,1,2], # (list) - Dimensions to include in PNG images\n",
|
28
|
+
" 'normalize_by':'png', # (string) - If normalize, normalize to fov (field of view) or png \n",
|
29
|
+
" 'save_measurements':True, # (bool) - Save measurements\n",
|
30
|
+
" 'plot':False, # (bool) - plot images during analazys\n",
|
31
|
+
" 'plot_filtration':False, # () - Plot filtration steps\n",
|
32
|
+
" 'uninfected':False, # () - Include uninfected\n",
|
33
|
+
" 'test_mode':False, # (bool) - Activate Test mode\n",
|
34
|
+
" 'test_nr':10} # (integer) - Number of images to analyze in test mode\n",
|
35
|
+
"\n",
|
36
|
+
"measure_crop(settings)"
|
37
|
+
]
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"metadata": {
|
41
|
+
"kernelspec": {
|
42
|
+
"display_name": "spacr",
|
43
|
+
"language": "python",
|
44
|
+
"name": "spacr"
|
45
|
+
},
|
46
|
+
"language_info": {
|
47
|
+
"codemirror_mode": {
|
48
|
+
"name": "ipython",
|
49
|
+
"version": 3
|
50
|
+
},
|
51
|
+
"file_extension": ".py",
|
52
|
+
"mimetype": "text/x-python",
|
53
|
+
"name": "python",
|
54
|
+
"nbconvert_exporter": "python",
|
55
|
+
"pygments_lexer": "ipython3",
|
56
|
+
"version": "3.9.19"
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"nbformat": 4,
|
60
|
+
"nbformat_minor": 5
|
61
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "9e030e83",
|
7
|
+
"metadata": {
|
8
|
+
"scrolled": true
|
9
|
+
},
|
10
|
+
"outputs": [],
|
11
|
+
"source": [
|
12
|
+
"# Description: Train a ML model to classigy cells based on measurement data\n",
|
13
|
+
"from spacr.ml import generate_ml_scores\n",
|
14
|
+
"%matplotlib inline\n",
|
15
|
+
"\n",
|
16
|
+
"settings = {'src':'path', # (path) path to source folder (where origional images were stored)\n",
|
17
|
+
" 'model_type_ml':'xgboost', # (string) - Type of model ( 'random_forest', 'xgboost', 'gradient_boosting')\n",
|
18
|
+
" 'heatmap_feature':'predictions', # (string) - column to display in heatmaps\n",
|
19
|
+
" 'grouping':'mean', # (string) - Grouping for heatmap\n",
|
20
|
+
" 'min_max':'allq', # (string) - Quantiles to normalize heatmap to (all, allq)\n",
|
21
|
+
" 'cmap':'viridis', # (string) - Heatmap cmap\n",
|
22
|
+
" 'n_estimators':100, # (integer) - Number of estimators for model\n",
|
23
|
+
" 'test_size':0.2, # (float) - Fraction of images used for the test set\n",
|
24
|
+
" 'location_column':'column_name', # (string) - Column containing negative/ positive controll metadata information.\n",
|
25
|
+
" 'positive_control':'c2', # (string) - Value for positive control in location column\n",
|
26
|
+
" 'negative_control':'c1', # (string) - Value for negative control in location column\n",
|
27
|
+
" 'exclude':None, # (string, NoneType) - Rows to exclude in location_column\n",
|
28
|
+
" 'nuclei_limit':1, # (integer) - Maximum number of nuclei for each cell\n",
|
29
|
+
" 'pathogen_limit':3, # (integer) - Maximum number of pathogens per cell\n",
|
30
|
+
" 'n_repeats':10, # (integer) - Number of repeats for permutation importance.\n",
|
31
|
+
" 'top_features':30, # (integer) - Number of top features to plot based on permutation importance, feature importance and shap.\n",
|
32
|
+
" 'channel_of_interest':1, # (integer) - \n",
|
33
|
+
" 'minimum_cell_count':25, # (integer) - Minimum number of cells per well\n",
|
34
|
+
" 'remove_low_variance_features':True, # (bool) - Remove columns with low variance.\n",
|
35
|
+
" 'remove_highly_correlated_features':True, # (bool) - Remove highly correlated features.\n",
|
36
|
+
" 'verbose':False, # (bool) - Display verbose output\n",
|
37
|
+
" 'n_jobs':10} # (integer) - Number of threads\n",
|
38
|
+
"\n",
|
39
|
+
"results = generate_ml_scores(settings)"
|
40
|
+
]
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"cell_type": "code",
|
44
|
+
"execution_count": null,
|
45
|
+
"id": "e316cb19",
|
46
|
+
"metadata": {
|
47
|
+
"scrolled": false
|
48
|
+
},
|
49
|
+
"outputs": [],
|
50
|
+
"source": [
|
51
|
+
"# Description: Fit a regression model to estimate the effect size of gRNAs on cell scores.\n",
|
52
|
+
"from spacr.ml import perform_regression\n",
|
53
|
+
"import pandas as pd\n",
|
54
|
+
"%matplotlib inline\n",
|
55
|
+
"\n",
|
56
|
+
"settings = {'count_data':'path', # (path) path or list of paths to sequencing count data\n",
|
57
|
+
" 'score_data':'path', # (path) path or list of paths to score data\n",
|
58
|
+
" 'score_column':'column', # () - column with cell scores\n",
|
59
|
+
" 'metadata_files':['path.csv','path.csv'], # (list) pahts to gene metadata \n",
|
60
|
+
" 'positive_control':'gene', # (string) - gene to highlight in volcano plot\n",
|
61
|
+
" 'negative_control':'gene', # (string) - gene to highlight in volcano plot\n",
|
62
|
+
" 'min_n':3, # () - \n",
|
63
|
+
" 'fraction_threshold':None, # (Optional, float or NoneType) - Minimum threshold for gene fraction, if None automatically calculated\n",
|
64
|
+
" 'target_unique_count':5, # () - Number of expected unique gRNAs per well\n",
|
65
|
+
" 'tolerance':0.02, # (float) - Tollerance for cells per well limit\n",
|
66
|
+
" 'log_x':False, # () - gRNA Fraction plot X axis log\n",
|
67
|
+
" 'log_y':False, # () - gRNA Fraction plot Y axis log\n",
|
68
|
+
" 'x_lim':None, # () - Volcano X axis limit\n",
|
69
|
+
" 'control_wells':['c1','c2','c3'], # (list) - Metadata to exclude from regression model\n",
|
70
|
+
" 'filter_column':'column', # (str) - Column containing control metadata to remove\n",
|
71
|
+
" 'dependent_variable': 'column', # (string) - Dependent variable for regression\n",
|
72
|
+
" 'threshold_method':'var', # (string) - effect size thresold type (std or var)\n",
|
73
|
+
" 'threshold_multiplier':4, # (integer) - effect size threshold multiplyer \n",
|
74
|
+
" 'transform':'log', # (string) - Transform dependent variable\n",
|
75
|
+
" 'agg_type':'mean', # (string) - aggregation for dependent variable\n",
|
76
|
+
" 'min_cell_count':None, # (integer) - Minimum number of cells per well\n",
|
77
|
+
" 'regression_type':'ols', # (string) - Type of regression (ols, glm, mixed, ridge, lasso).\n",
|
78
|
+
" 'random_row_column_effects':False, # (bool) - Remove plate , row and column random effects.\n",
|
79
|
+
" 'y_lims':[[0,9], [12, 16]], # (list of lists) limits for broken y axis\n",
|
80
|
+
" 'plate':None, # (string or NoneType) - strinf to replace plate column values with\n",
|
81
|
+
" 'cov_type':None, # (string) - covariance type for ols regression\n",
|
82
|
+
" 'volcano':'gene', # (string) - mode for significant resuls (gene, grna, all)\n",
|
83
|
+
" 'alpha':0.8} # (float) - alpha for hinge and lasso regression\n",
|
84
|
+
"\n",
|
85
|
+
"coef_df = perform_regression(settings)"
|
86
|
+
]
|
87
|
+
}
|
88
|
+
],
|
89
|
+
"metadata": {
|
90
|
+
"kernelspec": {
|
91
|
+
"display_name": "spacr",
|
92
|
+
"language": "python",
|
93
|
+
"name": "spacr"
|
94
|
+
},
|
95
|
+
"language_info": {
|
96
|
+
"codemirror_mode": {
|
97
|
+
"name": "ipython",
|
98
|
+
"version": 3
|
99
|
+
},
|
100
|
+
"file_extension": ".py",
|
101
|
+
"mimetype": "text/x-python",
|
102
|
+
"name": "python",
|
103
|
+
"nbconvert_exporter": "python",
|
104
|
+
"pygments_lexer": "ipython3",
|
105
|
+
"version": "3.9.19"
|
106
|
+
}
|
107
|
+
},
|
108
|
+
"nbformat": 4,
|
109
|
+
"nbformat_minor": 5
|
110
|
+
}
|
@@ -0,0 +1,186 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "335dcd14",
|
7
|
+
"metadata": {
|
8
|
+
"scrolled": true
|
9
|
+
},
|
10
|
+
"outputs": [],
|
11
|
+
"source": [
|
12
|
+
"# Description: use this cell to generate train and test folders: datasets/train/nc and pc and datasets/test/nc and pc\n",
|
13
|
+
"from spacr.io import generate_training_dataset\n",
|
14
|
+
"\n",
|
15
|
+
"settings = {'src':'path', # (path) path to source folder (where origional images were stored)\n",
|
16
|
+
" 'dataset_mode':'annotation', # (string) annotation, measurement, metadata\n",
|
17
|
+
" 'tables':['cell'],# (list of strings) The tabels present in the database, excluding png_list\n",
|
18
|
+
" 'test_split':0.1, # (float) Fraction of images used for the test set\n",
|
19
|
+
" 'annotation_column':'test', # (Optional, string) If using mode annotation, The annotation column in the database\n",
|
20
|
+
" 'annotated_classes':[1], # (Optional, list of integers) If using mode annotation, The interger in annotation_column, if len(annotated_classes) is 1, class 2 will be generated from a random selection of images.\n",
|
21
|
+
" 'metadata_type_by':'column_name', # (Optional, strin) If using mode medatada, If using mode medatada,the column class_metadata elements are in\n",
|
22
|
+
" 'class_metadata':[['c15'],['c19']], # (Optional, list of lists of strings) If using mode medatada, the elements that deffine each class \n",
|
23
|
+
" 'png_type':'cell_png', # (Optional, string) string in the path of each image (used to filter images)\n",
|
24
|
+
" 'nuclei_limit':False, # (Optional, bool) if cell and nucleus in tables, filter for number of nuclei per cell\n",
|
25
|
+
" 'pathogen_limit':0, # (Optional, integer) if cell and pathogen in tables, filter for number of pathogen per cell\n",
|
26
|
+
" 'uninfected':True, # (Optional, bool) if cell and pathogen in tables, bool for uninfected cells (cells)\n",
|
27
|
+
" 'size':None # (Optional, integer or NoneType) limit for number of images to include in total (test + train) per class\n",
|
28
|
+
" }\n",
|
29
|
+
"\n",
|
30
|
+
"generate_training_dataset(settings)"
|
31
|
+
]
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"cell_type": "code",
|
35
|
+
"execution_count": null,
|
36
|
+
"id": "b4431164",
|
37
|
+
"metadata": {},
|
38
|
+
"outputs": [],
|
39
|
+
"source": [
|
40
|
+
"# Description: train a torch model\n",
|
41
|
+
"from spacr.deep_spacr import train_test_model\n",
|
42
|
+
"\n",
|
43
|
+
"settings = {'src':'path', # (path) path to source folder (ends with datasets/training)\n",
|
44
|
+
" 'train':True, # (bool) - Train\n",
|
45
|
+
" 'test': False, # (bool) - Test\n",
|
46
|
+
" 'custom_model':False, # (path) - path to a custom model\n",
|
47
|
+
" 'classes':['nc','pc'], # (list) - list of classes (folder names in dataset/training/train or test)\n",
|
48
|
+
" 'model_type':'maxvit_t', # (string) - Name of torch model architecture\n",
|
49
|
+
" 'optimizer_type':'adamw', # (string) - type of optimizer\n",
|
50
|
+
" 'schedule':'reduce_lr_on_plateau', # (string) - type of scheduler (reduce_lr_on_plateau or step_lr)\n",
|
51
|
+
" 'loss_type':'focal_loss', # (string) - Loss function (binary_cross_entropy_with_logits or focal_loss)\n",
|
52
|
+
" 'normalize':True, # (bool) - Apply ImageNet normalization to images before training.\n",
|
53
|
+
" 'image_size':224, # (int) - Size of images, height and width.\n",
|
54
|
+
" 'batch_size':64, # (int) - Nr. of images per batch\n",
|
55
|
+
" 'epochs':10, # (int) - Nr. of epochs for training\n",
|
56
|
+
" 'val_split':0.1, # (float) - Fraction of images in validation dataset\n",
|
57
|
+
" 'learning_rate':0.0001, # (float) - Learning rate per epoch\n",
|
58
|
+
" 'weight_decay':0.00001, # (float) - Fraction of random weights decay (regularization)\n",
|
59
|
+
" 'dropout_rate':0.1, # (float) - Fraction of weights to omit per epoch (regularization)\n",
|
60
|
+
" 'init_weights':True, # (bool) - Initiate model with ImageNet weights\n",
|
61
|
+
" 'amsgrad':True, # (bool) - guard against exploding gradients\n",
|
62
|
+
" 'use_checkpoint':True, # (bool) - checkpoint gradient calculations to save VRAM at the expence of computation\n",
|
63
|
+
" 'gradient_accumulation':True, # (bool) - Accumulate gradients to mimic larger batches\n",
|
64
|
+
" 'gradient_accumulation_steps':4, # (int) - Epochs to accumulate gradients\n",
|
65
|
+
" 'intermedeate_save':True, # Save intermediate states of the model\n",
|
66
|
+
" 'pin_memory':True, # (bool) - Whether to pin memory for the data loader\n",
|
67
|
+
" 'n_jobs':30, # (int) - Number of threads to use\n",
|
68
|
+
" 'train_channels':['r','g','b'], # (list of 'r', 'g', and/or 'b') - PNG channels to use for training\n",
|
69
|
+
" 'augment':False, # (bool) - Augment the dataset, vertical, horizontal flip and rotate each image to artificially expand the dataset 8 fold.\n",
|
70
|
+
" 'verbose':True}\n",
|
71
|
+
"\n",
|
72
|
+
"train_test_model(settings)"
|
73
|
+
]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"cell_type": "code",
|
77
|
+
"execution_count": null,
|
78
|
+
"id": "5770fb79",
|
79
|
+
"metadata": {
|
80
|
+
"scrolled": true
|
81
|
+
},
|
82
|
+
"outputs": [],
|
83
|
+
"source": [
|
84
|
+
"# Description: generate a tar dataset\n",
|
85
|
+
"\n",
|
86
|
+
"from spacr.io import generate_dataset\n",
|
87
|
+
"\n",
|
88
|
+
"settings = {'src':'path', # (path) path to source folder (where origional images were stored)\n",
|
89
|
+
" 'file_metadata':'cell_png', # (Optional, string) string in the path of each image (used to filter images)\n",
|
90
|
+
" 'experiment':'test', # (string) - Name of dataset\n",
|
91
|
+
" 'sample':10000} # (Optional, integer or NoneType) limit for number of images to include in the dataset\n",
|
92
|
+
"\n",
|
93
|
+
"generate_dataset(settings)"
|
94
|
+
]
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"cell_type": "code",
|
98
|
+
"execution_count": null,
|
99
|
+
"id": "086fcefb",
|
100
|
+
"metadata": {},
|
101
|
+
"outputs": [],
|
102
|
+
"source": [
|
103
|
+
"# Description: apply a model to a tar dataset\n",
|
104
|
+
"\n",
|
105
|
+
"from spacr.deep_spacr import apply_model_to_tar\n",
|
106
|
+
"\n",
|
107
|
+
"settings = {'dataset':'path.tar', # (path) - path to tar dataset (ends with .tar) \n",
|
108
|
+
" 'model_path':'path.pth', # (path) - path to model (ends with .pth) \n",
|
109
|
+
" 'file_type':'cell_png', # (Optional, string) string in the path of each image (used to filter images)\n",
|
110
|
+
" 'image_size':224, # (int) - Size of images, height and width\n",
|
111
|
+
" 'batch_size':64, # (int) - Nr. of images per batch\n",
|
112
|
+
" 'normalize':True, # (bool) - Apply ImageNet normalization to images before training.\n",
|
113
|
+
" 'score_threshold':0.5, # (float) - Score to byass the classes\n",
|
114
|
+
" 'n_jobs':30, # (int) - Number of threads to use\n",
|
115
|
+
" 'verbose':True}\n",
|
116
|
+
"\n",
|
117
|
+
"result_df = apply_model_to_tar(settings)"
|
118
|
+
]
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"cell_type": "code",
|
122
|
+
"execution_count": null,
|
123
|
+
"id": "9916c814",
|
124
|
+
"metadata": {},
|
125
|
+
"outputs": [],
|
126
|
+
"source": [
|
127
|
+
"# Description: Fit a regression model to estimate the effect size of gRNAs on cell scores.\n",
|
128
|
+
"from spacr.ml import perform_regression\n",
|
129
|
+
"import pandas as pd\n",
|
130
|
+
"%matplotlib inline\n",
|
131
|
+
"\n",
|
132
|
+
"settings = {'count_data':'path', # (path) path or list of paths to sequencing count data\n",
|
133
|
+
" 'score_data':'path', # (path) path or list of paths to score data\n",
|
134
|
+
" 'score_column':'column', # () - column with cell scores\n",
|
135
|
+
" 'metadata_files':['path.csv','path.csv'], # (list) pahts to gene metadata \n",
|
136
|
+
" 'positive_control':'gene', # (string) - gene to highlight in volcano plot\n",
|
137
|
+
" 'negative_control':'gene', # (string) - gene to highlight in volcano plot\n",
|
138
|
+
" 'min_n':3, # () - \n",
|
139
|
+
" 'fraction_threshold':None, # (Optional, float or NoneType) - Minimum threshold for gene fraction, if None automatically calculated\n",
|
140
|
+
" 'target_unique_count':5, # () - Number of expected unique gRNAs per well\n",
|
141
|
+
" 'tolerance':0.02, # (float) - Tollerance for cells per well limit\n",
|
142
|
+
" 'log_x':False, # () - gRNA Fraction plot X axis log\n",
|
143
|
+
" 'log_y':False, # () - gRNA Fraction plot Y axis log\n",
|
144
|
+
" 'x_lim':None, # () - Volcano X axis limit\n",
|
145
|
+
" 'control_wells':['c1','c2','c3'], # (list) - Metadata to exclude from regression model\n",
|
146
|
+
" 'filter_column':'column', # (str) - Column containing control metadata to remove\n",
|
147
|
+
" 'dependent_variable': 'column', # (string) - Dependent variable for regression\n",
|
148
|
+
" 'threshold_method':'var', # (string) - effect size thresold type (std or var)\n",
|
149
|
+
" 'threshold_multiplier':4, # (integer) - effect size threshold multiplyer \n",
|
150
|
+
" 'transform':'log', # (string) - Transform dependent variable\n",
|
151
|
+
" 'agg_type':'mean', # (string) - aggregation for dependent variable\n",
|
152
|
+
" 'min_cell_count':None, # (integer) - Minimum number of cells per well\n",
|
153
|
+
" 'regression_type':'ols', # (string) - Type of regression (ols, glm, mixed, ridge, lasso).\n",
|
154
|
+
" 'random_row_column_effects':False, # (bool) - Remove plate , row and column random effects.\n",
|
155
|
+
" 'y_lims':[[0,9], [12, 16]], # (list of lists) limits for broken y axis\n",
|
156
|
+
" 'plate':None, # (string or NoneType) - strinf to replace plate column values with\n",
|
157
|
+
" 'cov_type':None, # (string) - covariance type for ols regression\n",
|
158
|
+
" 'volcano':'gene', # (string) - mode for significant resuls (gene, grna, all)\n",
|
159
|
+
" 'alpha':0.8} # (float) - alpha for hinge and lasso regression\n",
|
160
|
+
"\n",
|
161
|
+
"coef_df = perform_regression(settings)"
|
162
|
+
]
|
163
|
+
}
|
164
|
+
],
|
165
|
+
"metadata": {
|
166
|
+
"kernelspec": {
|
167
|
+
"display_name": "spacr",
|
168
|
+
"language": "python",
|
169
|
+
"name": "spacr"
|
170
|
+
},
|
171
|
+
"language_info": {
|
172
|
+
"codemirror_mode": {
|
173
|
+
"name": "ipython",
|
174
|
+
"version": 3
|
175
|
+
},
|
176
|
+
"file_extension": ".py",
|
177
|
+
"mimetype": "text/x-python",
|
178
|
+
"name": "python",
|
179
|
+
"nbconvert_exporter": "python",
|
180
|
+
"pygments_lexer": "ipython3",
|
181
|
+
"version": "3.9.19"
|
182
|
+
}
|
183
|
+
},
|
184
|
+
"nbformat": 4,
|
185
|
+
"nbformat_minor": 5
|
186
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "d6a39408",
|
7
|
+
"metadata": {},
|
8
|
+
"outputs": [],
|
9
|
+
"source": [
|
10
|
+
"from spacr.gui_utils import annotate\n",
|
11
|
+
"\n",
|
12
|
+
"settings = {'src':'/nas_mnt/carruthers/Einar/tsg101_screen/TSG101SCREEN_20240826_140251/plate4', # (path) path to source folder (where origional images were stored)\n",
|
13
|
+
" 'image_type':'cell_png', # (Optional, string) string in the path of each image (used to filter images)\n",
|
14
|
+
" 'channels':['r', 'g', 'b'], # (list) - Channels to visualize ('r', 'g', and/or 'b')\n",
|
15
|
+
" 'img_size':200, # (integer) - Size of images on the screen (height and weight)\n",
|
16
|
+
" 'normalize_channels':['r','g','b'], # (list) - Channels to normalize\n",
|
17
|
+
" 'annotation_column':'test', # (string) - Column in the database containing/to contain annotations\n",
|
18
|
+
" 'normalize':False, # (bool) - Normalize images to percentiles\n",
|
19
|
+
" 'percentiles':(2,98), # (tuple) - Percentiles used for normalization\n",
|
20
|
+
" 'measurement':None, # (string or NoneType) - Measurement used to filter images\n",
|
21
|
+
" 'threshold':None} # (Integer or NoneType) - Threshold for measurement\n",
|
22
|
+
"\n",
|
23
|
+
"annotate(settings)"
|
24
|
+
]
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"metadata": {
|
28
|
+
"kernelspec": {
|
29
|
+
"display_name": "spacr",
|
30
|
+
"language": "python",
|
31
|
+
"name": "spacr"
|
32
|
+
},
|
33
|
+
"language_info": {
|
34
|
+
"codemirror_mode": {
|
35
|
+
"name": "ipython",
|
36
|
+
"version": 3
|
37
|
+
},
|
38
|
+
"file_extension": ".py",
|
39
|
+
"mimetype": "text/x-python",
|
40
|
+
"name": "python",
|
41
|
+
"nbconvert_exporter": "python",
|
42
|
+
"pygments_lexer": "ipython3",
|
43
|
+
"version": "3.9.19"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"nbformat": 4,
|
47
|
+
"nbformat_minor": 5
|
48
|
+
}
|