Repository navigation
[FIX] IDFileConverter/PepXMLFile: select pepXML runs by file name, separator-agnostic (#3502) - #10309
Conversation
…parator-agnostic (#3502) IDFileConverter with pepXML input and 'mz_file' failed with "Found no experiment with name" unless the run's 'base_name' ended with exactly the path given: without 'mz_name' the full 'mz_file' path was the experiment name, and PepXMLFile compared it as a raw string suffix. The TPP writes 'base_name' with '/' even on Windows, so native 'C:\...' paths never matched; moved data and OpenMS' own pepXML (file stem only) failed too. The raw suffix was also too loose ('LN1' selected 'L_LN1' and 'H_LN1'). - PepXMLFile::load: the experiment name has to form whole trailing path components of 'base_name', '/' and '\' treated alike. Matching runs with different 'base_name's is an error instead of merging them; the not-found error lists the 'base_name's in the file. Reset lookup_ at the start of load() so the object can be reused after a failed load. - IDFileConverter: without 'mz_name', match the file name of 'mz_file'. - Tests: PepXMLFile_test section with a TPP-style file; TOPP test converting PepXMLFile_test.pepxml with 'mz_file' only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LeAQtCyY6D6UdA1Jb8HGCz
|
Generated by Claude Code |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughPepXML run selection now matches normalized, complete trailing path components and reports missing or ambiguous matches. IDFileConverter uses the mz_file basename when mz_name is empty. Tests cover separator handling, partial matches, ambiguity, parser reuse, and conversion. ChangespepXML experiment selection
Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is evident in the reviewed changes; the added coverage exercises the updated pepXML run-selection behavior. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 each path with care, Comment |
|
@claude was this validated on true files |
|
Partly. On real tool output from the repo's test data, the new IDFileConverter against the old matching (pyopenms 3.5.0 loading with the full
The same TPP file with Not covered: the reporter's own files; a TPP file together with its own spectra (the repo has no spectra for the TPP file, so Generated by Claude Code |
…t via mz_file (#3502) THIRDPARTY/SpectrastAdapter_1_output.pep.xml is real SpectraST output whose 'base_name' is the path of the spectra on the machine the search ran on. Converting it with 'mz_file' pointing to the shipped THIRDPARTY/spectra_spectrast.mzXML failed with "Found no experiment with name" before the fix and succeeds now. Uses only files that are already in the repository. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LeAQtCyY6D6UdA1Jb8HGCz
|
Generated by Claude Code |
Description
Fixes #3502.
IDFileConverter -in <file>.pepXML -mz_file <path>failed with "Found no experiment with name ..." whenever the run'sbase_namein the pepXML did not end with exactly the path given as-mz_file:-mz_name, IDFileConverter passed the full-mz_filepath as the experiment name.PepXMLFile::loadthen selected runs with a rawhasSuffix(base_name, experiment_name).The TPP writes
base_namewith/even on Windows (e.g.src/tests/topp/IDFileConverter_10_input.pepXML:c:/Inetpub/...), so a nativeD:\...path, as in the report, could never match. The same happened for moved data and for any-mz_filewith a directory part against OpenMS' own pepXML output, which stores only the file stem (e.g.PepXMLFile_test.pepxmlwith the absolute path ofPepXMLFile_test.mzML). At the same time the raw suffix test was too loose:LN1selected bothL_LN1andH_LN1and merged their PSMs.Changes:
PepXMLFile::load: the experiment name has to form whole trailing path components ofbase_name, with/and\treated alike. A name that matches runs with differentbase_names (e.g. equally named spectra files in different folders) is now an error instead of silently merging them. The not-found error lists thebase_names in the file.lookup_is reset at the start ofload(), so aPepXMLFilecan be reused after a failed load (previously it kept pointing to the caller's destroyed lookup).IDFileConverter: without-mz_name, the run is selected by the file name of-mz_file, sincebase_namerecords where the spectra were at search time, often on another machine.-mz_namecan still give more of the path. Documentation and parameter description updated.Behavior changes to be aware of:
LN1forL_LN1) no longer matches.-mz_file(in different folders), IDFileConverter now stops and asks for-mz_nameinstead of relying on the full path.Tests:
PepXMLFile_testsection with a minimal TPP-style file (light/run1,heavy/run1,light/prerun1): Windows paths, whole-component matching, runs of equally named files, error messages, reusing the object after an error.TOPP_IDFileConverter_2_mz_file: the existingIDFileConverter_2conversion without-mz_name(failed before this change), compared against the same expected output.TOPP_IDFileConverter_2_mz_file_spectrast: real SpectraST output (THIRDPARTY/SpectrastAdapter_1_output.pep.xml, whosebase_nameis the path of the spectra on the machine the search ran on), converted with-mz_filepointing to the shippedTHIRDPARTY/spectra_spectrast.mzXML. It fails with "Found no experiment with name" when IDFileConverter's old default (the full-mz_filepath) is restored.Local validation (Linux, GCC 13, Release, dependencies from conda-forge):
PepXMLFile_test,PepXMLFileMascot_testand all 72TOPP_IDFileConverter_*tests pass (74/74), including the three new ones. The old behavior, checked with pyopenms 3.5.0: on the new class-test file, Windows paths fail whilerun1andun1silently load all three runs;PepXMLFile_test.pepxmlwith the absolute path ofPepXMLFile_test.mzMLfails with "Found no experiment with name".Not included: for unknown enzymes the reader requires
no_cuton<specificity>, although the pepXML schema marks it optional and OpenMS' own writer omits it, so OpenMS cannot read back its own pepXML in that case. That is a separate issue.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01LeAQtCyY6D6UdA1Jb8HGCz
Generated by Claude Code
Summary by CodeRabbit
/and\as equivalent, preventing partial path matches.IDFileConvertercan select a run using themz_filefilename without requiringmz_name. Additional path details can distinguish runs with the same filename.