Spatial phenotype analysis of crisp screens (SpaCr)
Project description
[![PyPI version](https://badge.fury.io/py/spacr.svg)](https://badge.fury.io/py/spacr) [![Python version](https://img.shields.io/pypi/pyversions/spacr)](https://pypistats.org/packages/spacr) [![Licence: GPL v3](https://img.shields.io/github/license/EinarOlafsson/spacr)](https://github.com/EinarOlafsson/spacr/blob/master/LICENSE) [![repo size](https://img.shields.io/github/repo-size/EinarOlafsson/spacr)](https://github.com/EinarOlafsson/spacr/)
# SpaCr <table> <tr> <td>
Spatial phenotype analysis of crisp screens (SpaCr). A collection of functions for generating cellpose masks -> single object images and measurements -> annotation and classification of single object images. Spacr uses batch normalization to facilitate accurate segmentation of objects with low foreground representation.
</td> <td>
<img src=”spacr/logo_spacr.png” alt=”SPACR Logo” title=”SPACR Logo” width=”600”/>
</td> </tr> </table>
## Features
Generate Masks: Generate cellpose masks for cells, nuclei and pathogen images.
Object Measurements: Measurements for each object including scikit-image-regionprops, intensity quantiles, shannon-entropy, pearsons and manders correlation, homogenicity and radial distribution. Measurements are saved to a sql database in object level tables.
Crop Images: Objects (e.g. cells) can be saved as PNGs from the object area or bounding box area of each object. Object paths are saved in an sql database that can be annotated and used to train CNNs/Transformer models for classefication tasks.
Train CNNs or Transformers: Train Torch Convolutional Neural Networks (CNNs) or Transformers to classify single object images. Train Torch models with IRM/ERM, checkpointing,
Manual Annotation: Supports manual annotation of single cell images and segmentation to refine training datasets for training CNNs/Transformers or cellpose, respectively.
Finetune Cellpose Models: Adjust pre-existing Cellpose models to your specific dataset for improved performance.
Timelapse Data Support: Includes support for analyzing timelapse data.
Simulations: Simulate spatial phenotype screens.
## Installation
spacr requires Tkinter for its graphical user interface features.
### Ubuntu
Before installing spacr, ensure Tkinter is installed:
(Tkinter is included with the standard Python installation on macOS, and Windows)
On Linux:
` sudo apt-get install python3-tk `
install spacr with pip
` pip install spacr `
To run spacr GUIs after installing spacr:
To generate masks: ` gui_mask ` To generate measurements and cropped images: ` gui_measure ` To curate masks for finetuning cellpose models: ` gui_make_masks ` To annotate paths to images in sql database created in gui_measure: ` gui_annotate ` Train torch CNNs/Transformers to classify single object images. ` gui_classify ` Simulate spatial phenotype screens. ` gui_sim `
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file spacr-0.0.14.tar.gz
.
File metadata
- Download URL: spacr-0.0.14.tar.gz
- Upload date:
- Size: 157.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc811cb9563e7afe86face6809bb4290c1198571de03edfc8b11e900e60d3d5c |
|
MD5 | 72338dc2bb7895392d49ad05b8a2b9b7 |
|
BLAKE2b-256 | 06bcfba23a3db5100f38986823b0e28b35ccc8337da34cca87975f24b3d6ddcf |
File details
Details for the file spacr-0.0.14-py3-none-any.whl
.
File metadata
- Download URL: spacr-0.0.14-py3-none-any.whl
- Upload date:
- Size: 170.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d5ff314e503f4b3da554148494716093f2c8cdf8c9da842a85344986892699f |
|
MD5 | 3ecce6b336240ca8f0bea9a878bb745d |
|
BLAKE2b-256 | c38b2116e4243433354ad1096e4a9dee95f17c8a25aabe890b1dc37be8ff44d3 |