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 CRISPR-Cas9 screens (SpaCr). 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 understand 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.

</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.21.tar.gz (199.0 kB view details)

Uploaded Source

Built Distribution

spacr-0.0.21-py3-none-any.whl (204.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spacr-0.0.21.tar.gz
  • Upload date:
  • Size: 199.0 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.21.tar.gz
Algorithm Hash digest
SHA256 c160bd4234a5b0308306d82b32cd79fb800c69fd68dc3fd54e5a0626ff612569
MD5 d529c4364393f6067faeb85796291837
BLAKE2b-256 b040f4b58f4787ca2d0154151b3643fb6a2be9aea2fa41fd77301a74542e2be9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spacr-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 204.8 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.21-py3-none-any.whl
Algorithm Hash digest
SHA256 e515659a57017d75bf1032d2befaa058dfb7d328a05b630ae129e63543349f14
MD5 87b3b6552ddc6d1d243c05568ebab622
BLAKE2b-256 45d32277a3a6b5b5a901b70e3614a49fa0225e898b7440aaa45fb0eae2a37b2d

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