feat: script to annotate proteome hits onto winnow outputs#220
Open
JemmaLDaniel wants to merge 4 commits into
Open
feat: script to annotate proteome hits onto winnow outputs#220JemmaLDaniel wants to merge 4 commits into
JemmaLDaniel wants to merge 4 commits into
Conversation
JemmaLDaniel
force-pushed
the
feat-proteome-hit-annotation
branch
from
July 17, 2026 10:44
a20cd15 to
055b975
Compare
JemmaLDaniel
force-pushed
the
feat-proteome-hit-annotation
branch
from
July 17, 2026 10:58
055b975 to
edc01f8
Compare
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
Adds a post-
winnow predictutility that annotates prediction outputs with aproteome_hitcolumn by matching peptides against a reference FASTA proteome.The command drops short peptides (default: fewer than 7 tokeniser residues), strips modifications and normalises I/L for matching, then uses Aho-Corasick substring search. It updates
preds_and_fdr_metrics.csvin place and filtersmetadata.csvto the retained spectra.The resulting
proteome_hitcolumn is designed to feedwinnow diagnose-calibrationviadiagnostics.label_source=precomputed diagnostics.label_column=proteome_hit.Changes
winnow/scripts/annotate_proteome_hits.pyholding the matching logic (FASTA loading, modification stripping, residue tokenisation, batched substring search, folder annotation).winnow annotate-proteome-hitson the main Typer app inwinnow/scripts/main.py, following the existing lazy-import pattern..instanovo.utils.residues.ResidueSet.tokenize.biopythonandpyahocorasickare added as an optionalproteomeextra (pip install 'winnow-fdr[proteome]'), not as core dependencies. Their imports are lazy and guarded, so the base install andwinnow.scripts.mainremain importable without the extra.[proteome]extra added todocs/cli.md.tests/scripts/test_annotate_proteome_hits.pycovering modification stripping, short-peptide filtering, the cross-protein separator guarantee, residue token counting edge cases, and a full folder round-trip.