Repository navigation
Previous/Next through the PSM table, and a breadcrumb to the PSM - #82
Closed
t0mdavid-m wants to merge 1 commit into
Closed
t0mdavid-m wants to merge 1 commit into
t0mdavid-m wants to merge 1 commit into
Conversation
On the Peptide-spectrum matches page and under the spectrum on the Identified proteins page, Previous and Next select the PSM one row up or down in the PSM table, in the order the viewer sees it: Insight's Table.export_data applies the linked filters, the range and toggle filters, the column filters and the viewer's sort. The table pages to the new row and the spectrum and sequence views follow it; "PSM i of n" says where it is. On the Identified proteins page a breadcrumb above the spectrum (Proteins › protein › peptide › PSM) names how the PSM was reached, and each part jumps to its section. The filtered PSM table lists the identifier of its index field first in its interactivity, since the table highlights the first row matching the first identifier that has a selection: with "file" first, a PSM selected from elsewhere highlighted the file's first row. show_insight_table now returns the Table it rendered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
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.
Stacked on #81 (it steps through #81's filtered PSM table), which is stacked on #73. Merge those first and GitHub retargets this one.
Before: to look at the next PSM you had to find and click its row in the table. On the Identified proteins page, the spectrum at the bottom didn't say which protein and peptide it was reached from.
After:
Proteins › sp|P00915|CAH1_HUMAN (CA1) › LFQFHFHWGSTNEHGSEHTVDGVK › PSM scan 52107 · B000264…. Each part jumps to its section (protein table, coverage, peptide table).How:
src/common/psm_navigation.pyuses openms-insight 0.4.0's own API.Table.export_data(state_manager.get_all_selections())returns the rows with the same linked filters, range/toggle filters, column filters and sort the table applies. The step then callsStateManager.set_selection()for each of the table's interactivity identifiers, as a click on that row would. No new component was needed. The breadcrumb is a row of anchor links to explicitst.subheader(..., anchor=...)ids.show_insight_tablenow returns theTableit rendered.One fix in openms-insight's behaviour was needed: the Vue table highlights the first row matching the first interactivity identifier that has a selection. The PSM table's identifiers start with
file, so a PSM selected from Python (or from the plot) highlighted the file's first PSM while the spectrum showed the right one. The filtered PSM table from #81 now lists the identifier of its index field (identification→id_idx) first, and the highlight follows. Upstream, the table could match all identifiers, or prefer the index field.Videos (mp4): proteins page, PSM page
Testing
#proteins).tests/test_psm_navigation.py(2 tests): neighbours in the initial order, at both ends, under the viewer's sort (desc m/z), under a linked filter (selected peptide), with float selection values from the browser, and a row the filters hide.python -m pytest tests/ test_gui.py: 324 passed, 1 skipped. pylint--errors-only: only the existing E0611 errors on pyopenms imports.Generated by Claude Code