Repository navigation
Fix empty USI column in TextExporter (resolve MS run from spectra_data) - #9657
timosachsenberg merged 3 commits into
Conversation
… protein run's spectra_data (via merge index) instead of the never-populated per-ID base_name. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01A7Z3YRNpFx521tmdYWib1v
Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01A7Z3YRNpFx521tmdYWib1v
|
@jonasscheid The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-25 04:23:13.103747797 +0000
+++ AUTHORS.new 2026-06-25 04:23:18.098134378 +0000
@@ -61,6 +61,7 @@
- Johannes Veit
- Johannes von Kleist
- Johan Teleman
+ - jonasscheid
- Joshua Charkow
- Juliane Schmachtenberg
- Julianus Pfeuffer |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughTextExporter now resolves USI MS-run names through ChangesTextExporter USI resolution
Sequence Diagram(s)sequenceDiagram
participant TextExporter
participant IdentifierMSRunMapper
participant resolveUSIMSRun
participant PeptideWriteOptions
TextExporter->>IdentifierMSRunMapper: buildUSIMapper_(prot_ids, add_usi)
TextExporter->>resolveUSIMSRun: resolveUSIMSRun(usi_mapper, peptide)
resolveUSIMSRun->>IdentifierMSRunMapper: primary MS run path
IdentifierMSRunMapper-->>resolveUSIMSRun: mapped path or empty
resolveUSIMSRun-->>TextExporter: USI MS-run basename
TextExporter->>PeptideWriteOptions: set usi_ms_run
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Summary
Fixes #8470. The
-id:add_usioption inTextExporteradded aUSIcolumn header but emitted empty values for idXML and consensusXML — the exact formats that issue asked about.Root cause
The USI
ms_runcomponent was sourced fromPeptideIdentification::getBaseName(), which is only ever populated byPepXMLFile. The idXML/consensusXML/featureXML readers never set it, soms_runwas empty, which makes the whole USI invalid andUSI::toString()return"".Fix
Resolve
ms_runfrom the protein run'sspectra_data, selected per identification via the merge index, using the existingIdentifierMSRunMapper— i.e. the same "spectra_data+ merge index" mechanism described in the issue. A smallresolveUSIMSRun()helper keeps abase_namefallback for pepXML-derived inputs, and mapper construction is guarded so export never aborts on degenerate input. Applied to all three identification-bearing input branches (featureXML, consensusXML, idXML).Result
mzspec:PXD000561:run.mzML:scan:2491:DEDEGEAADM[UNIMOD:35]EEY/2Testing
TOPP_TextExporter_10(idXML input + expected output with populated USIs).TOPP_TextExporter_*suite: 23/23 pass; no regressions (behavior is unchanged when-id:add_usiis off, since the mapper is only built then).Usage:
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
idXMLandconsensusXMLfiles, even when per-item metadata is incomplete.Tests