Repository navigation
Optimize cohort scoring and prepare release validation - #1
Merged
Merged
Conversation
DylanCosto
marked this pull request as ready for review
September 30, 2026 12:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cohort scoring repeatedly subtracted and added contributions for each non-reference sample. Precompute exact differences once per term and skip packed groups of four homozygous-reference samples. Keep the general path for wide coefficients, different dosage-weight exponents, and missing calls, preserving score text and coverage.
On synthetic workloads of two 100,000-term scores and 257 samples, the first five-run comparison reduced scoring time by 22–24% for sparse cohorts and 48% for dense cohorts at 1 and 4 threads. A second comparison confirmed the gain and passed a 15% scoring-regression gate. These are synthetic scoring-only measurements; single-sample gVCF speed was essentially unchanged. See
bench/README.mdfor reproduction and timings.Add a benchmark runner with an independent integer oracle, exact-output comparisons across binaries and thread counts, wall/CPU time, and peak memory. CI now tests stable Rust on Linux/macOS and Rust 1.88 on Linux, plus a release-mode benchmark smoke test. Release packaging checks the tag against the package version, uses locked tests, smoke-tests native binaries, and includes release notes.
This PR also fixes reference-panel comparison symmetry: terms below 99% panel call rate are excluded from both sides and matched coverage. Score JSON moves to
pgsum-score-v3, undefined Z-scores become null, and imputation metadata distinguishes observed scores, sample filling, and reference-panel filling. Public hand-calculated tests and migration notes cover the changes.Validation:
cargo fmt --checkandcargo clippy --all-targets --locked -- -D warnings: passed.Large real-genome panel comparisons have not been rerun under the exclusion rule. Historical panel results are labeled accordingly. No release tag has been published.