Repository navigation
Reset the count after G when parsing a CIGAR string - #689
Merged
Merged
Conversation
Cigar(std::string_view) kept the digits of a node insertion's count, so "2G3=" parsed as 2G followed by 23=. Clear the count as for every other operation. 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.
Cigar(std::string_view)did not clear the pending count after aG(node insertion), so"2G3="parsed as2G23=and"3=2G1X1G"as3=2G21X1G. Every other operation clears it.Adds a round-trip test,
DBGAlignerTest.cigar_string_round_trip. A standalone build ofaligner_cigar.cppreproduces the bug before the fix and round-trips all three test strings after it.🤖 Generated with Claude Code
Summary by cubic
Fixes CIGAR string parsing so a node insertion (
G) resets its count, preventing"2G3="from parsing as2G23=and"3=2G1X1G"as3=2G21X1G.Adds a round-trip test verifying three CIGAR strings serialize back to their original form.
Written for commit 96a36f0. Summary will update on new commits.