Repository navigation
[FIX] Correct RNA terminal fragment and adduct masses - #10515
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Change: Bug fix Merge Risk: ⚪ Minimal · up to RNA fragment and precursor masses and adduct-adjusted mzTab values now match the intended calculations, with targeted regressions. No actionable merge risk is apparent. Pre-merge checks |
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused corrections are consistent with existing mass conventions and have targeted regression coverage.
0 open findings
What changed in this PR
Fixes RNA terminal-fragment, precursor-charge, and adduct-aware mzTab mass calculations.
Changes:
- Includes 5′ modifications in a1-B fragment masses.
- Uses the requested charge for final precursor peaks.
- Adds assigned adduct shifts to RNA mzTab calculated m/z values, with C++ and Python regressions.
| File | Description |
|---|---|
CHANGELOG |
Documents the fixes. |
src/openms/source/CHEMISTRY/NucleicAcidSpectrumGenerator.cpp |
Corrects terminal and precursor masses. |
src/openms/source/METADATA/ID/IdentificationDataConverter.cpp |
Applies RNA adduct mass shifts during mzTab export. |
src/tests/class_tests/openms/source/NucleicAcidSpectrumGenerator_test.cpp |
Tests both polarities and requested charges. |
src/tests/class_tests/openms/source/IdentificationDataConverter_test.cpp |
Tests sodium-adduct mzTab output. |
src/pyOpenMS/tests/unittests/test_rna_terminal_fragment_mass.py |
Tests terminal fragments through pyOpenMS. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Brings in develop up to dac9590 (89 commits since #10446). Conflicts and ports: - #10517 (modification-aware RNA digestion): RNaseDigestion keeps the run digest of this branch next to develop's coordinate-bearing digest, getFragmentPositions, inferCleavageSensitiveMods and digestWithCleavageSensitiveMods. The candidate and evidence merge of the run digest is RNaseDigestion::DigestedOligo::addEvidence, which NucleicAcidSearchEngine also uses: it applies internal fixed modifications before the cleavage and places cleavage-sensitive variable modifications during the digestion, on the database sequences of its run (evidence refers to the unmodified database sequence). A digest input (-digest) uses only the enzyme it records (rna_enzyme) to classify cleavage-sensitive modifications. The m2,2G digestion check and NASEDigestion_test use the owning model and a native digest bundle instead of .oms; bindings keep the run digest and add develop's API. - #10515 (RNA adduct mass): the mzTab export of oligonucleotide matches without a calculated m/z includes the adduct, computed as NucleicAcidSearchEngine does (AdductInfo::getMZ; the adduct of a match is that of the ion). The regression test uses the owning model with the adduct NucleicAcidSearchEngine stores and develop's formula as the expected value. - #10475 (every peptide identification needs its run): the Arrow writers check both the native links and the protein runs; the consensus Parquet loader checks both as well. The adapter reports a missing run with ProteinRunReferences' message. The converter keeps this branch's implementation, which enforces the run contract on import. - FileHandler: imaging includes from #10439; CHANGELOG: both sides. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
Description
RNA theoretical spectra omitted the 5-prime terminal contribution from a1-B, and
getMultipleSpectraused an advanced loop charge for its final precursor peak. This fixes the a1-B mass and uses each requested precursor charge for both m/z and annotation. RNA mzTab export also adds the assigned adduct mass shift before converting mass to m/z.Formula-derived regressions cover both ion polarities and requested precursor charges 2/3, and an assigned sodium-adduct mzTab row. Python tests exercise the terminal fragment through the existing binding; public APIs and defaults are unchanged. This PR is independent of the other NASE changes and targets
develop.Validation: built and passed
NucleicAcidSpectrumGenerator_test,IdentificationDataConverter_test, andNASequence_test; rebuilt pyOpenMS and passed all 13 cases intest_ChemistryBindings.py, including both RNA terminal-fragment polarities, in the Linux Release validation container.Checklist
Summary by CodeRabbit