Skip to content

[FEATURE] Add MSP file format support to FileConverter - #8650

Merged
timosachsenberg merged 2 commits into
developfrom
feature/msp-fileconverter-support
Jan 17, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
feature/msp-fileconverter-support

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes

  • Add "msp" to input and output format lists in FileConverter
  • Add MSP output handling case using existing FileHandler infrastructure
  • Update Doxygen documentation to include MSP format
  • Add TOPP tests for MSP conversions (msp→mzML, msp→msp roundtrip)

Test plan

  • Build FileConverter target
  • Run ctest -R FileConverter_30 (MSP to mzML) - passed
  • Run ctest -R FileConverter_31 (MSP roundtrip) - passed
  • Verify output files are valid

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • FileConverter now supports MSP file format for both import and export, including proper handling and metadata annotation.
  • Tests

    • Added automated tests and a fixture to verify MSP-to-mzML conversion and MSP output consistency.
  • Documentation

    • Updated help/documentation to list MSP as a supported input format.

✏️ Tip: You can customize this high-level summary in your review settings.

Enable FileConverter to read and write MSP (NIST spectra library) files.
The MSP format is commonly used for spectral libraries in metabolomics.

Changes:
- Add "msp" to input and output format lists
- Add MSP output handling case using FileHandler
- Update Doxygen documentation
- Add TOPP tests for MSP conversions (msp->mzML, msp->msp)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Added MSP file format support to the FileConverter tool for both input and output, and introduced tests and a fixture to validate MSP reading and writing (two new TOPP tests and an MSP output fixture).

Changes

Cohort / File(s) Summary
Implementation
src/topp/FileConverter.cpp
Added "msp" to accepted input and output formats and implemented MSP output handling with appropriate data-processing annotation.
Tests & Fixtures
src/tests/topp/CMakeLists.txt, src/tests/topp/FileConverter_31_output.msp
Appended two TOPP tests (TOPP_FileConverter_30/30_out, TOPP_FileConverter_31/31_out) for MSP->mzML and MSP round-trip; added expected MSP output fixture with three metabolite entries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibble lines of MSP and code,
Hopping through formats on the road,
FileConverter learns a new song,
Read, write, and tidy—never wrong,
Tiny paws applaud the load. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title '[FEATURE] Add MSP file format support to FileConverter' directly and clearly describes the primary change: adding MSP format support to the FileConverter tool.
Linked Issues check ✅ Passed The PR successfully implements the coding requirements from issue #5048: adding MSP read/write support to FileConverter by including 'msp' in input/output format lists and handling MSP output format using existing FileHandler infrastructure.
Out of Scope Changes check ✅ Passed All changes are within scope: MSP format support in FileConverter, test cases for MSP conversions, and reference output files. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

TODO: tests are missing FuzzyDiff

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for the MSP (NIST spectra library) file format to the FileConverter tool, enabling conversion between MSP and other formats like mzML.

Changes:

  • Added "msp" to both input and output format lists in FileConverter
  • Implemented MSP output handling using FileHandler infrastructure
  • Updated Doxygen documentation to include MSP format reference
  • Added two TOPP tests for MSP format conversions (MSP→mzML and MSP roundtrip)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/topp/FileConverter.cpp Added MSP to input/output format lists, implemented MSP output case using FileHandler, and updated Doxygen documentation
src/tests/topp/CMakeLists.txt Added two test cases for MSP format conversion functionality

Comment thread src/tests/topp/CMakeLists.txt Resolved
Address review feedback by adding _out validation tests that compare
conversion outputs against reference files:
- FileConverter_30_out: validates MSP to mzML conversion
- FileConverter_31_out: validates MSP roundtrip (MSP to MSP)

Also adds the required reference output files:
- FileConverter_30_output.mzML
- FileConverter_31_output.msp

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@claude

claude Bot commented Jan 17, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@timosachsenberg
timosachsenberg merged commit 9586485 into develop Jan 17, 2026
@timosachsenberg
timosachsenberg deleted the feature/msp-fileconverter-support branch January 17, 2026 15:15
claude Bot pushed a commit that referenced this pull request Jan 18, 2026
Added 19 missing PRs to OpenMS 3.6.0 changelog:

PyOpenMS:
- #8530: Build system modernization with py-build-cmake
- #8633: SpectrumNativeIDParser wrapper
- #8655: Arrow/Parquet export with DataFrame methods (BREAKING: method renames)
- #8661: Build dependency docs
- #8664: Biosaur2Algorithm wrap-inherits
- #8668: wrap-doc documentation
- #8674: Docstring validation tests

TOPP tools:
- #8643: FileInfo FASTA stats
- #8650: FileConverter MSP support
- #8649: PeakPickerHiRes parameter

OpenMS Library:
- #8633: SpectrumNativeIDParser class
- #8655: ArrowExport helper
- #8651, #8656, #8659, #8660, #8662: Performance optimizations

Fixes:
- #8645: DataArray handling in filters
- #8672: Test file correction
- #8678: UniqueIdGenerator seed collision fix

Build System:
- #8675, #8676: Claude CI workflows

Also reorganized misplaced entries from lines 122-129.

Co-authored-by: Timo Sachsenberg <[email protected]>
timosachsenberg added a commit that referenced this pull request Jan 18, 2026
* Add comprehensive changelog for OpenMS 3.6.0

Includes changes from 96 merged PRs since version 3.5.0:

- General: macOS Intel discontinued, Ubuntu 24.04, notarization in CI
- Dependencies: Autowrap >= 0.26.0, Eigen minimum 3.4.0
- PyOpenMS: Pythonic methods (__len__, __str__, __repr__, __hash__),
  DataFrame support, new wrappers, string handling improvements
- TOPP tools: MapAligner spectra transformation, FileInfo improvements,
  IsobaricWorkflow fixes, SageAdapter thread handling
- OpenMS Library: PeakFileOptions, ParamIterator, SpectrumAnnotator
- Breaking changes: Matrix<T> Eigen decoupling, API renames, FileWatcher move
- Bug fixes: NucleicAcidSearchEngine, LogConfigHandler, decoy generation
- Documentation: Targeted Quantitation, parameter annotations, AGENTS.md
- Build: macOS notarization, Parquet support, pytest fixtures

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* Add missing changelog entries for recently merged PRs

Added 19 missing PRs to OpenMS 3.6.0 changelog:

PyOpenMS:
- #8530: Build system modernization with py-build-cmake
- #8633: SpectrumNativeIDParser wrapper
- #8655: Arrow/Parquet export with DataFrame methods (BREAKING: method renames)
- #8661: Build dependency docs
- #8664: Biosaur2Algorithm wrap-inherits
- #8668: wrap-doc documentation
- #8674: Docstring validation tests

TOPP tools:
- #8643: FileInfo FASTA stats
- #8650: FileConverter MSP support
- #8649: PeakPickerHiRes parameter

OpenMS Library:
- #8633: SpectrumNativeIDParser class
- #8655: ArrowExport helper
- #8651, #8656, #8659, #8660, #8662: Performance optimizations

Fixes:
- #8645: DataArray handling in filters
- #8672: Test file correction
- #8678: UniqueIdGenerator seed collision fix

Build System:
- #8675, #8676: Claude CI workflows

Also reorganized misplaced entries from lines 122-129.

Co-authored-by: Timo Sachsenberg <[email protected]>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Timo Sachsenberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow usage of MSP files in more tools

2 participants