Repository navigation
Download a PSM's spectrum as SVG - #104
Open
t0mdavid-m wants to merge 2 commits into
Open
t0mdavid-m wants to merge 2 commits into
t0mdavid-m wants to merge 2 commits into
Conversation
The mirrored spectrum (measured against the AlphaPeptDeep prediction) gets OpenMS-Insight's "Download as SVG" button, which saves a standalone, editable vector file named e.g. PEPTIDEK_2+_scan1234.svg. Modifications in the name become hyphens and other characters a file system might reject are dropped (svg_name, with tests). The button is in openms-insight main, not yet on PyPI, so requirements.txt installs the same development build as the table filter menu PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the MS2 spectrum of a peptide-spectrum match, the measured spectrum mirrored against the AlphaPeptDeep prediction, could only be saved as a PNG through the plot's camera button. A PNG can't be edited or scaled for a figure.
After: the plot's toolbar has a "Download as SVG" button. It saves a standalone, editable vector file, named after the match, e.g.
VVDVLDSIK_2+_scan52580.svg, with both spectra, the ion labels and the axes. It appears on every page that shows a PSM spectrum.How: OpenMS-Insight's
MirrorPlotgained the button and ansvg_filenameoption in Insight #29.show_spectrumpassessvg_name(peptide, charge, scan). Modifications in the name become hyphens, e.g.PEPM-Oxidation-TIDEK_3+_scan7, and characters a file system might reject are dropped. Insight #29 is on Insight main but not yet on PyPI, sorequirements.txtinstalls the same development build of Insight main as #81. The two pins are identical, so the PRs merge cleanly in either order. Before an app release, the pin should go back to the next PyPI version.When AlphaPeptDeep is not installed, the page shows the plain annotated spectrum (Insight
LinePlot). That plot has no SVG button yet; that would be a separate Insight change.Checked:
tests/test_spectrum_svg_name.py, 3 tests: a plain peptide, modification brackets and parentheses, and unsafe characters.py_compilepasses on the content pages, and pylint errors-only is clean on the changed files.VVDVLDSIK_2+_scan52580.svg, which opens as the full mirrored spectrum shown below.Video (mp4): https://raw.githubusercontent.com/OpenMS/quantms-web/claude/media-spectrum-svg/spectrum-svg.mp4 · The SVG itself: https://raw.githubusercontent.com/OpenMS/quantms-web/claude/media-spectrum-svg/VVDVLDSIK_2plus_scan52580.svg
Generated by Claude Code