Fix alignment display coordinates across row wraps (#26)#37
Draft
nathanweeks wants to merge 2 commits into
Draft
Fix alignment display coordinates across row wraps (#26)#37nathanweeks wants to merge 2 commits into
nathanweeks wants to merge 2 commits into
Conversation
The --showalignment row-boundary coordinates were wrong whenever a
display unit straddled the wrap column:
- a codon split across the wrap (dna2protein) mis-numbered the row,
since the marker recorded the unit's start rather than the position
of the last character actually shown; interpolate proportionally
across the unit instead, and emit a marker per crossed boundary so a
single over-wide unit (eg an intron label under a small
--alignmentwidth) no longer desyncs later rows.
- the non-advancing sequence (eg the cDNA across a target intron in
est2genome) was reported one base too high, as a zero-advance unit
used the next base position rather than the last one emitted.
Add dna2protein and est2genome alignment-display regression tests.
Assisted-by: Claude:claude-opus-4-8
Track row-start coordinates separately from row-end coordinates when a display unit spans a row wrap. This keeps split 3-letter amino-acid labels on the same residue and prevents compressed introns from making contiguous genome coordinates jump. Extend dna2protein and est2genome alignment tests for the target side. assisted-by: Claude-Code:claude-opus-4-8 Assisted-by: Codex:gpt-5.5
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.
The --showalignment row-boundary coordinates were wrong whenever a display unit straddled the wrap column:
a codon split across the wrap (dna2protein) mis-numbered the row, since the marker recorded the unit's start rather than the position of the last character actually shown; interpolate proportionally across the unit instead, and emit a marker per crossed boundary so a single over-wide unit (eg an intron label under a small --alignmentwidth) no longer desyncs later rows.
the non-advancing sequence (eg the cDNA across a target intron in est2genome) was reported one base too high, as a zero-advance unit used the next base position rather than the last one emitted.
Add dna2protein and est2genome alignment-display regression tests.