Repository navigation
Remove duplicate Comet score metavalues in PepXMLFile parser - #9089
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix duplicated comet scores issue
Remove duplicate Comet score metavalues in PepXMLFile parser
Apr 6, 2026
Contributor
|
Adversarial review result: no blocking issue found. The PepXML changes remove duplicate Comet metadata while preserving the remaining score annotations used by the tests. I did not find source-comment tracker references. No build/tests run locally. |
PepXMLFile::startElement stored several Comet scores twice at parse time: once under the canonical MS CV accession (or the canonical COMET:-prefixed key) and again under a redundant, differently-cased duplicate key with the identical value. Remove the six duplicates that are never read anywhere: COMET:xcorr (dup of MS:1002252) COMET:spscore (dup of MS:1002255) COMET:sprank (dup of MS:1002256) COMET:deltacnstar (dup of MS:1002254) Comet:lnrSp (dup of COMET:lnRankSP) Comet:IonFrac (dup of COMET:IonFrac) COMET:deltaCn is intentionally kept: unlike the six above, it is consumed by PercolatorFeatureSetHelper::addCOMETFeatures as a scored feature. That helper only recomputes deltaCn ((xcorr - 2nd_xcorr)/max(1, xcorr)) when the key is absent, so dropping it here would silently switch Percolator's deltaCn feature from Comet's authoritative reported value to an OpenMS approximation, changing rescoring/FDR. This cleanup is intended to be behavior-preserving, so the key stays. Update the reference idXML files (CometAdapter_[1-4,6]_out, Chy_test, IDFileConverter_24_output) to drop the six now-absent duplicate UserParam entries; COMET:deltaCn is preserved throughout. Co-Authored-By: Claude Fable 5 <[email protected]>
timosachsenberg
force-pushed
the
copilot/fix-comet-scores-duplicated
branch
from
July 8, 2026 15:16
6f94cf4 to
a25ebdb
Compare
timosachsenberg
marked this pull request as ready for review
July 8, 2026 15:19
This was referenced Jul 8, 2026
timosachsenberg
added a commit
that referenced
this pull request
Jul 10, 2026
Adds entries for PRs merged in the last couple of days that were missing changelog coverage: the TOPPView precursor-highlighting feature (#9715), the Xerces-C++ PRIVATE-linkage/XMLHandler API change (#9712, which also supersedes a stale note left by the LibSVM PRIVATE-linkage entry), the FragmentMassError variance fix (#9618), the PepXMLFile duplicate Comet metavalue fix (#9089), and the clang/OpenMP and TextExporter USI documentation additions (#9162, #9173). Co-authored-by: Claude <[email protected]>
4 tasks done
5 tasks
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.
PepXMLFile::startElementstored several Comet scores twice at parse time — once under the canonicalMS:CV accession (or the canonicalCOMET:-prefixed key) and again under a redundant, differently-cased duplicate key holding the identical value.Changes
PepXMLFile.cpp— remove the six duplicate metavalues that are never read anywhere in the codebase:COMET:xcorrMS:1002252COMET:spscoreMS:1002255COMET:sprankMS:1002256COMET:deltacnstarMS:1002254Comet:lnrSpCOMET:lnRankSPComet:IonFracCOMET:IonFracCOMET:deltaCnis intentionally kept. Unlike the six above, it is consumed byPercolatorFeatureSetHelper::addCOMETFeaturesas a scored Percolator feature. That helper only recomputes deltaCn ((xcorr - 2nd_xcorr)/max(1, xcorr)) when the key is absent, so removing it here would silently switch Percolator's deltaCn feature from Comet's authoritative reported value to an OpenMS approximation — changing rescoring/FDR. This cleanup is intended to be behavior-preserving, so the key stays. (This corrects the earlier revision of this PR, which removedCOMET:deltaCnand brokePercolatorFeatureSetHelper_test— that test'scomet.topperc_check.idXMLdeltaCn values are Percolator recomputations, not parser duplicates, and must not be deleted.)Test reference idXML files — drop the now-absent duplicate
UserParamentries fromCometAdapter_[1-4,6]_out.idXML,Chy_test.idXML, andIDFileConverter_24_output.idXML.COMET:deltaCnis preserved throughout;comet.topperc_check.idXMLis unchanged.Verification
PepXMLFile_test,PercolatorFeatureSetHelper_test— passTOPP_IDFileConverter_24(+ diff) — pass end-to-endTOPP_CometAdapter_1— freshly generated output has an identical UserParam key structure to the updated reference (residual numeric diffs locally are only the local comet 2023.01 vs reference 2025.01 version mismatch)Rebased onto current
develop(was 521 commits behind; the old Arrow-23 CMake pin no longer configured against system Arrow 24).