Repository navigation
MzTabFile: read and write colunit metadata as specified by mzTab 1.0 - #10524
Conversation
The column-unit metadata could not be round-tripped:
- the writer emitted "MTD\tcolunit-PSM<value>": the PSM key was upper
case (the specification uses colunit-psm) and no tab separated the key
from the value for any of the four colunit sections;
- the reader expected an index in the key ("colunit[n]-psm"), which the
specification does not have. A specification-conform line therefore
failed with a ConversionError, and an indexed one assigned into the
still empty std::vector, past its end.
Write "MTD\tcolunit-<section>\t<value>" and append one entry per
colunit-<section> line when reading.
Tracked in OpenMS#10148 (X-14), extended to the reader.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is evident from the supplied changes; the PR is mergeable after normal checks. Pre-merge checks |
|
timosachsenberg
left a comment
There was a problem hiding this comment.
Approving. This matches mzTab 1.0.0 (6.2.60–6.2.63): MTD colunit-<section> <column>=<param>, with one line per column and a lower-case section name. The old reader's colunit[ index parsing could never handle spec-conform files.
Non-blocking: please add a CHANGELOG entry.
Generated by Claude Code
…ersion, #10583, #10492, #10525, #10524, #10346, #9782) Conflicts in ConversionHelper and its test: develop removes MapConversion::convert(PeakMap -> ConsensusMap) and moves its peak selection tests to MapAlignmentAlgorithmPoseClustering_test; this branch keeps the identification data handling of the remaining conversions (convertIdentifications() and its test section). FileConverter: develop's comment about OMS input is dropped, as this branch removes .oms. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
The column-unit metadata could not be round-tripped:
MTD\tcolunit-PSM<value>: the PSM key was upper case (the specification usescolunit-psm) and no tab separated the key from the value for any of the four colunit sections;colunit[n]-psm), which the specification does not have. A specification-conform line therefore failed with aConversionError, and an indexed one assigned into the still-emptystd::vector, past its end.Write
MTD\tcolunit-<section>\t<value>and append one entry percolunit-<section>line when reading, matching the one-line-per-column, no-index shape the mzTab 1.0 spec actually uses. The reader's new condition also checksmeta_key_fields.size() == 2before indexingmeta_key_fields[1], removing an unguarded index that the oldhasPrefixcheck didn't protect.Added a regression test (
MzTabFile_test): setscolunit_protein/colunit_psmentries, stores, confirms the written line matches the spec's shape exactly, then reloads and confirms every entry survives in order.Verified in Docker: without the fix, the written line has no tab/wrong case and the written file can't even be read back (
Parse Error); with it, both read and write round-trip correctly.Tracked in #10148 (X-14), extended to the reader.
Summary by CodeRabbit
Bug Fixes
Tests