Frozen dictionaries: match lowercased locus keys to case-kept rows - #19
Merged
Merged
Conversation
data-beans 0.6.5 to 0.6.23 wrote locus row keys with the chromosome lowercased (x_0_100 for chrX:0-100); 0.6.24 keeps case. A frozen feature dictionary saved from the old keys no longer matched the new rows, so X, Y, M and contig peaks dropped out of a frozen load. After the exact pass, a second pass matches a still-unmatched target row to the unused source row with the same case-folded locus key. Keys come from the shared locus grammar (feature_names::folded_locus_key), so only names that parse as loci take part. A folded key that names more than one source row or more than one target spelling is left unmatched and reported; exact matches are never replaced. The pass is skipped under FeatureNameKind::Exact. Release 0.6.25.
YPARK
added a commit
that referenced
this pull request
Oct 1, 2026
This reverts commit 916ea02 (#19), never published. The fallback matched locus keys with the chromosome case ignored inside the frozen loader, loosening Locus/Mixed matching for every caller, without saying which rows matched which way. Case can tell scaffolds apart in some assemblies. Old dictionaries with lowercased locus keys should be migrated once, explicitly, or retrained; the loader stays strict.
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.
data-beans 0.6.5 to 0.6.23 wrote locus row keys with the chromosome lowercased (
x_0_100forchrX:0-100); 0.6.24 keeps case (X_0_100). A frozen feature dictionary saved from the old keys no longer matched the new rows, so X, Y, M and contig peaks silently dropped out of a frozen load.Change
load_frozen_feature_hostgets a second pass after the exact match:feature_names::folded_locus_key, next tolocus_key), so only names that parse as loci take part.FeatureNameKind::Exact.Tests
Exactskips the fallback.Version 0.6.25.