Skip to main content

Spatial phenotype analysis of crisp screens (SpaCr)

Project description

Badges

Docs PyPI version Python version Licence: MIT repo size Tutorial

SpaCr

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

Features

  • Generate Masks: Generate cellpose masks of cell, nuclei, and pathogen objects.

  • 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.

  • Crop Images: Save objects (cells, nuclei, pathogen, cytoplasm) as images. Object image paths are saved in a SQL database.

  • Train CNNs or Transformers: Train Torch models to classify single object images.

  • 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.

  • Sequencing: Map FASTQ reads to barcode and gRNA barcode metadata.

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

SpaCr workflow

Overview and data organization of spaCR.

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. b. Downstream submodules available for extended analyses at each stage. c. Output folder structure for each module, including locations for raw and processed images, masks, object-level measurements, datasets, and results. d. List of all spaCR package modules.

Installation

Linux recommended. If using Windows, switch to Linux—it’s free, open-source, and better.

macOS prerequisites (before install):

brew install libomp hdf5 cmake openssl

Linux GUI requirement: SpaCr GUI requires Tkinter.

sudo apt-get install python3-tk

Installation:

pip install spacr

Run SpaCr GUI:

spacr

Example Notebooks

The following example Jupyter notebooks illustrate common workflows using spaCR.

Interactive Tutorial (under construction)

Click below to explore the step-by-step GUI and Notebook tutorials for spaCR:

Tutorial

spaCRPower

Power analasys of pooled perterbation spaCR screens.

spaCRPower

Data Availability

License

spaCR is distributed under the terms of the MIT License. See the LICENSE file for details.

How to Cite

If you use spaCR in your research, please cite: Olafsson EB, et al. SpaCr: Spatial phenotype analysis of CRISPR-Cas9 screens. Manuscript in preparation.

Papers Using spaCR

Below are selected publications that have used or cited spaCR:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spacr_nightly-1.2.3.tar.gz (51.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacr_nightly-1.2.3-py3-none-any.whl (5.3 MB view details)

Uploaded Python 3

File details

Details for the file spacr_nightly-1.2.3.tar.gz.

File metadata

  • Download URL: spacr_nightly-1.2.3.tar.gz
  • Upload date:
  • Size: 51.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for spacr_nightly-1.2.3.tar.gz
Algorithm Hash digest
SHA256 6bb593f308902e5f6b8784cc9224effdc3f49e3cb68b944507ed5397520ab888
MD5 c6f97bf0054f2a4d16f89f72edaeb67c
BLAKE2b-256 e49495185367a765649ff87522ff6efd799cede58c442fd7032d77212d012169

See more details on using hashes here.

File details

Details for the file spacr_nightly-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: spacr_nightly-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for spacr_nightly-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 02b4cbf802760d3dee3e721943d26c7d7d13678b50867ab06b9e13e8da624c9f
MD5 15ba356c7bc489c2d447d933a88026de
BLAKE2b-256 332c9d33d05f58d16accfa81fa2c4a1e0e76e913bef523b35d4429aaa16555ee

See more details on using hashes here.

Supported by

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