Repository navigation
Preserve current NASE input and score references when loading digests - #10909
Conversation
…ches Co-authored-by: OpenAI Codex (GPT-6) <[email protected]>
|
Looks good. |
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
timosachsenberg
left a comment
There was a problem hiding this comment.
AI-generated initial review
This is an automated, AI-generated first review. It looks only for high- and medium-priority issues (no nits) and checks whether the PR has tests and measurements. Please double-check anything before acting on it; a maintainer will follow up. I reviewed 294dd354 against develop (65851d70). The PR's base is b6341626; it merges cleanly into the current develop.
What I ran:
-
Build: current develop with the whole NASE stack merged on top (#10909–#10913, which merge cleanly). Release, Linux, GCC 13.3,
OPENMS_USE_VCPKG=OFFwith system packages (Arrow 24 from the Apache apt repo, libxml2 2.15.4 from source), Thermo RAW and OpenTIMS off. -
Tests:
NASEDigestion_test,ModifiedNASequenceGenerator_test,RNASpectrumGraph_test,RNASensitivity_test,SpectrumAnnotator_testand all 15TOPP_NucleicAcidSearchEngine*tests pass. -
CI: Linux (gcc, clang, arm), macOS, wheels and cppcheck pass.
build-and-test (windows-2025, cl.exe)fails before OpenMS itself is compiled: vcpkg'sboost-localeconfigure stops atlibs/locale/CMakeLists.txt:236 (source_group)with CMake 4.5. That is the known runner issue that #10904 fixes, and it has nothing to do with this PR. -
Real data (PXD016328, HAP1 tRNA,
HAP1_tRNA_clone1_rep1, RT 35–39 min, 943 MS2, the target/decoy FASTA from the same PRIDE project):- Settings: RNase T1, 2 missed cleavages, 3 ppm precursor and fragment tolerance, 13 variable modifications (D m1A m5C m7G Cm Gm Um m1G m2G t6A I m5U i6A),
fdr:decoy_pattern DECOY_. - Step 1: a fresh MVH search with
-digest_out. - Step 2: a HyperScore search of a copy of the mzML (
z_replay.mzML, which sorts after the original) with-digest.
develop + #10911 this PR (whole stack) idXML score_typeMVH score(but the values are HyperScores)hyperscoreq-values none: 0 spectra have one, because FDR looks up hyperscore611 spectra OSM spectra_refall 4,309 rows point to ms_run[1], the digest producer's fileall point to ms_run[2], the searched filetarget PSMs at q ≤ 1 / 5 / 10 % 0 / 0 / 0 109 / 143 / 154 - The PR's cached search reproduces the fresh HyperScore search: the NUC/OLI/OSM rows are identical once
ms_run[2]is mapped toms_run[1].
- Settings: RNase T1, 2 missed cleavages, 3 ppm precursor and fragment tolerance, 13 variable modifications (D m1A m5C m7G Cm Gm Um m1G m2G t6A I m5U i6A),
Verdict:
- High priority: none.
- Medium priority: none.
- Checked and fine:
- Why develop picked the wrong entries:
ScoreTypesorts by CV accession first. Both search scores have an empty accession, so"MVH score"sorts before"hyperscore".getScoreTypes().begin()therefore returned the cached MVH type whenever the digest came from an MVH run.InputFilesare ordered by name, so a cached input file that sorts first won the same way. - The refs stay valid:
OMSFile::loadadds to the existingIdentificationDataand doesn't replace it. The references registered before the load point into node-based containers, so later inserts don't invalidate them.
- Why develop picked the wrong entries:
Outside this PR (for information)
- The digest producer's input file is still listed as
ms_run[1]in the mzTab of a cached search, although no spectrum refers to it. This is pre-existing, and the PR only makes sure observations no longer point there. If it bothers downstream tools, a follow-up could drop input files that no observation references before export.
Tests
- You added: a replay input whose name sorts after the cached one, and cached-vs-fresh checks of score type and value for both HyperScore and MVH. They pass here. I didn't run them against develop, but the real-data replay above shows the develop behaviour they guard against.
- Missing: nothing I would require.
Measurements
- You provided: none (a correctness fix).
- Added above: the real-data replay. It shows the develop failure (no q-values, wrong run) and that the fix reproduces a fresh search exactly.
Description
- The AI use is disclosed, and the commit carries a
Co-authored-by:trailer. The template's confirmation box ("I have read the OpenMS AI Policy, and I understand, have reviewed and tested every change …") is not in the description yet. The description says human review is still pending.
Generated by Claude Code
Written by an AI agent using GPT-6.
Cached input names and score types can sort before the current run's entries. Pass explicitly registered input/score references into post-processing so observations and scores retain their current-run meaning. Check a later-sorting input path and fresh-versus-cached HyperScore/MVH results using the existing search fixture.
Validation: NASEDigestion_test and ModifiedNASequenceGenerator_test pass. This fix is exercised without graph or route candidate modes.
Supersedes the corresponding portion of #10906.
Summary by CodeRabbit