|
Download README.md from einarolafsson/spacr-example-ops-e2e: direct link, hf CLI and curl.
- Browser
- Download file 12.6 kB
-
https://huggingface.co/datasets/einarolafsson/spacr-example-ops-e2e/resolve/main/README.md
- Command line
-
hf download hf://datasets/einarolafsson/spacr-example-ops-e2e/README.md
-
curl -L -o README.md https://huggingface.co/datasets/einarolafsson/spacr-example-ops-e2e/resolve/main/README.md
12.6 kB
| license: cc-by-4.0 | |
| pretty_name: "spaCR example: OPS end-to-end subset (Funk et al. 2022, plate A, well A1)" | |
| tags: | |
| - microscopy | |
| - optical-pooled-screen | |
| - spacr | |
| size_categories: | |
| - n<1K | |
| # spaCR example: OPS end-to-end subset, Funk et al. 2022 plate A, well A1 | |
| A small raw subset of one optical pooled screen (OPS) well that runs every OPS step in spaCR: stitch, align, | |
| genotype (decode) and phenotype. It is the test data for spaCR's end-to-end OPS test and the default example | |
| for OPS live mode. | |
| **This is the core tier** (about 190 MB, for CI). Every file has the published name, shape, dtype, | |
| axes and ImageJ metadata. Pixels inside a region of interest (ROI) are byte-identical to the archive; every | |
| other pixel is 0. The ROI of each file is listed in `roi_manifest.json`. Phenotype site 1280 is an all-zero | |
| placeholder: it keeps the 1,281-field round-well layout and tests the field-without-nuclei path. | |
| ## Source and citation | |
| - **Source:** BioImage Archive **S-BIAD394**, "The phenotypic landscape of essential human genes", released | |
| 2022-03-31. Files: <https://ftp.ebi.ac.uk/biostudies/fire/S-BIAD/394/S-BIAD394/Files/> | |
| (`screenA/20200202_6W-LaC024A`). The SHA-256 of every original file is in `roi_manifest.json` | |
| (`source_sha256`). | |
| - **Citation:** Funk L, Su KC, Ly J, Feldman D, Singh A, Moodie B, Blainey PC, Cheeseman IM. The phenotypic | |
| landscape of essential human genes. *Cell* 185(24):4634–4653.e22 (2022). doi:10.1016/j.cell.2022.10.017, | |
| PMID 36347254. | |
| - **Library:** `library/pool10_design.csv`, the pool10 design from the authors' code repository | |
| (OpticalPooledScreens, MIT licence, Copyright (c) 2017 David Feldman, Avtar Singh, Rebecca Carlson, | |
| Paul Blainey). `library/pool10_prefixes.csv` is derived from it: one column `prefix` = | |
| `sgRNA[:prefix_length]` for every design row, in file order (20,445 prefixes of 11 bases). spaCR reads | |
| this file (`ops_library`). | |
| - **Licence:** this subset is redistributed under **CC-BY-4.0**; please cite Funk et al. 2022. The source | |
| record S-BIAD394 carries no licence attribute; the BioImage Archive releases direct submissions under CC0 | |
| or CC-BY-4.0, and both allow redistribution. | |
| ## What is included | |
| | Part | Files | | |
| |---|---| | |
| | Sequencing (SBS, 10X, 1,480 × 1,480 px, uint16) | tiles (sites) **321, 322, 331, 332**, all 11 cycles: `c1` 5-plane stack `DAPI-CY3-A594-CY5-CY7` (axes CYX), `c2`–`c11` one file per base channel `CY3`, `A594`, `CY5`, `CY7` (axes YX). 44 files. | | |
| | Phenotype (20X, 2,960 × 2,960 px, 4 focal planes, uint16) | fields **1255, 1264, 1280**: `DAPI-GFP` (axes ZCYX, 4 × 2), `A594` and `AF750` (axes ZYX). 9 files. | | |
| | `library/` | `pool10_design.csv` (original), `pool10_prefixes.csv` (what spaCR reads). | | |
| | `settings/` | `ops_testdata_settings.csv` (`ops_align_model` = tile_affine) and `ops_testdata_settings_similarity.csv`, written by spaCR's settings writer, with `.json` twins. Paths are relative: run spaCR with this folder as the working directory. | | |
| | `reference/inputs/` | `ops_ph_placement_seed.json` (phenotype placement seed, schema below) and `flatfield/` (the plate's stored spaCR flat-field maps: `flat_info.json`, `fields.json`, one `flat_20200202_6W-LaC024A_<channel>.npy` per channel). | | |
| | `reference/` | spaCR reference outputs (see `reference/PROVENANCE.json`). | | |
| | `roi_manifest.json` | per file: source SHA-256 and size, ROI(s) in file coordinates (core tier), the canvas ROI and the production placements. | | |
| | `SHA256SUMS` | SHA-256 of every file in this tier. | | |
| **Why these sites.** spaCR takes a well's layout from its highest site number, so the subset holds SBS site | |
| 332 (333-tile round well) and phenotype site 1280 (1,281-field well). The stitch keeps only the largest | |
| connected group of tiles, so the subset is one 2 × 2 block at the well's right rim (with all 4 overlaps). | |
| Field 1264 sits on the block's 4-tile junction and field 1255 is its left neighbour in another tile group. | |
| No included file is on the plate's broken-input lists (phenotype fields 598, 757, 860, 864, 867, 871, 909, | |
| 988, 1133, 1136; SBS c11 CY5 Site-56). | |
| **Folder layout** mirrors the plate as spaCR's OPS reader indexes it: | |
| ``` | |
| ops_testdata_funk2022_A1/ | |
| 20200202_6W-LaC024A/ | |
| sequencing/images/input/c1 … c11/10X_c{N}_A1_<channel>_Site-<site>.tif | |
| phenotype/images/input/DAPI-GFP-A594-AF750/20X_DAPI-GFP-A594-AF750_A1_<channel>_Site-<site>.tif | |
| library/ settings/ reference/ roi_manifest.json README.md SHA256SUMS | |
| ``` | |
| ## What was cut (core tier) | |
| - **SBS ROI**, in the production canvas of well A1 (cycle-1 stitch): y 14,750–15,750, x 24,800–25,800. It holds | |
| the 4-tile junction, both overlap strips across it and the SBS area under the two phenotype ROIs. In each | |
| file it is the canvas ROI minus that tile's production placement, rounded outward and padded on every side | |
| by |cycle shift| + max |channel shift| of that cycle + 4 px (shifts from the production decode), so the | |
| registered cycles still cover it. | |
| - **Cycle-1 DAPI** also keeps each tile's whole overlap with the other three tiles (+ 8 px). Without it a | |
| zeroed edge crossing an overlap strip pulled the stitch by 1 px; with it the core and full stitches agree | |
| exactly. | |
| - **Phenotype ROIs**, 1,200 × 1,200 field px, all focal planes and channels: field 1255 rows 952–2152, | |
| columns 1760–2960 (touches the right border); field 1264 rows 952–2152, columns 0–1200 (touches the left | |
| border). Both lie inside the SBS ROI. Field 1280 is all zero. | |
| - **Storage:** lossless deflate (zlib) with the horizontal predictor. tifffile decodes it with the standard | |
| library; imagecodecs is not needed. Every written file was read back and compared with the source: inside the | |
| ROI bit-identical, outside 0 (core); everything bit-identical (full). | |
| ## What this subset can and cannot test | |
| - Core tier: the reader and layout, the stitch (4 overlaps and a junction) and, after item 940, alignment on | |
| 2 tile groups and phenotype measurement per cell. Full tier: all of these plus decode (all rules, decoy | |
| counting) and determinism. | |
| - **It cannot estimate a false-discovery rate (FDR).** spaCR's FDR is decoy calls / real calls × 1.268 / 4 | |
| (81,780 decoys). The core tier expects about 1 decoy call (Poisson 0–3) and the full tier about 6; even 6 | |
| decoys leave the FDR uncertain by more than a factor of 2. FDR calibration stays with full-well runs. | |
| - Flat-field fitting needs many fields; the stored plate maps are used instead. | |
| ## Phenotype placement seed (`reference/inputs/ops_ph_placement_seed.json`) | |
| A partial well cannot supply the whole-well anchor fields spaCR's phenotype phase aligns, so the phenotype | |
| placement of well A1 (production spaCR run) is stored as a file. spaCR item 940 adds the setting that reads it. | |
| Schema `spacr.ops_ph_placement_seed`, `schema_version` 1 (JSON object): | |
| | Key | Type | Meaning | | |
| |---|---|---| | |
| | `schema`, `schema_version` | str, int | `"spacr.ops_ph_placement_seed"`, `1`. | | |
| | `plate`, `well` | str | `"20200202_6W-LaC024A"`, `"A1"`. | | |
| | `phenotype_fields` | int | fields of the phenotype acquisition (1281); the layout is `spacr.ops_layout.round_well_layout(phenotype_fields)`. | | |
| | `sbs_tiles` | int | tiles of the sequencing acquisition (333). | | |
| | `frame.kind` | str | `"sbs_tile_anchored"`: every (y, x) is in the stitched cycle-1 sequencing well frame of the production run (`ops_geometry` y/x). | | |
| | `frame.reference_tiles` | {site: {y, x}} | production placements (top-left, px) of SBS tiles 321, 322, 331, 332 in that frame. | | |
| | `frame.tile_shape` | [h, w] | SBS tile size, [1480, 1480]. | | |
| | `raster.origin`, `raster.column_step`, `raster.row_step` | [dy, dx] floats | `centre(site) = origin + column × column_step + row × row_step`, `(column, row) = layout.position(site)`; the same raster `spacr.ops_phenotype.phenotype_centres` fits from anchors. | | |
| | `transform.scale` | float | well px per field px (0.24994). | | |
| | `transform.rotation_deg` | float | field rotation in the well frame (−0.002). | | |
| | `transform.field_shape` | [h, w] | phenotype field size, [2960, 2960]. | | |
| | `fields[]` | list | for each included field: `site`, `grid_column`, `grid_row`, `centre_y`, `centre_x`, `sbs_site`, `offset_y`, `offset_x` (derived; for checking). `offset = centre − scale × R(rotation) @ (h/2, w/2)` (`spacr.ops_merge.field_transform`). | | |
| | `provenance` | object | source database and table, the anchor fields with their raster residuals, and the largest difference between the raster and any stored production centre (≤ 1e-6 px). | | |
| **Using it on another stitch of these tiles** (for example this subset's own stitch, whose origin differs): | |
| `offset = mean over the reference tiles present of (new placement − stored placement)`; add `offset` to | |
| `raster.origin` and to every centre; the steps, scale and rotation stay. On this subset all 4 tiles are present. | |
| ## Status of the reference outputs (2026-11-13, spaCR nightly 6afe2e8f8c) | |
| - **Run and reproducible:** stitch (core and full agree exactly; full is within 0.15 px of production), SBS | |
| objects (Cellpose-SAM, CPU), decode (rule (a) + S2; reruns are identical). | |
| - **Full tier vs production (gate (c), PASS):** the rule is at least 99 % same guide where both called, for | |
| nuclei more than 100 px from the subset edge: 99.01 % on 13,705 called nuclei. Agreement where either side | |
| called (always reported beside it): 94.1 % overall, 95.8 % beyond 100 px. Over all nuclei, 98.9 % same guide | |
| where both called, and 735 nuclei called on one side only (`reference/provenance_call_differences.parquet`). | |
| The full tier's cycle and channel shifts equal production's exactly. | |
| - **Scope of the core tier (maintainer decision, 2026-11-13):** the core tier is for the reader and layout, | |
| stitch and (after item 940) phenotype tests only. **Decode tests use the full tier.** The core tier's decode | |
| outputs are kept for the record but are **not a test reference**: spaCR's whole-field cycle registration | |
| locks onto the zeroed ROI edges, so its cycle shifts are wrong. | |
| - **Not yet run:** phenotype placement, segmentation, measurement and merge (similarity and tile_affine). | |
| The phenotype phase refuses without whole-well anchors; spaCR item 940 will place the fields from | |
| `reference/inputs/ops_ph_placement_seed.json`. | |
| - Details and gates: `reference/PROVENANCE.json`. | |
| ## How to regenerate | |
| 1. Data: `build_ops_testdata.py <out_root>` reads the 53 source files from an S-BIAD394 mirror (the | |
| NAS copy is byte-identical to the archive) and writes both tiers; `write_placement_seed.py` writes the seed. | |
| 2. Reference: with this folder as the working directory, run spaCR on `settings/ops_testdata_settings.csv` | |
| (`spacr.ops_engine.run_ops(settings, wells=["A1"], phases=...)`); see `reference/PROVENANCE.json` | |
| for the commit, the phases run, the environment lock and the CPU. | |
| ## Repository layout: two tiers | |
| - `ops_testdata_funk2022_A1_core.tar` (about 194 MB): the core tier, the smallest subset that runs the OPS end-to-end test. | |
| - `ops_testdata_funk2022_A1_full.tar` (about 1.25 GB): the full tier, with the complete set of inputs for plate A well A1. | |
| - `SHA256SUMS_tars.txt`: sha256 of both tar files (`sha256sum -c SHA256SUMS_tars.txt`). | |
| Each tar unpacks to a top folder `ops_testdata_funk2022_A1/` that holds `README.md`, `roi_manifest.json`, `SHA256SUMS` (check with `sha256sum -c SHA256SUMS` inside the folder), `settings/`, `reference/` and `library/`. | |
| ## Revision 2: phenotype and merge references | |
| Revision 2 adds reference outputs for the phenotype and merge phases. Every revision 1 file is unchanged. | |
| - `ops_testdata_funk2022_A1_rev2_core.tar` (4.2 MB) and `ops_testdata_funk2022_A1_rev2_full.tar` (26.6 MB): unpack each over its tier's folder. They add only new paths: | |
| - `reference/phenotype/`; | |
| - `reference/merge/tile_affine/` and `reference/merge/similarity/`; | |
| - `reference/PROVENANCE_rev2_addendum.json`; | |
| - `SHA256SUMS_rev2`. | |
| - `SHA256SUMS_rev2.txt`: sha256 of both revision 2 tars. | |
| - How the references were made: spaCR's phenotype phase, with phenotype placement seeded from `reference/inputs/ops_ph_placement_seed.json` (setting `ops_ph_placement_seed`), then the merge phase with both alignment models. The revision 1 `ops_objects` and `ops_barcodes` were used as fixed inputs. The commit, settings and timings are in the addendum. | |
| - Merge results: | |
| - full tier: 4,531 phenotype cells, of which 4,106 merged with tile_affine and 4,105 with similarity; median distance 0.64 px and 0.88 px; | |
| - core tier: 490 cells, 392 and 391 merged; median distance 0.38 px and 0.53 px. | |
| - Licence and citation are as above (CC-BY-4.0; Funk et al. 2022). | |