Repository navigation
[FEATURE,TOPP] FeatureFinderIdentification: remove the external peptide ID path - #9995
Conversation
…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
ef82a0b to
9858b89
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
💤 Files with no reviewable changes (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughFeatureFinderIdentification 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. ChangesFeature identification simplification
Suggested reviewers: Poem
Merge Risk: ⚪ Minimal · up to 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)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. Comment |
|
Imho not used and complicates a lot of the ff code |
|
Happy to add it back if someone complains. |
…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]>
…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]>
…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]>
…#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]>
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:
peptides_ext / proteins_ext arguments
SVM classifier, the SVM-based FDR estimation, the internal/external RT
alignment and the classified-feature filtering
the external path), plus the corresponding members
PeptideRefRTMap map<string, RTMap>
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
run(peptides, proteins, features, seeds, spectra_file)interface.Updates