Repository navigation
[FIX] ProSE: a search in which no PSM passes the FDR no longer aborts (empty protein-inference graph) - #10677
Merged
Merged
Conversation
…ps instead of an exception When no PSM of a run maps to one of its proteins (e.g. none passed the PSM FDR, which leaves the peptide identifications without hits), the graph of the indistinguishable-group annotation and the greedy resolution is empty and IDBoostGraph throws "Graph empty. Build it first.". ProSE's protein FDR runs this inference, so a search in which no PSM passed the FDR aborted instead of writing empty results. An empty graph has nothing to group or resolve: skip the graph steps; the protein filtering of the resolution runs as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, empty outputs TOPP_ProSE_15_empty: a database whose decoys are the real proteins and whose targets are their reversed sequences, so that no target passes the FDR. One input with the protein FDR (idXML, QPX and OpenMS Parquet, summary YAML) and two inputs with -out_merged: exit code 0, no PSM or protein rows, a valid QPX psm table, a summary without failed files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…skips an empty graph The ConsensusMap overload of run() has the same graph steps as the PeptideIdentification overload and threw "Graph empty. Build it first." on a map whose features and unassigned peptide identifications keep no PSM. Same guard, and a class-test section for it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The same file as the empty-result test of the -out_psm_spectra sidecar (#10676) uses, so that the two branches add one file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
timosachsenberg
marked this pull request as ready for review
October 21, 2026 06:17
Contributor
|
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 2 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 |
timosachsenberg
enabled auto-merge (squash)
October 21, 2026 07:32
jpfeuffer
approved these changes
Oct 21, 2026
jpfeuffer
disabled auto-merge
October 21, 2026 08:25
timosachsenberg
pushed a commit
that referenced
this pull request
Oct 21, 2026
…#10677, ...) Conflicts: - ConsensusMap::appendColumns: develop shifts the map indices of match-between-runs transfers (#10672); the identification data of the branch keeps its own map index shift. - FileTypes: .raw is compressed-readable (#10647); .oms stays a removed format. - CHANGELOG: both entries. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
This was referenced Oct 21, 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.
Bug
A ProSE search in which no PSM passes the PSM FDR aborts when the protein FDR is on:
(exit code 8, no outputs). Example: a TMT run of Erwinia searched against the human reference proteome alone
(
-Search:FDR:PSM 0.01 -Search:FDR:protein 0.01). Such a search (e.g. the wrong database) should report 0 PSMs, as asearch without any PSM already does.
Cause
The PSM FDR filter (
IDFilter::filterHitsByScore) leaves the peptide identifications without hits, so ProSE's!peptide_ids.empty()check passes andProSEAlgorithm::applyCompleteSetProteinFDRrunsBasicProteinInferenceAlgorithm::run. Its indistinguishable-group annotation builds anIDBoostGraphfrom the run;with no PSM mapping to a protein the graph is empty, and
IDBoostGraph::calculateAndAnnotateIndistProteins(IDBoostGraph.cpp:772) throws
MissingInformation("Graph empty. Build it first."). The same happens for the pooledinference of
-out_mergedand withgreedy_group_resolution(clusterIndistProteinsAndPeptidesthrows there).Fix
BasicProteinInferenceAlgorithm::run(both overloads, PeptideIdentification and ConsensusMap) skips the graph stepswhen the graph has no connected component: there is nothing to group or resolve. The rest is unchanged (with resolution, the unreferenced
proteins are still removed and singleton groups filled). ProSE then skips the picked-protein FDR as it already does
when no decoy protein remains, and writes empty outputs with exit code 0.
Why here and not in ProSE: the empty graph is a valid input of the inference (a run without identifications), and the
fix covers every caller (the single-file protein FDR, the
-out_mergedpooling,ProSEAlgorithm::search(), theProteinInference tool on such an idXML or consensusXML).
IDBoostGraphitself keeps throwing on an empty graph, whichannotateIndistinguishableGroups()documents and tests.Tests
BasicProteinInferenceAlgorithm_test: a run whose spectra keep no PSM, and a consensus map whose features andunassigned peptide identifications keep none, each for grouping, grouping + resolution and resolution alone: no
exception, no groups (both fail on develop with the exception above).
TOPP_ProSE_15_empty*: a database whose decoys (DECOY_, reused bydecoys=auto) are the realDatabaseSuitability proteins and whose targets are their reversed sequences, so that no target passes the FDR. One
input with the protein FDR: exit code 0, valid idXML with 0 peptide hits, QPX psm table valid against the schema,
QPX and OpenMS psm/proteins tables without rows, summary YAML with
matched_spectra: 0and no failed file. Twoinputs with
-out_merged: exit code 0, merged idXML with 0 peptide hits, listed in the summary. On develop the twoProSE runs fail (exit code 8; the merged run has already written its summary YAML, without the merged output) and
so do the checks of their outputs; the steps that clean the output folders and copy the inputs pass.
ctest -R "ProSE|ProteinInference|IDBoostGraph": passing.🤖 Generated with Claude Code