Repository navigation
Site claims: knockoff sites and site q-values for annotated modification sites (experimental) - #184
Merged
Merged
Conversation
…ion sites Every reference protein's annotated sites (UniProt XML, annotation-file mods, PEFF ModRes) are site claims with a tier. For each, up to --knockoffs knockoff sites carry the same modification on matched unannotated residues: same residue and digestion (a modified K/R blocks cleavage), the next-residue rule, the same motif status (phospho S/T: P at +1, R/K at -3, D/E at +3; phospho Y: D/E at -1..-4; methyl R, deamidated N, hydroxy P: G at +1; N: sequon), another peptide of similar length, at least 5 residues from real sites of that mod. A sites=annotated mod may be placed on them. After rescoring, knockoff-site PSMs estimate the false claims per modification x residue x tier; each site gets a site q-value, and <stem>.sites.tsv lists the accepted ones. PSM q-values are unchanged; knockoff-site placements of restricted mods are not reported.
|
ⓘ 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 47 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 19, 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.
Merged as experimental. Tested afterwards against known sites, it does not control the main error: claiming the wrong modification at the right site. The follow-up plan is in the last section.
Annotated modification sites become claims with their own error control, built the same way as knockoff variants.
Change
Site claims. Every annotated site of a reference protein is a claim ("residue r carries modification M") with a prior tier. Sites come from UniProt XML, annotation-file
modsrows and PEFF\ModRes*keys.Knockoff sites. For each annotated site, up to
--knockoffsknockoff sites carry the same modification on matched residues no annotation names. A knockoff site must have:Terminal sites get none. Knockoff sites are added before decoys are built, so decoys carry them like real sites.
Site q-values. After rescoring, PSMs placing a modification on a knockoff site estimate the false claims, per modification × residue × tier (small tiers pool within their modification and residue). Each annotated site gets a site q-value. A PSM's own q-value is unchanged.
Reporting. Placements on knockoff sites are not reported for a
sites=annotatedmod, because they exist only for the estimate. For an unrestricted mod they stay ordinary PSMs.<stem>.sites.tsvlists the sites whose best PSM passes--fdrand whose site q-value passes--proteoform-fdr.Some knockoff sites are really modified, because site annotation is incomplete. Counting them as false makes the estimate err towards rejecting true claims, never towards accepting false ones.
Measured
Mouse-liver phospho run (PXD007653), reviewed mouse UniProt: 51,906 annotated sites, 42,985 knockoff sites; 31,165 sites had no matching residue.
sites=annotated, no knockoffssites=annotated, knockoffsTested against known sites (fails)
Setup: synthetic PTM peptide pools (PXD009449). Every synthesized K site was claimed with six lysine modifications and every Y site with phospho. Each pool's run was searched separately, so only the pool's own modification is true.
Result: 1,535 sites accepted at site q ≤ 0.05, of which 580 (38%) are false.
Some false labels are probably synthesis side products: the unmodified K pool gives methyl-K PSMs. Acetyl vs trimethyl (0.036 Da) is a real search error either way.
Plan
Report two probabilities per site:
Occupancy: the residue carries a modification, controlled by knockoff sites as here.
Identity: given that it is modified, the probability of each candidate modification (for example acetyl 0.99, trimethyl 0.01). This comes from evidence that separates near-isobaric modifications:
It is calibrated on synthetic pools held out from the validation runs.
The synthetic pools are the test for both probabilities.
Tests