Skip to main content

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: Track objects in timelapse image data.

  • Simulations: Simulate spatial phenotype screens.

  • Misc: Analyze Ca oscillation, recruitment, infection rate, plaque size/count.

## 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

spacr-0.0.20.tar.gz (167.7 kB view details)

Uploaded Source

Built Distribution

spacr-0.0.20-py3-none-any.whl (172.7 kB view details)

Uploaded Python 3

File details

Details for the file spacr-0.0.20.tar.gz.

File metadata

  • Download URL: spacr-0.0.20.tar.gz
  • Upload date:
  • Size: 167.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for spacr-0.0.20.tar.gz
Algorithm Hash digest
SHA256 af9afb3abed069966bfff1e6dcf0e81f0fd2410beaac18d0e24e10abcccbde0e
MD5 540119da52c059388005a2992901848b
BLAKE2b-256 41141c7a1ac98ea1275fafaf0f1ab3a7d51f20d696da43c0e2bc8e227db75f2d

See more details on using hashes here.

File details

Details for the file spacr-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: spacr-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 172.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for spacr-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 217b8e71db38ef43bec86a20da0d9069c5a2b121ddb6cb3f3969c88e6e905a0f
MD5 b124a8933a8aa055b3c5c2b9f4d2bafe
BLAKE2b-256 0e23dadd42088825ae5754d746ae6da4c02c2ed2e59f9c1c5975a28ea12e0f37

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page