Repository navigation
[FIX] Guard all-hitless identifications in keep_matching resolution - #10445
Conversation
Return before accessing the winning hit when every identification is hitless. Preserve those identifications and their metadata without moving them to the unassigned list. Leave score-direction selection and default resolution unchanged. Add regression coverage for FeatureMap and ConsensusMap, both score directions, and zero, one or several hitless identifications. Follow-up to #10444.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughWhen the selected winner has no hits, the resolver now preserves the feature’s identifications instead of filtering them. The API documentation describes this behavior, and tests cover both map types and score directions. ChangesHitless Identification Handling
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue is identified. Complete the OpenMS build and class test as normal validation before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. A rabbit checks the hits with care, Comment |
…ow) into the branch Brings in refactor/identificationdata-value-model at 102fa59: develop up to dac9590 and the cherry-picked model commits, which this branch already had. Conflicts keep this branch's later edits (adapter helpers, query order, molecule key, model functions and their tests) together with the PR's own changes (the missing-run message of ProteinRunReferences, DigestedOligo::addEvidence). The format writers run develop's run check on their peptide-identification view. Ports of develop changes to code that this branch moved to identification data: - #10445 (keep_matching with only hitless identifications): the resolution on identification data keeps all identifications of a feature when none has a match, instead of keeping one and making the others unassigned. Develop's test gets the protein run that every identification needs here. - #10453 (FeatureOverlapFilter::mergeCoincidentFeatures, used by ProteomicsLFQ on maps with identification data): the links of merged features move to the kept feature, so their identifications do not become unassigned; removal goes through FeatureMap::eraseFeatures(). New test section. - PeptideAndProteinQuant_test: develop's dotted-file-name section adds the search run, as the other sections do. - IDConflictResolver_3_output.consensusXML: develop's file with this branch's order of the unassigned identifications (the same 17-line move as before; a permutation of develop's file, checked line by line). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
Follow-up to #10444, limited to the remaining all-hitless case in
resolve(..., keep_matching=true).Change
After selecting the best identification, return if its hit list is empty, before reading
getHits()[0]. Both score-ordering comparators prefer an identification with hits whenever one exists, so a hitless winner means that every identification is hitless. No additional scan is needed.In this case the feature's identifications, their order, and their metadata are preserved; none is moved to the unassigned list. Score-direction selection (
peptides[0].isHigherScoreBetter()), default resolution, and mixed-input matching are deliberately unchanged.Regression coverage
Extend
IDConflictResolverAlgorithm_testwith 12 cases coveringFeatureMapandConsensusMap, both score directions, and zero, one, or three hitless identifications. Assert that the identification list remains equal to the input, including metadata, and that the pre-existing unassigned list is preserved (accounting for the existingfeature_id = "not mapped"annotation).Validation
-Wall -Wextra -Werror -pedantic, libstdc++ bounds assertions, AddressSanitizer and UndefinedBehaviorSanitizer: 112 cases / 716 assertions passed (12 new empty/all-hitless cases, the 4 existing mixed-input cases, and 96 matching/permutation cases).Draft pending a real OpenMS build and class-test run. This sandbox cannot resolve
github.comfor a clone and has no existing OpenMS build/SDK, so I could not run the actual project test locally. Required integration validation:cmake --build OpenMS-build --target IDConflictResolverAlgorithm_test -j2 ctest --test-dir OpenMS-build -R '^IDConflictResolverAlgorithm_test$' --output-on-failureRelease note:
IDConflictResolverAlgorithm::resolve(..., true)no longer accesses a missing first hit when all identifications attached to a feature are hitless.Summary by CodeRabbit