Welcome to spaCR

spaCR Logo

spaCRSpatial phenotype analysis of CRISPR screens.

A Python toolkit for quantifying and visualising phenotypic changes in high-throughput microscopy screens. Ships with a modern PySide6 GUI (spacr), a headless pipeline (spacr.core), and a plate-to-classification workflow that runs on top of PyTorch, Cellpose, scikit-image, and scipy.

🚀 Get started

Install spaCR from PyPI and launch the Qt GUI in two commands.

https://github.com/EinarOlafsson/spacr#quickstart
🎓 Interactive tutorials

The lesson library — 40 narrated, step-by-step lessons covering the whole pipeline.

tutorials/
📖 API reference

Every public function, method, and class — grouped by module.

API Reference
🎬 Video tutorials

Narrated walkthroughs of each pipeline module.

https://github.com/EinarOlafsson/spacr#narrated-video-tutorials
🐛 Report an issue

File a bug, request a feature, or ask a question.

https://github.com/EinarOlafsson/spacr/issues/new

Pipeline overview

spaCR workflow

The GUI ships 62 apps, grouped into seven categories — Core, Data, Segmentation models, Results & QC, Explore, Toxoplasma, and Design. The nine Core apps form the main pipeline; these five are the path most screens take, each with its own API reference module:

Mask

Cellpose segmentation of cells, nuclei, pathogens. spacr.core.preprocess_generate_masks()

Measure

Per-object feature extraction into a SQLite DB. spacr.measure.measure_crop()

Annotate

Grid-based manual labelling of single-cell crops. spacr.app_annotate

Classify

CNN / XGBoost training from annotations. spacr.deep_spacr, spacr.ml

Map Barcodes

Map FASTQ reads to row/column/gRNA barcodes. spacr.sequencing

Key modules by category

Core pipelines

spacr.core · spacr.io · spacr.measure · spacr.object · spacr.utils

Machine learning + classification

spacr.ml · spacr.deep_spacr · spacr.predictions · spacr.spacr_cellpose

Analysis

spacr.plot · spacr.sp_stats · spacr.submodules · spacr.toxo · spacr.timelapse · spacr.sim

Sequencing

spacr.sequencing

Modern Qt GUI

spacr.qt — launched via the spacr or spacr-qt CLI.

Classic Tk GUI

spacr.gui · spacr.gui_core · spacr.gui_utils

Installation

The GUI lives behind the qt extra, so the desktop install must ask for it — plain pip install spacr gives you the pipelines but no PySide6, and spacr will tell you so rather than launch.

python -m pip install "spacr[qt]"
spacr                    # launch the Qt GUI

Headless (cluster, server, CI) — no Qt, no display:

python -m pip install spacr
spacr-run --list         # list the headless pipeline modules

Learn spaCR

The interactive tutorial library walks through every module with narrated, step-by-step lessons. It is also reachable from the GUI: Help → Tutorial (web), or the spaCR logo on the classic Tk start screen.

Contents