Python package and desktop application · BSD-3-Clause

spaCR

Spatial phenotype analysis of CRISPR-Cas9 screens.

spaCR segments cells, nuclei and pathogens in microscopy images, measures every object, and links the measurements to the guide RNAs sequenced from the same wells. It starts from plate images and FASTQ reads and ends with per-cell measurements, trained classifiers and a ranked list of genes.

  • Version 1.5.1.7
  • Released 2026-11-05
  • Python 3.9–3.15
The spaCR logo in full colour: a cell with a yellow-green outline, a blue nucleus and red parasites, built as a photomosaic of microscopy tiles on black
One field of HeLa cells infected with Toxoplasma in five panels: the image, thin cell, nucleus and vacuole outlines, a table of measured values, cells coloured by an infection score, and a volcano plot with GRA14 labelled
One whole field of HeLa cells infected with Toxoplasma (MTOC screen plate 2, well P08, field 16; public data, CC BY 4.0) through spaCR: image, outlines, Measure values and an infection score. The hit list comes from a different public screen, the four-plate GFP-TSG101 example screen. See Pipeline.

What spaCR does

Seven modules, run in order. Each one reads the previous module's output and writes its own into the same project folder. Segmentation, measurement, annotation and classification also run without sequencing data.

  1. ImportConverts microscope files into one folder layout per plate.Produces: Image folders and a project
  2. MaskSegments cells, nuclei, parasites and organelles with Cellpose models.Produces: Label masks for every field
  3. MeasureMeasures shape, intensity, texture and position of every object.Produces: measurements.db and single-object crops
  4. AnnotateLabels object crops in a keyboard-driven grid.Produces: Labels in the project database
  5. ClassifyTrains image models (ResNet, MaxViT) or measurement models (XGBoost, random forest).Produces: Checkpoints with held-out metrics, per-object scores
  6. Map barcodesDecodes row, column and guide barcodes from FASTQ reads.Produces: Guide counts per well
  7. RegressionEstimates guide and gene effects from scores and guide counts.Produces: Volcano plot and ranked hit list
  8. And moreDose-response, control charts, plaque and recruitment assays, image UMAP, batch correction, power and plate design, and a QC dashboard. See Assays and QC and Phenotypes.

Inputs

  • TIFF, OME-TIFF, ND2, CZI and LIF images, 2-D, volumetric and time series
  • Multi-well plates from any microscope that writes one of these formats
  • FASTQ reads with row, column and guide barcodes
  • Live folder watch for ND2, CZI, LIF and OME-TIFF files as they are written (alpha, off by default)
  • OME-Zarr and OMERO through optional extras

Organisms

  • Toxoplasma gondii in host cells: guide, recruitment, plaque and replication assays
  • Any cell type for segmentation, measurement and classification
  • Pages for other pathogens are in development and hidden by default

Outputs

  • An SQLite database per project: measurements, labels, predictions
  • Masks, crops and images as files on disk
  • Effect estimates, p and q values, diagnostics and run records
  • Figures as PNG, PDF, SVG or TIFF; one zip per figure with its data, statistics and a script that redraws it
  • AnnData export, and a vvvv export (alpha)

Models

22 published Cellpose-SAM and YOLO models with model cards: parasite vacuoles, plaques, plaque-assay wells, and cross-channel models that predict cells, nuclei or parasites from a single stain. Weights download from Hugging Face and are checked against a published checksum. See Models.

Ways to run it

  • Desktop appInstallers for Windows, macOS and Linux, or spacr after pip or conda.
  • Python APIEvery module is a function that takes a settings dictionary.
  • Command linespacr-run runs any pipeline headless on a workstation, server or cluster.
  • NotebooksJupyter notebooks for each step, from masks to regression, in the repository.
  • DockerCPU and CUDA images on GitHub Container Registry. See Docker.

Pipeline

One whole field followed through spaCR: HeLa cells infected with Toxoplasma, plate 2, well P08, field 16 of the MTOC screen, imaged with Hoechst and CellMask. Steps 1 to 4 use this field; step 5 is the hit list of the GFP-TSG101 example screen, because the MTOC screen's hits are not public.

  1. HeLa cells with blue nuclei and grey cytoplasm; Toxoplasma vacuoles appear as warm clusters

    1Image

    13 host cells and 54 vacuoles in this window of a 2000 × 2000 px field; Hoechst blue, CellMask grey.

  2. Thin cyan cell, blue nucleus and magenta vacuole outlines on the same cells

    2Mask

    Cell, nucleus and vacuole outlines: 37 cells, 44 nuclei and 130 vacuoles in the field.

  3. Cells coloured by the fraction of their area covered by vacuoles

    3Measure

    Cells coloured by vacuole coverage (Measure): 9 of 13 above 0, up to 0.161.

  4. Cells coloured by an infection score from blue (low) to orange (high)

    4Classify

    XGBoost infection score from host features only; 8 of 13 cells above 0.5, field not used for training.

  5. Volcano plot of 414 genes with GRA14 labelled at the top

    5Hit

    Four-plate GFP-TSG101 screen: 414 genes, 4 called at q < 0.05; GRA14 is the hit.

Data: Hoechst and CellMask images with published cell, nucleus and vacuole masks from cross-channel-cell-from-hoechst, cross-channel-nuclei-from-cellmask and cross-channel-toxoplasma-from-cellmask (CC BY 4.0). Measure and the XGBoost classifier ran in spaCR on CPU over 52 fields of the same plate. Hit list: OLS regression of spacr-example-screen.

  • MaskSegments cells, nuclei, pathogens and organelles with Cellpose models.
  • MeasureShape, intensity, texture and position of every object, and a crop of each, in SQLite.
  • AnnotateLabels object crops in a grid with keyboard shortcuts.
  • ClassifyTrains image or measurement classifiers and stores held-out performance with each checkpoint.
  • Map barcodesAssigns sequencing reads to wells and guide RNAs.
  • RegressionEstimates guide, gene and condition effects with intervals and a ranked hit list.

Published models

Every model: held-out scores against stock Cellpose-SAM

Each card copies its numbers from the model's Hugging Face card and spaCR's model zoo; nothing here is recomputed. The grey bar is the comparison the card records, usually stock Cellpose-SAM on the same held-out images. Which model is the default is read from spaCR's development branch when this site is built.

Each row pairs a model's score card with an image it segmented. Click or tap a card to turn it over for the held-out test set, every score and a link to the model card; drag the divider on the image to compare the input with the model's outlines. Examples were run on CPU with spaCR's model zoo (nightly, 2026-10-12): Cellpose 4.2.1.1 for the segmentation models, Ultralytics YOLO for the well detector.

Parasite vacuoles v4

Parasite vacuolesdefaultv4
Held-out test set
209 strict hold-out fields (41 with no object)
Baseline
stock cpsam_v2 (same fields)
Base model
cpsam_v2
v4stock
F1 at IoU 0.50.7610.377
Precision0.7690.265
Recall0.7540.656
AJI0.5820.040
Dice0.8350.091
Model card
Greyscale fluorescence image with bright, rounded Toxoplasma vacuoles scattered over faint host cells
ToxoplasmaToxoplasma vacuoles · 125

Plaques v9

Plaquesdefaultv9
Held-out test set
101
Baseline
stock cpsam_v2
Base model
cpsam_v2
v9stock
F1 at IoU 0.50.6560.200
Precision0.7060.200
Recall0.6120.200
AJI0.6920.211
Dice0.9000.392
Model card

Plaque wells v3

Plaque wellsdefaultv3
Held-out test set
73 clean validation images
Baseline
previous version (well detector v1, the YOLO11n incumbent) on the same validation images
Base model
yolo11n
v3v1
Precision0.9700.963
Recall0.9980.988
mAP at IoU 0.50.9940.992
mAP at IoU 0.5 to 0.950.8840.893
Model card
Twelve round crystal-violet stained wells in four rows of three, with condition labels above and strain labels at the side
PlateWells · 12

Live cells v1

Live cellsalternativev1
Held-out test set
2,199 test fields from 14 public datasets
Baseline
stock cpsam_v2
Base model
cpsam_v2
v1stock
F1 at IoU 0.50.6940.738
AP at IoU 0.50.7730.737
Model card
Greyscale DIC image of round, scattered CHO cells on a flat grey background
DICCells · 21

Vacuoles from cell mask v1

Vacuoles from cell maskdefaultv1
Held-out test set
463 held-out fields
Baseline
stock cpsam_v2
Base model
cpsam_v2
v1stock
F1 at IoU 0.50.6060.022
mAP over IoU thresholds0.250–
Precision0.843–
Recall0.473–
AJI0.4940.008
Dice0.6100.020
Model card
Whole-cell stain fluorescence image of the same HeLa field
Cell maskToxoplasma vacuoles · 43

Nuclei from cell mask v1

Nuclei from cell maskdefaultv1
Held-out test set
453 held-out fields
Baseline
stock cpsam_v2
Base model
cpsam_v2
v1stock
F1 at IoU 0.50.8880.201
F1 at IoU 0.750.7430.019
mAP over IoU thresholds0.5360.023
Precision0.9320.199
Recall0.8480.203
AJI0.7920.286
Dice0.8770.449
Model card
Whole-cell stain fluorescence image of the same HeLa field
Cell maskNuclei · 56

Cells from Hoechst v1

Cells from Hoechstdefaultv1
Held-out test set
451 held-out fields
Baseline
stock cpsam_v2
Base model
cpsam_v2
v1stock
F1 at IoU 0.50.8700.301
F1 at IoU 0.750.7860.064
mAP over IoU thresholds0.5590.058
Precision0.9440.309
Recall0.8060.294
AJI0.7990.351
Dice0.8950.524
Model card
Hoechst fluorescence image of HeLa cells with bright nuclei and faint cytoplasm
HoechstHost cells · 61

Vacuoles from Hoechst v1

Vacuoles from Hoechstdefaultv1
Held-out test set
463 held-out fields
Baseline
stock cpsam_v2
Base model
cpsam_v2
v1stock
F1 at IoU 0.50.5690.002
mAP over IoU thresholds0.170–
Precision0.654–
Recall0.503–
AJI0.4210.006
Dice0.5460.016
Model card
Hoechst fluorescence image of HeLa cells with bright nuclei and faint cytoplasm
HoechstToxoplasma vacuoles · 63

All models, with model cards, metrics and training data: model zoo documentation and Hugging Face.

Mask generator

Drop in an image and get masks from a spaCR model: one page per model class. Run it entirely in your browser (WebGPU, nothing is uploaded), or open it in Google Colab, where the real spaCR pipeline runs on Google's free GPU under your own Google account. The download is a ZIP with the image, the mask, the flows, the cell probability, a per-object CSV and a README.

Parasite vacuoles

Recommended input: One fluorescence channel showing the parasite vacuoles (for example a parasite or vacuole marker), 20x to 60x, TIFF or PNG.

Open in Google Colab
Scores and model card

Toxoplasma PV v2 (round 5)

Held-out scores
F1 at IoU 0.50.713
Precision0.766
Recall0.667
AJI0.451
Dice0.678
Model card and test data

Toxoplasma PV v3 (round 6)

Held-out scores
F1 at IoU 0.50.750
Precision0.800
Recall0.707
AJI0.528
Dice0.750
Model card and test data

Toxoplasma PV v4 (round 7)

Held-out scores
F1 at IoU 0.50.761
Precision0.769
Recall0.754
AJI0.582
Dice0.835
Model card and test data

Toxoplasma PV v5 (round 8, alternative)

Held-out scores
F1 at IoU 0.50.733
Precision0.646
Recall0.847
AJI0.585
Dice0.810
Model card and test data

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Plaques

Recommended input: Bright-field or gel-documenter image of a plaque well or plate, grey or RGB, TIFF, PNG or JPEG.

Open in Google Colab
Scores and model card

Toxoplasma Plaque v2 (round 5)

Held-out scores
F1 at IoU 0.50.455
Precision0.500
Recall0.417
AJI0.514
Dice0.696
Model card and test data

Toxoplasma Plaque v3 (Gel Doc r5)

Held-out scores
F1 at IoU 0.50.732
Precision0.676
Recall0.798
AJI0.628
Dice0.811
Model card and test data

Toxoplasma Plaque v4 (round 6, cpsam_v2)

Held-out scores
F1 at IoU 0.50.765
Precision0.734
Recall0.798
AJI0.662
Dice0.839
Model card and test data

Toxoplasma Plaque V8 epoch 50 (interim)

Held-out scores
F1 at IoU 0.50.668
Precision0.754
Recall0.599
AJI0.698
Dice0.901
Model card and test data

Toxoplasma Plaque V9 (V8 epoch 100)

Held-out scores
F1 at IoU 0.50.656
Precision0.706
Recall0.612
AJI0.692
Dice0.900
Model card and test data

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Plaque wells

Recommended input: Photo or scan of a whole plate, grey or RGB, PNG, JPEG or TIFF; the model returns one box per well.

Open in Google Colab
Scores and model card

Toxoplasma Plaque Well Detector v1

Held-out scores
Precision0.987
Recall0.987
mAP at IoU 0.50.993
mAP at IoU 0.5 to 0.950.886
Model card and test data

Toxoplasma Plaque Well Detector v2

Held-out scores
Precision0.891
Recall0.944
mAP at IoU 0.50.946
mAP at IoU 0.5 to 0.950.834
Model card and test data

Toxoplasma Well Detector v3 (YOLO11 Gel Doc)

Held-out scores
Precision0.970
Recall0.998
mAP at IoU 0.50.994
mAP at IoU 0.5 to 0.950.884
Model card and test data

Download contents: Original upload, selected image, detection boxes and confidence scores, CSV, README and provenance. This detector returns boxes, not segmentation masks, flows or cell probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Cells from Hoechst

Recommended input: One Hoechst (DNA) channel; the model outlines whole cells from it. 20x is the magnification it was trained at.

Open in Google Colab
Scores and model card

Cross-channel cell-from-hoechst

Held-out scores
F1 at IoU 0.50.870
Precision0.944
Recall0.806
AJI0.799
Dice0.895
Model card and test data

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Nuclei from cell mask

Recommended input: One CellMask (membrane) channel; the model outlines nuclei from it. 20x is the magnification it was trained at.

Open in Google Colab
Scores and model card

Cross-channel nuclei-from-cellmask

Held-out scores
F1 at IoU 0.50.888
Precision0.932
Recall0.848
AJI0.792
Dice0.877
Model card and test data

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Vacuoles from cell mask

Recommended input: One CellMask (membrane) channel; the model outlines parasite vacuoles from it.

Open in Google Colab
Scores and model card

Toxoplasma from Cell Mask (cross-channel)

Held-out scores
F1 at IoU 0.50.606
Precision0.843
Recall0.473
AJI0.494
Dice0.610
Model card and test data

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Vacuoles from Hoechst

Recommended input: One Hoechst (DNA) channel; the model outlines parasite vacuoles from it.

Open in Google Colab
Scores and model card

Toxoplasma from Hoechst (cross-channel)

Held-out scores
F1 at IoU 0.50.569
Precision0.654
Recall0.503
AJI0.421
Dice0.546
Model card and test data

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Live cells

Recommended input: One transmitted-light channel (phase contrast, bright field or DIC).

Open in Google Colab
Scores and model card

Download contents: Original upload, selected image, label TIFF, object measurements CSV, README and provenance. Flows and cell scores are included only when the model returns them; cell scores may be raw logits, not calibrated probabilities.

Scores are copied from the published model snapshot, not recomputed here. Compare only the test sets described in each model card.

Drop an image or PDF here, or choose a file

TIFF and OME-TIFF (multi-channel), PNG, JPEG, BMP and PDF. CZI and ND2 open in the Google Colab notebook.

Where to run

Checking the in-browser model…

More settings

Normalization and object filters

Blank numeric fields and Desktop default keep the model's desktop settings. Intensity values use original image units.

In my browser: the file never leaves your computer. Google Colab: the notebook runs in your own Colab session under your Google account; spaCR does not receive your file. Maximum file size 64 MB. For research use only.

The browser route runs the same model weights exported to ONNX with the same normalization, tiling and Cellpose mask dynamics; the shared-perimeter merge and additional JSON object filters run only in the spaCR desktop app.

Screen results

A pooled CRISPR screen in Toxoplasma gondii for parasite genes that affect recruitment of the host ESCRT protein GFP-TSG101 to the parasite vacuole, analysed with spaCR. From the spaCR preprint.

  • 4screen plates
  • 3genes past FDR 5% and the effect cut, by permutation
  • p 8.4 × 10⁻⁵GRA14 vs SAG1 recruitment

Permutation tests

spaCR's guide-permutation analysis (Regression, nonparametric inference) on the screen's MaxViT per-cell scores: each gene's and each guide's partial correlation with the well-mean score, given plate, row and column, against 2,000,000 within-plate Freedman–Lane permutations (seed 0). Layout as in the preprint's Figure S7 (panels R and S). With the example's shipped settings, control wells and guides stay in, so the numbers differ from the preprint, which excluded them and filtered wells. Data: spacr-example-screen, settings from spacr-example-hit.

Gene-level permutation volcano: partial correlation against minus log10 BH-adjusted empirical P, coloured by compartment; GRA14, EAF1 and SAG1 named.
Gene level: 414 genes tested (each gene's summed guide fractions). 4 reach BH q < 0.05 (SAG1 (TGGT1_233460) r = −0.317, P = 5.0×10⁻⁷, q = 1.0×10⁻⁴; GRA14 (TGGT1_239740) r = +0.435, P = 5.0×10⁻⁷, q = 1.0×10⁻⁴; EAF1 (TGGT1_225160) r = +0.240, P = 1.0×10⁻⁶, q = 1.4×10⁻⁴; GRA12B (TGGT1_275860) r = +0.157, P = 1.7×10⁻⁴, q = 1.7×10⁻²); 3 also pass the effect cut: SAG1 (TGGT1_233460), GRA14 (TGGT1_239740), EAF1 (TGGT1_225160). 2 genes sit at the P floor (no permutation as extreme). 2,000,000 within-plate Freedman-Lane permutations, seed 0; smallest attainable P = 1/(B+1) = 5.0×10⁻⁷. MaxViT per-cell scores averaged per well, 1,290 wells on 4 plates, partial Pearson r given plate, row and column. Dashed line BH q = 0.05; dotted lines the spaCR effect cut (3x std of 29 controls = 0.221).
Guide-level permutation volcano: partial correlation against minus log10 BH-adjusted empirical P, coloured by compartment; GRA14 guides 1 and 3, SAG1 guide 4 and EAF1 guide 2 named.
Guide level: 953 guides tested. 3 reach BH q < 0.05 (SAG1 guide 4 r = −0.317, P = 5.0×10⁻⁷, q = 1.6×10⁻⁴; GRA14 guide 1 r = +0.397, P = 5.0×10⁻⁷, q = 1.6×10⁻⁴; GRA14 guide 3 r = +0.263, P = 5.0×10⁻⁷, q = 1.6×10⁻⁴); 3 pass the effect cut. 3 guides sit at the P floor. 2,000,000 within-plate Freedman-Lane permutations, seed 0; smallest attainable P = 1/(B+1) = 5.0×10⁻⁷. MaxViT per-cell scores averaged per well, 1,290 wells on 4 plates, partial Pearson r given plate, row and column. Dashed line BH q = 0.05; dotted lines the spaCR effect cut (3x std of 29 controls = 0.221).
Three histograms of the permutation null of the partial correlation, for GRA14, EAF1 and SAG1, each with the observed value far outside the null.
Permutation null of the gene-level partial correlation for GRA14, EAF1 and SAG1 (2,000,000 draws, seed 0; log count scale). Solid line: observed r; dashed: -r (the test is two-sided on |r|). b = permutations at least as extreme; P = (b+1)/(B+1). GRA14 r = +0.435, b = 0; EAF1 r = +0.240, b = 1; SAG1 r = −0.317, b = 0. The draws were regenerated from spaCR's own projection and seeded generator, and their exceedance counts equal the counts spaCR reported for these genes.

All four plates: gene effects from spaCR's OLS regression

Loading the regression results…

Hover or tab to a point for its values; click it, or press Enter, for the gene card. Arrow keys move between genes, Escape closes the card.

Ordinary least squares on the MaxViT per-cell scores of all four screen plates (1,290 wells, 414 genes, 953 guides), as spaCR's Regression module runs it on its test data. Height is the raw p; Benjamini–Hochberg FDR 5% decides the colour and the dashed line. Dotted lines: ±3σ (MAD) of the gene effects. 225160 (TGGT1_225160) is the gene the preprint names EAF1. Data: spacr-example-screen.

Phenotypes

Every measured cell can be placed on a two-dimensional map with its image crop, so that groups of similar cells can be found and checked by eye.

  • 5,000cells mapped
  • 6clusters
  • 60,816cells measured on plate 1
UMAP scatter of 5,000 cells forming 6 outlined, numbered clusters on the left; on the right one row per cluster with its number, its cell count and four example single-cell crops framed in the cluster colour.
UMAP of 6 measurements of 5,000 randomly sampled cells from screen plate 1 (60,816 cells), 6 DBSCAN clusters that differ mainly in nuclei and parasite objects per cell (1: 2,529 cells, median 1 nucleus and 1 parasite object; 2: 146 cells, median 1 nucleus and 1 parasite object; 3: 1,131 cells, median 1 nucleus and 2 parasite objects; 4: 468 cells, median 2 nuclei and 1 parasite object; 5: 502 cells, median 2 nuclei and 3 parasite objects; 6: 223 cells, median 3 nuclei and 3 parasite objects); crops are cells near each cluster centre.

Classification

Classifiers that tell the screen's control wells apart, trained and explained with spaCR on CPU: an XGBoost model on per-cell measurements and a small image model (MobileNetV3-small, 8 epochs) on single-cell crops. Column 1 wells carry guides against SAG1 (negative control) and column 2 wells against GRA14 (positive control). Wells are held out whole, so no test cell shares a well with a training cell. Data: spacr-example-screen and spacr-example-hit, plate 1, CC BY 4.0.

Two three-by-three grids of single-cell fluorescence crops on black, labelled SAG1 (left) and GRA14 (right). Each crop shows a HeLa cell with a blue nucleus, green GFP-TSG101 and red Toxoplasma vacuoles; in most SAG1 crops the vacuoles look yellow where green overlaps red, in the GRA14 crops they stay red.
The 9 held-out cells per class that spaCR's CNN classified correctly with the highest confidence, from 405 test cells (306 SAG1-well, 99 GRA14-well) in 4 wells never used for training (A01, C02, F01, H01); test accuracy 0.909, ROC AUC 0.958.
Four rows of five single-cell crops: SAG1 crops, the same cells as dim grey images with a magma heat overlay of input-gradient saliency drawn only inside the cell, then GRA14 crops and their saliency overlays. The heat is brightest along the cell outline, with smaller hot spots inside the cells.
Input-gradient saliency (SmoothGrad, 32 samples) of the CNN for the 5 most confident correct held-out cells per class, shown inside the cell only; in 10 of 10 cells the share of saliency inside the cell (39-93%) is below the share of the crop the cell covers (50-95%), and inside the cell it peaks at the cell outline.
SHAP beeswarm: twelve feature names on the left, one row of coloured dots per feature along a horizontal SHAP value axis from about -1.1 to 1.4. The top rows, cell_channel_1_shannon_entropy and cell_channel_1_channel_2_M2_correlation_85, spread widest in both directions; lower rows cluster near zero.
SHAP values of spaCR's XGBoost model for 256 held-out cells from 3 wells (C02, D02, H01), top 12 of 76 features by mean |SHAP|; each dot is a cell coloured by its feature value (dark low, yellow high), and positive values push toward the GRA14 class (well-grouped 5-fold accuracy 0.853, ROC AUC 0.922 on 1,277 cells).
SHAP waterfall for one cell: ten horizontal arrows, red pushing right and blue pushing left, from the expected value 0.178 at the bottom to f(x) = 1.545 at the top; cell_channel_1_shannon_entropy adds the largest positive contribution.
Per-cell SHAP explanation of one held-out GRA14-well cell (plate 1, well C02, field 1, object 35): the model's base value of 0.178 log-odds plus the feature contributions gives 1.545, a GRA14 probability of 0.82.
Horizontal grey bar chart of the 15 most important measurement features, longest bar at the top for cell_channel_1_channel_2_M2_correlation_85 (about 0.20), then cell_channel_1_shannon_entropy (about 0.13).
Top 15 of 76 features by XGBoost importance for the model trained on 1,021 control cells from 13 wells; cell_channel_1_channel_2_M2_correlation_85 ranks first (0.196), then cell_channel_1_shannon_entropy (0.133).

Assays and QC

Outputs of spaCR's assay and quality-control modules on its public example data sets, computed on CPU.

  • 1,536wells, dose-response
  • 24plates, control chart
  • 100plaques in one well
Dose-response curves of median cell count for five compounds, SNX-2112 highlighted with its EC50
Dose-Response: four-parameter logistic fits for the 5 of 58 compounds with a bounded EC50; SNX-2112 EC50 0.299 µM (95% CI 0.279–0.319). Data: spacr-example-dose, 1,536 wells, 4 plates.
Control chart of DMSO-well median cell count across 24 plates with control limits and flagged plates
Control chart: DMSO-well median cell count across 24 plates; all 24 fall outside the limits after cell-line, time-point and seeding changes. Data: spacr-example-control-chart.
Crystal-violet plaque well with 100 plaques outlined in magenta
Plaque Assay: 100 plaques found by toxoplasma_plaque_v4, spaCR's default plaque model, in a well from Cabral et al. 2024 (CC BY 4.0); 98 in the hand-drawn mask, F1 0.960 at IoU 0.5. The previous default, v3, finds 99 (F1 0.964) on this well.
Bar plots of GFP-TSG101 recruitment for negative and positive control wells on four plates
Recruitment: GFP-TSG101 vacuole-to-cytoplasm ratio in SAG1 (negative) and GRA14 (positive) control wells on four plates, 16 wells each, recomputed with spaCR from the public plate measurements: plate means 1.31 against 1.09, p = 8.6 × 10⁻⁵ (t-test, n = 4; the preprint reports 8.4 × 10⁻⁵). Data: spacr-example-screen.

Papers using spaCR

Papers whose methods use spaCR, each checked in the full text; the quote under each entry is the evidence. Papers that only cite spaCR are not listed. Last checked 2026-10-11. To add a paper, open an issue.

Install spaCR 1.5.1.7

Desktop installers

The installers include their own Python, so Conda is not needed. Files from the v1.5.1.7 release.

  • Windows 10 and 11 spaCR-1.5.1.7-Windows-Online-Setup.exe Download 339 kB
  • macOS 11 or later, Intel and Apple silicon spaCR-1.5.1.7-macOS-Universal-Online.pkg Download 733 kB
  • Linux x86-64 spaCR-1.5.1.7-Linux-x86_64-Online.run Download 697 kB

Checksums: SHA256SUMS.txt. Older installers and troubleshooting: installer documentation.

Docker

Images for Linux x86-64 on GitHub Container Registry, one per release: 1.5.1.7 and 1.5.1.7-cpu for CPU, 1.5.1.7-cuda12.4 for NVIDIA GPUs, and latest. They run the command-line pipelines; the desktop app is not included.

CPU: list the pipelines

docker run --rm ghcr.io/einarolafsson/spacr:1.5.1.7 spacr-run --list

NVIDIA GPU (needs the NVIDIA Container Toolkit)

docker run --rm --gpus all ghcr.io/einarolafsson/spacr:1.5.1.7-cuda12.4 spacr-run --list

Mounting data and models, settings files and full pipeline commands: container guide.

PyPI

conda create -n spacr python=3.12 -y
conda activate spacr
python -m pip install spacr==1.5.1.7
spacr

conda-forge

conda create -n spacr python=3.12 -y
conda activate spacr
conda install conda-forge::spacr
spacr

spaCR on PyPI · spaCR on conda-forge · Requires Python !=3.14.1,<3.16,>=3.9

Cite spaCR

Olafsson EB, Arnold CS, Kellermeier JA, Rimple PA, Kaur H, Wang Y, Sexton JZ, Svärd S, Carruthers VB, O'Meara MJ. spaCR: spatial phenotype analysis of CRISPR-Cas9 screens (version 1.5.1.7). Zenodo; 2026. doi:10.5281/zenodo.23984363

All versions (concept DOI)10.5281/zenodo.21343316
Version 1.5.1.710.5281/zenodo.23984363
Preprint10.64898/2026.07.08.737057
MetadataCITATION.cff

BibTeX

@software{olafsson_spacr_2026,
  author    = {Olafsson, Einar B. and Arnold, Christophe-Sebastien and Kellermeier, Jacob A. and Rimple, Patrick A. and Kaur, Hargobinder and Wang, Yifan and Sexton, Jonathan Z. and Svärd, Staffan and Carruthers, Vern B. and O'Meara, Matthew J.},
  title     = {{spaCR: spatial phenotype analysis of CRISPR-Cas9 screens}},
  version   = {1.5.1.7},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.23984363},
  url       = {https://doi.org/10.5281/zenodo.23984363}
}

The desktop application

Muted excerpts from the narrated tutorials. The full lessons, with narration and captions in several languages, are in the tutorial portal.

Home screen with one tile per module. Tutorial lesson 5.
Cellpose Workbench in Make Masks, showing the image, outlines and flows. Tutorial lesson 20.

About

This site presents spaCR and related microscopy projects: software, segmentation models and hardware, with the data and code behind each figure.

Maintainer
Einar B. Olafsson
Affiliation
Research Investigator, Department of Microbiology & Immunology, University of Michigan
Biography
Einar B. Olafsson is a Research Investigator in the Department of Microbiology & Immunology at the University of Michigan. He studies how Toxoplasma gondii interacts with the cells it infects, combining CRISPR screening, high-content microscopy and AI-based single-cell image analysis to link genetic perturbations to spatial cellular phenotypes. He created and maintains spaCR. He studied biology and immunology at Uppsala University and received his PhD in Molecular Biosciences from Stockholm University, with a thesis on signalling in Toxoplasma dissemination by infected immune cells.
Contact
olafsson@med.umich.edu
Profiles
GitHub · ORCID
How to cite
Cite spaCR with its concept DOI 10.5281/zenodo.21343316, which covers all versions, or with the version DOI and BibTeX under Install and cite.