test(codec): assert the bases the codec_template consensus tests are named for - #808
Conversation
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…named for #768 (the fix for #763) now stores the reverse CODEC read in reference orientation, so codec_template families consense to the reference sequence over the region the two strands share rather than the mostly-N output the create_fr_pair orientation bug used to produce. Two #767 tests still asserted only the consensus length, under a codec_template doc comment that still claimed the bases were unusable and pointed at #763. test_dovetailed_starts_without_an_indel_call_a_consensus and test_terminal_indel_outside_the_shared_region_calls_a_consensus now assert the emitted consensus bases, each verified byte-for-byte against REF_BASES over the shared span (the lone N's are single-strand soft-clip read-through edges), and the stale doc comment is corrected. The two sibling tests are threshold and rejection tests and keep their existing assertions. Test-only; no production change. Closes #807.
cd9d13b to
0b60b38
Compare
|
@coderabbitai pause |
✅ Action performedReviews paused. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #808 +/- ##
=======================================
Coverage 94.30% 94.30%
=======================================
Files 186 186
Lines 112550 112554 +4
=======================================
+ Hits 106136 106141 +5
+ Misses 6414 6413 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #807.
What
Two CODEC tests added with #767 assert only the consensus length, under a
codec_templatedoc comment that still claimed the bases were unusable and pointed at #763. #768 (the fix for #763) stores the reverse CODEC read in reference orientation, socodec_templatefamilies now consense to the reference sequence over the region the two strands share — not the mostly-Noutput thecreate_fr_pairorientation bug used to produce. This makes those tests assert the bases they are named for, and corrects the stale doc.Changes
test_dovetailed_starts_without_an_indel_call_a_consensus— now asserts the 128 emitted consensus bases (was length-only).test_terminal_indel_outside_the_shared_region_calls_a_consensus— now asserts the 127 emitted consensus bases (was length-only).codec_templatedoc comment (removed the false "consensus comes out mostlyN… Tracked as codec caller test fixture stores the reverse read's SEQ in read orientation, so its consensus is almost all N #763" rationale).The two sibling
codec_templatetests are appropriate as-is:test_min_duplex_length_is_measured_over_the_shared_regionis a threshold test andtest_indel_inside_the_shared_region_is_still_rejectedrejects (no bases to assert).Verification
Each new expected literal was verified byte-for-byte against
REF_BASES, not merely captured from the code:REF_BASES[200..326]exactly (0 non-Nmismatches, 0Ns in the body).Nmismatches); the loneNis the single-strand edge past the reverse read's close.Test-only; no production change.
cargo nextest run -p fgumi-consensus(1267 passed),cargo fmt --check, andcargo clippy -p fgumi-consensus --all-targetsall clean.