Repository navigation
Fix ProteomicsLFQ mzTab crash on non-string spectrum_reference - #9519
Conversation
The String->std::string refactor (#9450) made DataValue::operator std::string() strict (throws on non-string types). The PeptideIdentification string accessors getSpectrumReference()/getBaseName()/getExperimentLabel() do `return getMetaValue(...)`, which previously used the lenient String(DataValue) stringification but now hit the strict operator. When spectrum_reference is stored as an integer (e.g. a scan index loaded from idparquet/mzIdentML), ProteomicsLFQ crashed during mzTab export with: "Could not convert non-string DataValue of type 'Int' and value '0' to string" The crash originated in MzTab's CMMzTabStream constructor via getMSRunSpectrumIdentifierType_(), which read spectrum_reference directly into a std::string; getSpectrumReference() (used in the peptide section) would have thrown next. A sibling site was already wrapped with StringUtils::toStr() in #9450, but these were missed. Restore the lenient stringification (the documented StringUtils::toStr replacement for the old String(DataValue) behavior) in the three accessors, and use getSpectrumReference() at the direct mzTab call site. Add a PeptideIdentification regression test for an integer spectrum_reference / base_name.
|
Warning Review limit reached
More reviews will be available in 2 minutes and 15 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
|
@timosachsenberg The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-15 10:57:16.439741187 +0000
+++ AUTHORS.new 2026-06-15 10:57:21.305628110 +0000
@@ -23,8 +23,9 @@
- Chirag Dave
- Chris Bauer
- Chris Bielow
- - Christie Mathews
- Christian Ehrlich
+ - Christie Mathews
+ - Claude
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
The String->std::string refactor (#9450) made DataValue::operator
std::string() strict (throws on non-string types). The PeptideIdentification
string accessors getSpectrumReference()/getBaseName()/getExperimentLabel()
do
return getMetaValue(...), which previously used the lenientString(DataValue) stringification but now hit the strict operator.
When spectrum_reference is stored as an integer (e.g. a scan index loaded
from idparquet/mzIdentML), ProteomicsLFQ crashed during mzTab export with:
"Could not convert non-string DataValue of type 'Int' and value '0' to string"
The crash originated in MzTab's CMMzTabStream constructor via
getMSRunSpectrumIdentifierType_(), which read spectrum_reference directly
into a std::string; getSpectrumReference() (used in the peptide section)
would have thrown next. A sibling site was already wrapped with
StringUtils::toStr() in #9450, but these were missed.
Restore the lenient stringification (the documented StringUtils::toStr
replacement for the old String(DataValue) behavior) in the three accessors,
and use getSpectrumReference() at the direct mzTab call site. Add a
PeptideIdentification regression test for an integer spectrum_reference /
base_name.