Repository navigation
Peptide-level shuffled entrapment with a measured T/E; true FDP re-measured - #237
Merged
Merged
Conversation
build_shuffled_entrap.py shuffled whole proteins, which moves K and R: most entrapment peptides then have no composition- or mass-matched target and the measured FDP comes out low. It also printed a fixed factor of 2. The builder now digests each target protein (cleavage after every K/R as andes trypsin, or --proline-rule), shuffles each peptide with its C-terminal residue fixed (and K/R/P with the proline rule), maps repeated peptides consistently, redraws shuffles that equal a target peptide (I/L folded), and prints the T/E of the database it wrote. It moves next to entrap_common.py; build_databases.sh and the phospho recipe use it and the measured T/E. The T/E k-mer screen now tests every k-mer of a peptide before the substring scan (same result, fewer scans).
Astral, phospho, glyco quick tier and the ProteoBench match-between-runs error control re-measured at 0629cd8 on peptide-level shuffled entrapment (three database realisations, Percolator -Y seeds 42/1/2). Rows not re-measured are marked as measured on the whole-protein shuffle. The identity-decoy estimate tracks the entrapment-measured false-donor share but is not an upper bound.
…rapment # Conflicts: # docs/benchmarks/README.md
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 22, 2026
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.
Fixes #225
Problem
docs/benchmarks/glyco/build_shuffled_entrap.pyshuffled whole proteins. That moves K and R, so most entrapment peptides have no target of the same composition: 89.6% on the HYE database and 91.7% on mouse (cleavage after every K/R, ≤ 2 missed cleavages, 7–40 residues). It also printed a fixed "factor 2 (exactly 1:1)". In peptide space that database has T/E 0.964 (HYE) and 0.971 (mouse), not 1.Change
docs/benchmarks/build_shuffled_entrap.pyreplaces the glyco-folder script; nothing else imported the old one. It builds the entrapment peptide by peptide, following the peptide-level entrapment construction of Wen et al., Nat. Methods 2025:trypsin. With--proline-ruleit does not cut before P and keeps every K, R and P in place.ENTRAP_proteins, deterministic per--seed.entrap_common.py te, never a fixed factor.entrap_common.py: the T/E k-mer screen now checks every k-mer of a peptide before the substring scan. The result is the same; on HYE the run drops from 58 to 16 minutes.build_databases.sh(GLYCO=1mouse database), the phospho recipe (hits counted withentrap_common.py countand the measured T/E instead of "2 × hits") and the reproduce and glyco READMEs are updated.python3 -I docs/benchmarks/tests/test_entrap.py) check:Re-measurement (andes
0629cd8, Percolator 3.7.1-Y, seeds 42/1/2, ALL rule + I/L rescue)Every design uses the same targets, binary and search. Three designs were compared: the old whole-protein shuffle (the databases behind the published numbers), three peptide-level realisations (builder seeds 1/2/3), and reviewed Arabidopsis (UP000006548) as a foreign reference. Each design uses its own measured T/E. FDP at nominal q 0.01 / 0.05, Percolator per seed:
--rescore-native--rescore-nativeWhat this shows:
ProteoBench LFQ, 6 runs, match between runs (one peptide-level database). False-donor share of accepted transfers: entrapment-measured vs identity-decoy estimate.
The identity-decoy estimate still tracks the false-donor share, within about 25%. It is not an upper bound: at transfer q 0.05 it reads about 20% below the peptide-level measurement.
Docs
Numbers changed in this PR:
docs/benchmarks/README.md, Astraldocs/benchmarks/README.md, phosphodocs/benchmarks/README.md, glyco quick tierdocs/benchmarks/README.md, LFQDOCS.md, identity-decoy calibration paragraphDOCS.md, protein tableDOCS.md, subset-max-train noteRows not re-measured are marked "whole-protein shuffle": the glyco deep tier, the compared engine's phospho FDP, and the
--chimeric/--refineFDPs.500-run check of #216 (PXD042233)
All 500 runs were re-searched against human reviewed + contaminants plus a peptide-level shuffled entrapment (T/E 1.065), with one Percolator over all PINs (seed 42,
-Y) and thequantstages at defaults (#216 bagged classifier, finalize seed 42). PSM FDP at q 0.01 is 0.98%.The earlier whole-protein shuffle gave 0.21% measured against 0.27% estimated at q 0.05, so the estimate looked about 25% conservative. On the peptide-level database it reads about 35% low. The full transfer q-value also carries the wrong-peak term, which is more than ten times the identity term at 0.05, so the q-value as a whole still exceeds the measured false-donor share.
DOCS.mdnow states this.