Indexed Variant Subsets on OGS-00009 — HapMap3 full-statistic extraction

A reproducible single-run benchmark · sub-second full-result LDSC extraction with exact six-field equivalence

Published

October 11, 2026

ImportantResult

On OGS-00009, with a full-statistic index (Z, SE and EAF — not a Z-only projection), the indexed full result for ukb-b-17805 returns in 456.6 ms warm median (1,178,549 associations), against 17.20 s for the ordinary primary-plane path — a 38x improvement.

The ordinary read is measured before the subset is built and again after it, in the same run against a scratch copy of the authoritative release; the artifact records ordinary_bracketed = True. Exact decoded equivalence across all six result fields is True; publication status: published.

Scope

Property Value
Store Release OGS-00009 (OGS-00009)
Primary layout dense
Completion state observed_only
Analyses 2,024
Variants (Store axis) 9,847,701
Store format version 0.1.0
Store Encoding eaf int8_residual, se int8_residual, z int16_fixed (v3)
Reference Assembly GRCh38
Selected Analysis ukb-b-17805
Indexed Variant Subset hm3
Run mode fresh
Measured at (UTC) 2026-10-10T23:30:47.773289+00:00
Git commit a36ea78
opengwasdb fingerprint 3e15ebba785a8538…

The package version and the Store Release format_version are different things and move independently.

Store path Value Role
Authoritative source /data/opengwasdb/stores/OGS-00009/store.opengwasdb never written
Measured scratch copy /data/opengwasdb/work/270-indexed/store-copy.opengwasdb copy_kind = reflink
Copy method recorded verified (reflink/full_copy) or reused_scratch_copy

The build writes only inside the scratch copy. The original release’s recursive metadata fingerprint and its manifest.json/analyses.tsv hashes are compared before and after the run.

Run bracket State
subset present during ordinary_before False
subset published by this run True
ordinary before/after bracketed True
run started (UTC) 2026-10-10T23:22:41.526729+00:00
run finished (UTC) 2026-10-10T23:30:43.300215+00:00

original_store_unchanged = True

Input: the canonical GRCh38 HapMap3 ALID list

The input is the canonical LDSC HapMap3 list, resolved against the Store’s Variant Index by rsid and allele compatibility and written as canonical ALIDs. The list’s SHA-256 is the same checksum the writer recorded.

HapMap3 input Count
rsids requested 1,217,311
rsids resolved to an allele-compatible Store variant 1,206,903
absent from the Store Variant Index 10,385
present but allele-incompatible 23
rsids matching multiple Store rows (aliases) 2,743
duplicate canonical ALIDs collapsed 0
resolution time 3.98 s
Indexed Variant Subset input Value
HapMap3 source /data/opengwasdb/work/262-hapmap3-prototype/w_hm3.snplist.gz
HapMap3 source MD5 153ecc2bcfa740afafe656e6a384d769
subset name hm3
variant-list path /data/opengwasdb/work/270-indexed/hm3.grch38.alid.txt
variant-list SHA-256 4a7c82aa625a006ff437dcaa2769b00e056413d54c72e98f7378327c69513398
Reference Assembly GRCh38
requested (writer) 1,206,903
resolved (writer) 1,206,903
absent (writer) 0
canonical ALIDs derived 1,206,903

The writer’s own absent count is 0, while the rsid-level absence is 10,385. The two are reconciled rather than one being presented as the other, and a non-zero writer absent or an unbalanced rsid budget fails the run before an artifact is written.

Reconciliation check Holds
resolution_resolved_equals_alids True
rsid_budget_balances True
variant_list_sha256_equals_writer True
writer_absent_zero True
writer_requested_equals_alids True
writer_resolved_equals_alids True
all reconciled True

Storage: measured, not projected

Storage Bytes Human
OGS-00009 baseline (logical) 34,680,981,363 32.3 GiB
OGS-00009 baseline (physical) 34,926,288,896 32.5 GiB
HapMap3 index (logical) 5,943,821,227 5.5 GiB
HapMap3 index (physical) 6,235,009,024 5.8 GiB
Increase over the release (physical) 17.852%
Index array / entry Physical bytes
.zattrs 4,096
.zgroup 4,096
eaf 710,676,480
eaf_baseline 4,009,984
eaf_exception_index 12,288
eaf_exception_value 12,288
se 1,158,299,648
se_coefficients 24,576
se_exception_index 45,056
se_exception_value 36,864
variant_index 1,294,336
z 4,360,560,640
z_overflow_index 12,288
z_overflow_value 12,288
total 6,235,009,024

The index is derived, rebuildable data (ADR 0061): deleting it changes no association and no Analytical Metadata.

Build cost and bounded memory

Build Value
run mode fresh
configured band 65,536,000 cells
physical write unit 65,536 variants
declared band invariant max(band, write unit) = 65,536,000 cells
largest materialised source block 65,536,000 cells
largest raw buffer (cells x dtype) 131,072,000 B
raw buffer by plane eaf 65,536,000 B, se 65,536,000 B, z 131,072,000 B
prepare (open release, resolve list) 8.20 s
write (planes, chunk-aligned) 176.08 s
staged validation (publication gate) 1.94 s
validation mode sampled
decoded sample 528 cells (corners + 16 evenly spaced Analyses + 8 physical write-unit boundaries + 1 inner-chunk boundary + 8 checksum-seeded cells per Analysis + 32 checksum-seeded cells across Analyses)
sample seed (input-SHA-256) 166638625948460791
publish (write + validation + staging) 178.03 s
validation share of publish 1.1%
in-process total 186.23 s
subprocess wall total (incl. interpreter startup) 187.53 s
requested / resolved / absent (writer) 1,206,903 / 1,206,903 / 0
input SHA-256 (writer) 4a7c82aa625a006ff437dcaa2769b00e056413d54c72e98f7378327c69513398
peak RSS 1,234.8 MB
RSS acceptance threshold 1,146.1 MB (the #267 4,000,000-cell declaration)
peak RSS within acceptance threshold False
measurement source /usr/bin/time -v (build subprocess)
build block source this run
Statistic plane physical files encodings most encodings of one file
eaf 38,456 38,456 1
se 38,456 38,456 1
z 38,456 38,456 1

The writer copies the primary planes’ stored codes into the index one physical output file at a time — a v2 inner chunk or a v3 shard — so each compressed file is encoded exactly once (the table above is the measured count, not a claim). Before #270 the band was sized only by cell budget (about 1,976 variants on OGS-00009), so each 65,536-variant output chunk was partially rewritten about 33 times. The Analysis axis is tiled within the band so the largest materialised source block is max(band_cells, write unit) — one physical output unit when the budget is smaller — independent of the subset’s total size. A tile is a whole multiple of the primary plane’s own read unit when the budget allows, and the writer accepts decoding the primary once per tile when it does not, rather than materialising write unit × read unit cells.

The writer’s memory is bounded separately from RSS: the largest raw source block is the largest materialised source block cells and its largest raw buffer bytes above, independent of the subset’s total size.

The RSS target is the preserved #267 acceptance threshold listed above: the original 4,000,000-cell declaration times the same per-cell allowance plus the fixed term. It is deliberately not re-derived from the new band budget, so the measured peak is still compared against the historical target and the run records the miss honestly rather than being turned green by widening the model. The peak itself remains ALID-resolution-bound, not writer-band-bound.

The build’s publication gate is sampled: the enumerated structural rules (identity and attributes, exact array set, shapes/dtypes/chunking, the full Variant Index, counts, the small side-table remapping and provenance) are checked exhaustively, and the decoded Z/SE/EAF and Association Status of a bounded deterministic sample of cells are compared against the primary planes. The sample anchors a spread of physical write-unit boundaries plus a separate inner-chunk spread, the endpoints of both axes, a spread of Analyses and input-checksum-seeded cells (the mode, strategy, seed and count are in the table above); a systemic, ordering or chunk-boundary corruption is caught. An isolated unsampled corruption can pass this gate by design; standalone opengwasdb validate remains exhaustive and decodes every indexed cell, so it is the audit that rules that out.

Full decoded axis: 2,024 Analyses x 9,847,701 variants = 19,931,746,824 cells (0.1 TB at float32).

Query latency

Query first read warm median p95 results
ordinary, before index 44.38 s 17.20 s 21.33 s 7,578,651
indexed 450.1 ms 456.6 ms 524.7 ms 1,178,549
ordinary, after index 25.04 s 18.83 s 20.22 s 7,578,651
Timing method Definition
first read first full-result read of the block in the same process; the OS page cache is not dropped, so it is not a cold-cache figure, and ordinary_after runs after ordinary_before has already warmed the column
p95 nearest-rank over 5 sorted warm repetitions: samples[min(N-1, int(0.95*N))] (max for N<20; N=5)
warm median median of the sorted repetitions that follow the first read, on the same open store
Target Outcome
warm median under 1 s True
exact decoded equivalence True
ordinary unchanged within ±25% envelope True (median moved +9.47%)
ordinary before/after bracketed True
peak build RSS within the #267 acceptance threshold False
authoritative store unchanged True

Exact equivalence (the publication gate)

Every one of the six parallel arrays must decode exactly equal, be present on both sides, be non-empty, and share dtype and length. A field missing from both sides fails: it was not measured.

Guard Value
required fields variant_index, analysis_index, z, se, eaf, association_status
all six present on both sides True
dtypes match True
lengths match True
non-empty True
expected rows 1,178,549
indexed rows 1,178,549
Field Exact
analysis_index True
association_status True
eaf True
se True
variant_index True
z True

Caveats and honesty

  • The RSS target is the preserved #267 acceptance threshold, reported as its measurement says. The peak was 1,234.8 MB against the historical 1,146.1 MB threshold (the #267 4,000,000-cell declaration), so peak_rss_within_bound = False. The writer’s own bounded-band invariant (65,536,000 cells; raw buffer 131,072,000 B) is recorded separately and is not used to re-derive this acceptance target. The peak is ALID-resolution-bound, not writer-band-bound, and widening the threshold after the fact would be the tuning this harness refuses.
  • The publication gate is a documented sample; standalone validation is exhaustive. The build’s staged validation compares a bounded deterministic decoded sample (528 cells, mode sampled, 1.94 s) and refuses systemic, ordering and output-boundary corruption. An isolated unsampled corruption can pass the build gate; standalone validate decodes and compares every indexed cell, side table, imputed mask and reference EAF and is the explicit audit for it. The risk is stated rather than hidden.
  • The measured rewrite count is one per physical file. The table above is the store-level count over the staged group, so a v2 chunk (or v3 shard) encoded twice would show most encodings of one file = 2 and fail the artifact’s semantic checks.
  • first_ms is not a cold-cache figure. The OS page cache is never dropped, and ordinary_after follows ordinary_before, so it is already warm. The method is disclosed in the artifact under timings.method.
  • p95_ms is the nearest-rank order statistic, i.e. the maximum of the five warm repetitions at the default --reps; it is not interpolated.
  • The build block is genuine for this run (build.run_mode = fresh). A query-only re-run may reuse an earlier artifact’s measured build block via --build-stats, and it is named here as this run.
  • This measurement is at the commit named in Scope (a36ea78, fingerprint 3e15ebba785a8538…). It was re-run for #270’s chunk-aligned writer; both the artifact and this page are regenerated from that run.
  • store.copy_kind is the copy method the harness verified, recorded as reflink or full_copy from cp --reflink=always with a documented fallback, or reused_scratch_copy when it did not perform the copy.
  • The per-plane physical figures bucket the group’s top-level entries, so a future encoding that adds an array appears without a hard-coded plane list.
NoteReproducing this measurement
# Fresh run: copy the authoritative release into scratch with a verified
# reflink (falling back to a full copy), remove any existing subset from that
# scratch copy, measure ordinary_before, build, measure ordinary_after.
pixi run -e dev python benchmarks/benchmark_indexed_subset.py \
  --store /data/opengwasdb/stores/OGS-00009/store.opengwasdb \
  --work /data/opengwasdb/work/270-indexed \
  --analysis-id ukb-b-17805 \
  --subset-name hm3 \
  --reps 5 \
  --reuse-copy --reset-subset \
  --output docs/benchmark-output/opengwasdb_267_indexed_subset_benchmark.json
pixi run -e report quarto render \
  docs/benchmark-output/opengwasdb_267_indexed_subset_benchmark.qmd

Re-run the harness; never hand-edit a number in the artifact or this page.