UKB chr1 Dense Store — bcftools Build Time Benchmark
chr1 × 100 UKB analyses · bcftools vs cyvcf2 VCF reader comparison
Summary
bcftools is 2.26× faster than cyvcf2 for building the UKB chr1 dense store (388.5s vs 876.63s). Query performance is unchanged (queries do not use the VCF reader).
Build time comparison
| Reader | Build time | vs other |
|---|---|---|
| cyvcf2 (previous) | 876.63s | 1.00× (baseline) |
| bcftools (current) | 388.5s | 2.26× faster |
Dataset: 762,080 variants × 100 analyses, 290 MB store, 0 liftover failures.
Query timings (confirmation run)
Queries do not use the VCF reader. Timings confirm no regression from the reader change.
| Query | Median ms | p95 ms | Result count | vs besdq |
|---|---|---|---|---|
| regional | 97.6 | 130.4 | 324,048 | 19.6× ⚠ |
| phewas | 2.6 | 3.0 | 100 | 2.9× ⚠ |
| tophits | 1.3 | 1.4 | 14,557 | 1.9× |
| bulk | 1764.2 | 2802.6 | 762,080 | 3.6× ⚠ |
| random_lookup | 224.2 | 298.4 | 598 | 7.4× ⚠ |
Interpretation
The bcftools reader replaces cyvcf2 across all three VCF functions (stream_vcf_variants, stream_vcf_associations, read_vcf_study_type). The build speedup is consistent with the known overhead of Python-level cyvcf2 iteration vs bcftools C-level record processing.
Remaining query gaps vs besdq are due to zarr chunk decompression overhead (100-chunk reads per column for bulk; oindex reads across 3,241 rows for regional), not the VCF reader. The top-hits pattern is now within the 2× target (1.89×).
Provenance
- JSON:
opengwasdb_vcf_ukb_chr1_bcftools_benchmark.json - Array API benchmark:
opengwasdb_vcf_ukb_chr1_array_benchmark.json - Store path:
docs/benchmark-output/vcf_ukb_chr1_dense.opengwasdb - ADR:
docs/adr/0019-two-pass-vcf-build-with-inline-liftover.md