Implement Binary Spectrum Library Form .msl#2630
Conversation
# Conflicts: # MetaMorpheus/CMD/CMD.csproj # MetaMorpheus/EngineLayer/EngineLayer.csproj # MetaMorpheus/GUI/GUI.csproj # MetaMorpheus/GuiFunctions/GuiFunctions.csproj # MetaMorpheus/TaskLayer/MetaMorpheusTask.cs # MetaMorpheus/TaskLayer/TaskLayer.csproj # MetaMorpheus/Test/Test.csproj
- perf: WriteSpectrumLibrary converted every spectrum to an MSL entry twice (the first materialization was dead code, overwritten before use); convert once and derive the saved entries from that result. - UpdateSpectralLibrary now warns when it skips invalid MSL entries, matching WriteSpectrumLibrary; previously entries could silently vanish from the .msl consumed by search while .msp kept them. - Remove duplicate using directives (EngineLayer.DIA/SpectrumMatch/Util appeared 2-3x after the merge) and revert tab-vs-space indentation churn in DbForTask and ReportProgress. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gcrsvLBgMKmDNpnbM3iE8
- TestWriteSpectrumLibrary: the co-write now emits both a .msp and a .msl; the old assertion grabbed the first SpectralLibrary file (which sorts to the .msl) and failed .Contains(.msp). Assert both formats are present instead. - Add MslSpectralLibraryWriteTests exercising WriteSpectrumLibrary and UpdateSpectralLibrary: both formats are co-written and entries that fail conversion are skipped from the .msl (the warn branch) while the two valid entries round-trip through SpectralLibrary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gcrsvLBgMKmDNpnbM3iE8
Quality summaryThis PR adds the open binary spectral-library format What it does
Verification
Test coverage
Notes for review
Sync, review, fixes, and the added tests were prepared with Claude Code assistance (see the |
Manual unit-test reviewAll 2 unit test(s) added by this PR were reviewed individually by the author (not only by automated/AI-generated checks): 2 approved as written, 0 edited, 0 flagged. This satisfies the author's standing AI-use policy that AI-assisted tests receive human review before relying on them. Recorded 2026-07-11 10:37. |
Align with the published mzLib release used by the .msl work in smith-chem-wisc#2630. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gcrsvLBgMKmDNpnbM3iE8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2630 +/- ##
=======================================
Coverage 93.29% 93.30%
=======================================
Files 196 196
Lines 21320 21340 +20
Branches 3994 3997 +3
=======================================
+ Hits 19891 19911 +20
Misses 893 893
Partials 536 536
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
binary format (.msl) is created, updated and used in search. Binary libraries also visualized in MetaDraw butterfly plots. Presently both msp and msl are co-written.