Repository navigation
feat: preserve I/L in loader outputs - #248
Open
JemmaLDaniel wants to merge 3 commits into
Open
JemmaLDaniel wants to merge 3 commits into
JemmaLDaniel wants to merge 3 commits into
Conversation
test: update loader tests chore: rename private _normalize_leucine_tokens to public replace_leucine_with_isoleucine refactor: rename flag normalize_leucine to output_leucine_as_isoleucine
docs: rename flag normalize_leucine to output_leucine_as_isoleucine
JemmaLDaniel
marked this pull request as ready for review
October 9, 2026 15:41
BioGeek
approved these changes
Oct 16, 2026
This branch has not been deployed
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.
Summary
Winnow on
mainrewrites every leucine to isoleucine in tokenisedprediction,sequence, and InstaNovo beams at normalisation time.This PR keeps reported token lists faithful to the source by default, applies I/L equivalence only where sequences are compared, and adds an explicit
output_leucine_as_isoleucineswitch to reproduce legacy stored tokens and Koina inputs when needed.What changes
Default behaviour (
output_leucine_as_isoleucine: false)normalize_peptide_cell/finalize_peptide_metadatacanonicalise modifications only;LandIstay as loaded.correct/num_matches:row_num_matchesalways mapsL→Ion copies before_novor_match._beam_edit_distance; stored beam sequences unchanged.tokens_to_proformawith no second I/L pass in feature code.Legacy parity (
output_leucine_as_isoleucine: true)main-styleL→Ion storedprediction,sequence, and InstaNovo beam token lists at load time.Proteome annotation
L→Inormalisation for substring matching soproteome_hitaligns with preserved prediction spelling in metadata.API / config
output_leucine_as_isoleucineon allDatasetLoaderimplementations (Hydra:data_loader.output_leucine_as_isoleucine).replace_leucine_with_isoleucinedocuments comparison-only use.Test plan
L/I; legacy flag rewritesL→Iwithout corrupting mod names.row_num_matches/ finalize: I/L interchangeable for scoring; stored lists unchanged when flag false.Lquery hitsIFASTA (and vice versa) after normalisation.make tests.Migration
output_leucine_as_isoleucine=false(default).data_loader.output_leucine_as_isoleucine=truewhen loading from raw tool outputs; reload existing Winnow dataset dirs without the flag ifmetadata.csv/predictions.pklwere already saved undermain.