Repository navigation
Harness tests for score_caller and three other sv_pipeline functions (#825) - #860
Merged
Merged
Conversation
…825) test_score_caller.sh extracts score_caller verbatim and records each scoring call (label, truth, query record IDs, extra args) in place of truvari. It pins the seven decisions behind every quoted SV recall: BND/CNV out of the aggregate query with no-SVTYPE calls kept, a failed query build counted, the canonical type loop (not the files on disk), recall=0 for an unemitted type, the BND query from the raw calls with --bnddist, and BNDspan only after a passing calibration and with -t. test_sv_pipeline_helpers.sh covers build_bnd_spans' three-way status, convert_manta_inversions' refusal of a crashed, no-op or inconsistent conversion, index_and_align, and the 0-byte index rebuild in index_reference_locked. Every assertion in both suites passes, and every mutant is caught (11 and 15). One planned mutant was equivalent under bcftools 1.19 and was replaced with the realistic regression; one survivor exposed a status-only check, which now asserts the reason too. All 29 sv_pipeline functions are now exercised; CLAUDE.md's rule 6 example is updated to say what is still untested. Co-Authored-By: Claude <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.
Closes #825 (close it by hand on merge to
develop).test_score_caller.sh: 31 assertions, 11 mutants caughtscore_calleris extracted verbatim.run_truvari_bothis replaced by a recorder that logs each scoring call's label, truth file, query record IDs and extra arguments, which is exactly the decision under test. Realbcftoolsbuilds the subsets. Pinned:SCORE_COVERAGE_FAIL, never scored unfiltered.SV_TYPES_SCORED_IN_LOOP. A straytruth_sv_BNDinv.vcf.gzis never scored (job 20745149).recall=0.000and leaves no empty query behind.--bnddist. Fixture IDs tell raw from converted.-t.test_sv_pipeline_helpers.sh: 34 assertions, 15 mutants caughtbuild_bnd_spans:convert_manta_inversions: a real conversion is accepted; a no-op, an inconsistent or a crashed conversion is refused (with the converter's rc and stderr); an older Manta without the converter returns 2.index_and_align: R2 is derived from R1; single-end aligns R1 alone; an aligned sample is skipped; a missing index is built before aligning.index_reference_locked(lib_report.sh): a 0-byte.bwt.2bit.64triggers a rebuild, and a real one doesn't. The mutation driver edits both files.Mutation findings
-i 'SVTYPE!="BND" && …'. bcftools 1.19 treats a missing SVTYPE as unequal to "BND", so it keeps the no-SVTYPE call exactly as-edoes (checked). It was replaced by the regression the code's comment actually guards against, a positive type list. The finding is recorded in the suite.build_bnd_spansstill returns 1, but blames the ALT parser. The test now also requires the message to name the missing file.Also
CLAUDE.md rule 6's "current example" said 25 of 29 functions were tested, naming these four as the gaps. All 29 are now referenced by a suite (counted by grep). The example now says what remains untested: the script's top-level flow between functions, which only Delta exercises.
Verified
bash -nis clean.0 mutation(s) survived, which is the last line CI's non-vacuity step checks.Not verified
🤖 Generated with Claude Code