Skip to content

[FEATURE,TOPP] FeatureFinderIdentification: remove the external peptide ID path - #9995

Merged
timosachsenberg merged 1 commit into
developfrom
claude/remove-peptide-ids-path-e68ixt
Aug 30, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
claude/remove-peptide-ids-path-e68ixt

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

The "external" ID path was dead in practice: the only in-tree callers
(ProteomicsLFQ, OpenNuXL) always passed empty external ID lists, and the
only test exercising -id_ext (TOPP_FeatureFinderIdentification_2) had
been commented out because it produced platform-dependent results.

Removed:

  • TOPP FeatureFinderIdentification: -id_ext input and its loading
  • FeatureFinderIdentificationAlgorithm::run()/runSingleGroup_():
    peptides_ext / proteins_ext arguments
  • Internal::FFIDAlgoExternalIDHandler (header + source), which held the
    SVM classifier, the SVM-based FDR estimation, the internal/external RT
    alignment and the classified-feature filtering
  • the 'svm:*' parameter section and 'extract:rt_quantile' (both only fed
    the external path), plus the corresponding members
  • the internal/external RTMap pairs: ChargeMap is now map<Int, RTMap> and
    PeptideRefRTMap map<string, RTMap>
  • the "unknown" feature class, the "implied" FFId_category dummy IDs and
    the 'rt_delta' / 'predicted_class' / 'FDR_probabilities' meta values

Behaviour of the remaining (internal-ID) path is unchanged: without
external IDs the RT uncertainty was always 0, the SVM never ran, and
feature filtering already took the non-classified branch.

Callers, the pyOpenMS binding, the QualityControl TOPPAS example and the
CHANGELOG are updated accordingly.

Co-Authored-By: Claude Opus 5 [email protected]
Claude-Session: https://claude.ai/code/session_01KG8a8ypEv66BWWq6Dy8HGh

Summary by CodeRabbit

  • Breaking Changes

    • FeatureFinderIdentification no longer accepts external peptide identifications.
    • SVM-based feature classification, FDR estimation, and related parameters have been removed.
    • Python users must update calls to use the simplified run(peptides, proteins, features, seeds, spectra_file) interface.
  • Updates

    • TOPPAS workflows and dependent tools now use internal identifications only.
    • Feature candidate classification and filtering have been simplified.
    • Quality-control workflow parameters and summary reporting were updated accordingly.

…de ID path

The "external" ID path was dead in practice: the only in-tree callers
(ProteomicsLFQ, OpenNuXL) always passed empty external ID lists, and the
only test exercising -id_ext (TOPP_FeatureFinderIdentification_2) had
been commented out because it produced platform-dependent results.

Removed:
- TOPP FeatureFinderIdentification: -id_ext input and its loading
- FeatureFinderIdentificationAlgorithm::run()/runSingleGroup_():
  peptides_ext / proteins_ext arguments
- Internal::FFIDAlgoExternalIDHandler (header + source), which held the
  SVM classifier, the SVM-based FDR estimation, the internal/external RT
  alignment and the classified-feature filtering
- the 'svm:*' parameter section and 'extract:rt_quantile' (both only fed
  the external path), plus the corresponding members
- the internal/external RTMap pairs: ChargeMap is now map<Int, RTMap> and
  PeptideRefRTMap map<string, RTMap>
- the "unknown" feature class, the "implied" FFId_category dummy IDs and
  the 'rt_delta' / 'predicted_class' / 'FDR_probabilities' meta values

The two peptide counters collapse into a single initialised n_peptides_,
so the uninitialised-member fix from #9993 is preserved; its regression
test is kept as TOPP_FeatureFinderIdentification_summary_count, matched
against the new summary line.

Behaviour of the remaining (internal-ID) path is unchanged: without
external IDs the RT uncertainty was always 0, the SVM never ran, and
feature filtering already took the non-classified branch.

Callers, the pyOpenMS binding, the QualityControl TOPPAS example and the
CHANGELOG are updated accordingly.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KG8a8ypEv66BWWq6Dy8HGh
@timosachsenberg
timosachsenberg force-pushed the claude/remove-peptide-ids-path-e68ixt branch from ef82a0b to 9858b89 Compare August 29, 2026 09:14
@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eaf3fbae-7797-4a1e-acfd-30bba9b16961

📥 Commits

Reviewing files that changed from the base of the PR and between b273e2b and 9858b89.

📒 Files selected for processing (15)
  • CHANGELOG
  • share/OpenMS/examples/TOPPAS/QualityControl.toppas
  • src/openms/include/OpenMS/FEATUREFINDER/FFIDAlgoExternalIDHandler.h
  • src/openms/include/OpenMS/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.h
  • src/openms/include/OpenMS/FEATUREFINDER/sources.cmake
  • src/openms/source/FEATUREFINDER/FFIDAlgoExternalIDHandler.cpp
  • src/openms/source/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.cpp
  • src/openms/source/FEATUREFINDER/sources.cmake
  • src/pyOpenMS/bindings/bind_misc.cpp
  • src/tests/topp/CMakeLists.txt
  • src/tests/topp/FeatureFinderIdentification_2_input.idXML
  • src/tests/topp/FeatureFinderIdentification_2_output.featureXML
  • src/topp/FeatureFinderIdentification.cpp
  • src/topp/OpenNuXL.cpp
  • src/topp/ProteomicsLFQ.cpp
💤 Files with no reviewable changes (5)
  • src/openms/include/OpenMS/FEATUREFINDER/sources.cmake
  • src/openms/include/OpenMS/FEATUREFINDER/FFIDAlgoExternalIDHandler.h
  • src/openms/source/FEATUREFINDER/sources.cmake
  • src/tests/topp/FeatureFinderIdentification_2_input.idXML
  • src/openms/source/FEATUREFINDER/FFIDAlgoExternalIDHandler.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

FeatureFinderIdentification removes external peptide IDs, SVM classification, and SVM-based FDR processing. The algorithm API, internal data structures, TOPP tools, Python bindings, TOPPAS workflow, tests, build files, and changelog now use internal identifications only.

Changes

Feature identification simplification

Layer / File(s) Summary
Algorithm contracts and data structures
src/openms/include/OpenMS/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.h
The run() API now accepts only peptide IDs, protein IDs, features, seeds, and the spectra path. Internal maps, counters, metadata, and helper declarations no longer represent external IDs or SVM state.
Identification processing flow
src/openms/source/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.cpp
Processing uses unified peptide maps, direct RT-window calculation, common feature filtering, and ID-based annotation. External-ID alignment, SVM classification, FDR calculation, and related statistics were removed.
Callers, workflows, bindings, and validation
src/topp/FeatureFinderIdentification.cpp, src/topp/OpenNuXL.cpp, src/topp/ProteomicsLFQ.cpp, src/pyOpenMS/bindings/bind_misc.cpp, share/OpenMS/examples/TOPPAS/QualityControl.toppas, src/tests/topp/CMakeLists.txt, src/openms/.../sources.cmake, CHANGELOG
TOPP tools, Python bindings, and TOPPAS workflows use the reduced API. External-ID and SVM options and tests were removed. The changelog records the breaking changes.

Suggested reviewers: cbielow, copilot

Poem

A rabbit checks the peptide trail

No outside IDs ride the rail
SVM shadows fade from view
One RT map guides the crew
Tests count cleanly, builds align
The feature path now hops in line

Merge Risk: ⚪ Minimal · up to 9858b

The unused external peptide-ID route is removed while the internal identification workflow remains supported and related integrations are updated. No actionable merge-blocking risk remains beyond normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 6 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removal of the external peptide ID path from FeatureFinderIdentification.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 34.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 6 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/remove-peptide-ids-path-e68ixt

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

Imho not used and complicates a lot of the ff code

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

Happy to add it back if someone complains.

@timosachsenberg
timosachsenberg merged commit 1304743 into develop Aug 30, 2026
35 checks passed
@timosachsenberg
timosachsenberg deleted the claude/remove-peptide-ids-path-e68ixt branch August 30, 2026 09:10
pull Bot pushed a commit to matchy233/OpenMS that referenced this pull request Aug 30, 2026
…velop

develop does not compile. Two commits landed in an incompatible order:

- 9858b89 (OpenMS#9995) removed FeatureFinderIdentification's external peptide ID
  path, changing run() to
  run(peptides, proteins, features, seeds, spectra_file);
- c90acf9 ("guard FFId against empty MS data", OpenMS#9980) added a test call
  using the previous seven-argument form, which no longer exists.

Result on develop HEAD:

  FeatureFinderIdentificationAlgorithm_test.cpp:72:26: error: no matching
  function for call to 'OpenMS::FeatureFinderIdentificationAlgorithm::run(...)'

This went unnoticed because the most recent full Build and Test run on develop
predates both merges; everything green since has been cppcheck only.

Drop the two removed arguments from the call. The test's purpose is unchanged
and still holds: run() must throw IllegalArgument when the MS data is empty.
Verified against develop HEAD - the test compiles and passes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
timosachsenberg added a commit that referenced this pull request Aug 30, 2026
…9999)

Hardening plus a boundary test, not a reproduction-driven fix - see below.

statistics_ derives "peptides without features" by subtracting two unsigned
counters. The huge value originally reported in #9999
(13088582122078209 additional external) came from
n_external_peps_ = peptide_map_.size() - internal_seqs.size(), where the two
sides counted different things. That code was removed by #9995 along with the
external peptide ID path, so the reported symptom is no longer reachable: the
remaining subtraction is n_peptides_ - quantified.size(), and every quantified
sequence is by construction a key of peptide_map_.

Guard the remaining subtraction anyway and add a test that pins the reporting
boundary. The test deliberately forces inconsistent counters through a subclass
rather than pretending the state arises naturally, and fails without the guard.

#9999 itself should be closed as fixed by #9995.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
timosachsenberg added a commit that referenced this pull request Aug 30, 2026
…ication loss on parquet read (#10004) (#10012)

* [FIX] PercolatorAdapter: keep a CalcMass that was present in the input (#9997)

The in-process backend removed every PIN-column meta value from each hit after
training, CalcMass included. But CalcMass is not purely an internal PIN column:
it is how a search engine states that a PSM's precursor mass differs from the
mass of its AASequence, and FeatureFinderIdentification consumes it to place a
compensating mass shift before extracting the XIC. OpenNuXL sets it because the
nucleic-acid adduct is not part of the sequence.

PercolatorInfile::stampPinFeaturesOnHits already respected an existing value on
the way in - it only computes one when the hit has none - so the asymmetry was
purely in the cleanup, which stripped by name and could not tell an input value
from one synthesised for training.

Measured on real data (PRIDE PXD048145): 11292 hits carrying CalcMass in, 0 out
on the default path; -use_subprocess true preserved all 11292.

Rather than dropping CalcMass from the strip list - which would leave
percolator's own computed value on every hit that did not have one, changing
output for every other search engine - record per hit which keys the stamping
step actually added, and remove only those. The two backends now agree.

The existing four-argument stampPinFeaturesOnHits() is kept and delegates to the
new overload, so external callers are unaffected.

Verified: with the fix reverted the new TOPP_PercolatorAdapter_CalcMass check
fails; restored, it passes. TOPP_PercolatorAdapter_1_inproc_out is unchanged,
confirming ordinary input still produces identical output.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* [FIX] ProteomicsLFQ: keep CalcMass so FeatureFinderIdentification can use it (#9998)

loadAndCleanupIDFile_ strips nearly all PeptideHit meta values, keeping only
those containing "_score" or "q-value", the Luciphor prefix, target_decoy and
(conditionally) protein_references. CalcMass matched none of them, and
detectRun_ runs the cleanup before ffi.run(), so FeatureFinderIdentification's
CalcMass branch could never fire inside ProteomicsLFQ - even when the input
identifications carried one.

Consequence on real data (PRIDE PXD048145, E. coli UV RNA cross-linking): every
cross-linked peptide was extracted at the free-peptide m/z, hundreds of Da away
from its actual precursor, and reported as if it were the free peptide.

Add CalcMass to the keep list. It is one double per hit, so the "free some
space" rationale is unaffected.

Together with #9997 this restores the whole chain. Re-measured end to end on
PXD048145 through the default (in-process) percolator path: 180 cross-linked
features, 180 of them at the correct mass, against 0 of 33 before.

Verified: with the one-line change reverted the new TOPP_ProteomicsLFQ_CalcMass
check fails; restored, it passes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* [FIX] QPXFile: do not silently drop modifications missing from ModificationsDB (#10004)

Reading a .idparquet bundle discarded any modification whose name is not in
ModificationsDB, returning a peptide hundreds of Da lighter than the one that
was written, with nothing logged. Round-tripping AEADNLDDK(NuXL:U-H2O)K
(1423.5504 Da) gave back AEADNLDDKK (1117.5251 Da).

The file itself was written correctly and still held everything needed to notice:
the peptidoform column, a modifications struct with the name and position, and
calculated_mz. Two paths lost it silently:

- ProForma's ConversionPolicy::BEST_EFFORT is documented to "skip unsupported",
  so an unresolvable modification is dropped by design;
- if the parse threw instead, an empty catch (...) fell through to the plain
  sequence column, which is the unmodified sequence by construction.

Make the loss loud: report conversion issues, replace the empty catch with
handlers that name the peptidoform and the reason, and cross-check the
reconstructed sequence's m/z against the row's own calculated_mz, warning when
they disagree.

This does not make the format carry modification definitions so they could be
registered on load - that is #10003, a separate format design change. Reading
such a file still loses the modification; it just no longer does so in silence.

Verified: with the fix reverted QPXFile_test fails; restored, it passes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* [FIX,TEST] FFId: make the summary statistics incapable of wrapping (#9999)

Hardening plus a boundary test, not a reproduction-driven fix - see below.

statistics_ derives "peptides without features" by subtracting two unsigned
counters. The huge value originally reported in #9999
(13088582122078209 additional external) came from
n_external_peps_ = peptide_map_.size() - internal_seqs.size(), where the two
sides counted different things. That code was removed by #9995 along with the
external peptide ID path, so the reported symptom is no longer reachable: the
remaining subtraction is n_peptides_ - quantified.size(), and every quantified
sequence is by construction a key of peptide_map_.

Guard the remaining subtraction anyway and add a test that pins the reporting
boundary. The test deliberately forces inconsistent counters through a subclass
rather than pretending the state arises naturally, and fails without the guard.

#9999 itself should be closed as fixed by #9995.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* [TEST] Run the CalcMass regression on the in-process backend unconditionally

Review feedback: the #9997 regression was registered inside the
PERCOLATOR_BINARY gate in third_party_tests.cmake, so it silently did not run
in builds without the external percolator - even though the backend under test
is the in-process one, and percolator_executable is explicitly optional
("Required only when -use_subprocess=true; the in-process backend doesn't need
it").

Move the three tests and their helper script out of THIRDPARTY into
src/tests/topp/CMakeLists.txt, drop -percolator_executable, and pass
-use_subprocess false so the backend under test cannot be redirected by the
shared INI.

Verified after reconfigure: the generated test command no longer references
percolator_executable, and all six CalcMass tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* [TEST] Ungate the in-process PercolatorAdapter reference test too

Same defect as the CalcMass regression fixed in cdaf707, in pre-existing
code: TOPP_PercolatorAdapter_1_inproc and its diff sat inside the
PERCOLATOR_BINARY gate in third_party_tests.cmake and passed
-percolator_executable, although the in-process backend needs neither. In a
build without the external percolator the reference test for the default
backend silently did not run.

Move both tests to src/tests/topp/CMakeLists.txt, drop
-percolator_executable, and pass -use_subprocess false explicitly. The
subprocess tests stay behind the gate, which is where they belong.

The shared FuzzyDiff whitelist is hoisted above the gate so it is defined for
both the ungated in-process tests and the gated subprocess ones; verified in
the generated CTestTestfile that the in-process diff still receives the full
whitelist, identical to the subprocess diff.

Result: 15/16 PercolatorAdapter tests pass; the one failure is the
pre-existing environmental TOPP_PercolatorAdapter_1_subprocess_out (external
percolator numerics).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
timosachsenberg added a commit that referenced this pull request Aug 31, 2026
…#10014)

Adds entries for PRs merged after the last CHANGELOG update (#9995,
#10009, #10010, #10012) that were not yet reflected in the file, and
fills in missing PR references on the FeatureFinderIdentification
external-path removal. Also rewrites the NSIS Cfg_Settings.nsh entry,
whose previously documented fix (#9978, #9991) turned out to be
insufficient and was superseded by the definitive fix in #10009.

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants