Welcome to SpaCr
spaCR (Spatial Phenotype Analysis of CRISPR Screens) is a Python toolkit for analyzing pooled CRISPR-Cas9 imaging screens. It integrates high-content imaging data with sequencing-based mutant identification to enable genotype-to-phenotype mapping at the single-cell level.
spaCR supports:
Segmentation of microscopy images using models like Cellpose.
Single-cell feature extraction and image cropping.
Classification of phenotypes using classical and deep learning models.
Barcode decoding from sequencing reads and well-level mutant quantification.
Statistical analysis, including regression models to link genotypes to phenotypes.
Interactive visualization of results including Grad-CAMs and phenotype maps.
GUI tools for mask curation, annotation, and exploratory analysis.
Example Notebooks
The following example Jupyter notebooks illustrate common workflows using spaCR.
Generate masks Generate cell, nuclei, and pathogen segmentation masks from microscopy images using Cellpose.
Capture single cell images and measurements Extract object-level measurements and crop single-cell images for downstream analysis.
Machine learning based object classification Train traditional machine learning models (e.g., XGBoost) to classify cell phenotypes based on extracted features.
Computer vision based object classification Train and evaluate deep learning models (PyTorch CNNs/Transformers) on cropped object images.
Map sequencing barcodes Map sequencing reads to row, column, and gRNA barcodes for CRISPR screen genotype-phenotype mapping.
Finetune cellpose models Finetune Cellpose models using your own annotated training data for improved segmentation accuracy.
API Reference by Category
Core Modules
Image Analysis
Classification
GUI Components
Sequencing & Submodules
GitHub Repository
Visit the source code on GitHub: https://github.com/EinarOlafsson/spacr