Repository navigation
Validate real genomes: phase sets, canonical QUAL digest, batched shapes - #31
Merged
Merged
Conversation
…nonically, batch shapes On NG131FQA1I's first 250,000 records (58.2M triples) v3.3.0's validation reported a mismatch on a graph whose every field equals the VCF, and its shape checks exhausted a 31 GB host. Three fixes: - The census oracle counts what the emitters write for phase sets, SV events, confidence intervals and gVCF reference blocks, so Q9 and Q10 agree on files that carry them. A new test checks the oracle against both emitters for VCFv4.2 and 4.5. - Q11's record digest drops a decimal QUAL's trailing zeros on both sides, so it no longer depends on how an engine prints decimals (QLever prints 30.10 as 30.1). - Node-local shapes (the default core profile) are validated a batch of whole records at a time, in parallel, each batch with the file-level triples it points at, so memory follows the batch rather than the graph. New options --shacl-batch-triples (default 500,000) and --shacl-workers (default up to 4). Measured: about 1.3 GB per batch. Shapes with SPARQL constraints are still validated whole, under --shacl-max-triples, now 10M (about 24 GB at the measured 2.4 GB per million triples; 50M could not protect a 31 GB host). The wrapper no longer gates the core profile by size. End to end on bench-2, NG131FQA1I's slice now validates PASS: 13/13 comparisons equal, shapes PASS (117 batches, 0 violations, 46 warnings) in 89 min, with at least 19.9 GB of memory free throughout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Covers the batched SHACL paths the first tests left out: - a buffered split that flushes after every line gives the same batches; - a result repeated in every batch (the header's warnings) is reported once; - one violating batch fails the graph, and a batch that cannot run is EXECUTION_FAILED; - a graph with no records is validated as its context alone; - every batch runs in a fresh process. The task is stubbed, so these need no pyshacl. Also pins the real genome's 2,146 records per batch at the default, counter keys as IRIs, an SV record with no ALT, and that --shacl-workers reaches validate_shacl. The flush threshold is now a named constant so the test can lower it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
On a real genome (NG131FQA1I, first 250,000 records, 58.2M triples), v3.3.0's validation had two problems:
None of these were conversion errors; all three causes were in the validator. This PR fixes all three.
vcfc:PhaseSet)test_validation_real_files_unit.pychecks the oracle against both emitters, for VCFv4.2 and 4.5.30.10→30.1), so 788 digest buckets differedcoreprofile) are now checked a batch of whole records at a time, in parallel. Each batch also carries the file-level triples it points at, so the verdict is the same as checking the whole graph.New options
--shacl-batch-triples(default 500,000) and--shacl-workers(default up to 4).Size limit for checking the whole graph
--shacl-max-triples.Verification, all on bench-2 inside the rebuilt image:
Docs updated:
validation.md,validation-methodology.md,validation-migration-notes.md,cli-reference.md.🤖 Generated with Claude Code