Locus rows keep chromosome case; one grammar from legume-genomic-types - #18
Merged
Merged
Conversation
parse_locus lowercased the whole row name, so auto-detected Locus and Mixed alignment renamed chrX:0-100 to x_0_100, while names outside the overlap map fell back to canon_locus and kept case (X_0_100). The same chromosome could come out two ways, and case-sensitive chromosome matching downstream silently missed X, Y and M. The parser also split from the left, so contig names carrying '_' or '-' stopped being loci; on a Mixed axis they then went through the gene rule and distinct contig peaks could collapse into one row. The locus grammar and its key now come from legume-genomic-types (coordinates::parse_interval, PeakCoord::locus_key), the one owner: - keys are chr_start_end with "chr" dropped and case kept, on the overlap map, its fallback, Locus without merging, and Mixed alike; - contig names keep their '_' and '-' and round-trip through the key; - an empty interval (start == end) is no longer a locus; - a non-locus name on a Locus axis passes through unchanged; - the fragments builder's chromosome key reuses chr_stripped. parse_locus keeps its signature. Release 0.6.24.
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.
Problem
parse_locuslowercased the whole row name, so auto-detectedLocus { merge_overlapping: true }andMixedalignment (e.g.read_data_on_shared_rows) renamedchrX:0-100tox_0_100. Names outside the overlap map fell back tocanon_locus, which keeps case (X_0_100), so one chromosome could come out two ways, and case-sensitive chromosome matching downstream silently missed X, Y and M.The parser also split from the left, so contig names carrying
_or-stopped being loci. On aMixedaxis those then went through the gene rule, and distinct contig peaks could collapse into one row.Change
The locus grammar and its canonical key now come from legume-genomic-types 0.4.6 (
coordinates::parse_interval,PeakCoord::locus_key), the single owner of the grammar.{chr}_{start}_{end}withchrdropped and case kept, on every path: the overlap map, its fallback,Locuswithout merging, andMixed._and-and round-trip through the key.Mixedper-name dispatch lives in one helper shared bycanonicalizeandbuild_mixed_kind_canonicalizer.chr_strippedinstead of a local copy.parse_locuskeeps its signature.Behaviour changes (patch release 0.6.24)
x_…becomesX_…). Outputs or models stored with the old lowercase names will not match these rows by case-sensitive lookup.start == end) is no longer treated as a locus.Locusaxis now passes through unchanged instead of being separator-folded.Tests
X_0_100(fails before this change)._parse and round-trip; contig peaks stay distinct loci on aMixedaxis.