--- license: cc-by-4.0 pretty_name: "spaCR example: optical pooled screen" tags: - microscopy - optical-pooled-screen - crispr - in-situ-sequencing - spacr size_categories: - n<1K source_datasets: - "BioImage Archive S-BIAD394" --- # spaCR example: optical pooled screen Two neighbouring 10X fields (sites 331 and 332, the last two of the 333-field well) of the in-situ sequencing acquisition, with all eleven sequencing cycles: `sequencing/c1/` holds cycle 1 as one five-plane stack (DAPI, CY3, A594, CY5, CY7) and `sequencing/c2/` ... `c11/` hold each later cycle's four base channels as separate files (1,480 x 1,480 px, uint16). `library/pool10_prefixes.csv` is the screen's guide library as 11-base barcode prefixes. About 394 MB. Sites 331 and 332 are chosen because spaCR's OPS engine takes a well's field count from its highest site number, and the last field keeps the measured 333-field layout. There are no phenotype images: a 20X phenotype field is 280 MB on its own, and placing phenotype fields needs anchors spread over the whole well. ## Source and licence A small, **unmodified** sample of the primary fixed-cell optical pooled screen of Funk *et al.* 2022, *The phenotypic landscape of essential human genes*, Cell 185(24):4634-4653 ([doi:10.1016/j.cell.2022.10.017](https://doi.org/10.1016/j.cell.2022.10.017), PMID 36347254), deposited in the BioImage Archive as [S-BIAD394](https://www.ebi.ac.uk/biostudies/BioImages/studies/S-BIAD394): plate `20200202_6W-LaC024A`, well A1. Every image is byte-identical to the archived file; `manifest.csv` inside the archive gives each file's size, SHA-256 and its path under `https://ftp.ebi.ac.uk/biostudies/fire/S-BIAD/394/S-BIAD394/Files/`. The BioImage Archive releases directly submitted data under CC0 or CC-BY-4.0 ([policy](https://www.ebi.ac.uk/bioimage-archive/help-policies/)); S-BIAD394 carries no other licence attribute. This sample is redistributed under CC-BY-4.0 with attribution to the original authors. **Cite the paper above** if you use it. The guide library is derived from `pool10_design.csv` in the authors' [code repository](https://github.com/lukebfunk/OpticalPooledScreens) (MIT licence) exactly as their Snakefile derives it. ## Use in spaCR In the Mask screen press **OPS**, then **Load test data...** under *OPS input*: the set is downloaded into `~/.cache/spacr/example_data/ops_screen/` and `genotype_source`, `dst_root`, `ops_library` and `plate` are filled in. **Run** stitches the two fields, segments the nuclei with Cellpose and decodes each nucleus's barcode against the library; the tables go to `ops_output/measurements.db`. From Python: ```python from spacr.ops_engine import run_ops run_ops({"genotype_source": "/sequencing", "dst_root": "/ops_output", "ops_library": "/library/pool10_prefixes.csv", "plate": "20200202_6W-LaC024A"}) ``` Measured on this sample with spaCR's CPU path (`ops_gpu` off): the stitch places both fields on one accepted edge; Cellpose (cpsam) numbers 10,675 nuclei; decoding finds 22,733 spots over eleven cycles, 80 % of them an exact match to a library prefix, and assigns a barcode to 3,729 nuclei, 3,549 of them library-exact (95 %). On a CPU the segmentation takes about an hour; on a GPU it takes minutes. The decode takes about 20 s. ## Files One uncompressed tar, `spacr-example-ops.tar`, unpacked with Python's tar data filter by spaCR. `SHA256SUMS` holds the archive's checksum.