Repository navigation
Search and filters in the PSM and protein tables' own filter menu - #81
Open
t0mdavid-m wants to merge 10 commits into
Open
t0mdavid-m wants to merge 10 commits into
t0mdavid-m wants to merge 10 commits into
Conversation
The PSM FDR on Configure was a bare number field in percent, easy to misread as a q-value. It now offers 0.1 / 1 / 5 % as quick choices next to the number field and reads the level back as "1 % = keep PSMs with q ≤ 0.01"; at 100 % it says the filter is not applied. The stored parameter (psm-fdr-percent) is unchanged. src/common/fdr_display.py holds the wording so the results pages can reuse it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
Both pages get a filter bar above their table. The PSM table: a search over sequence (any modification form) and proteins, and a q-value threshold that can only tighten the run's PSM FDR; a new q-value column shows Percolator's q-value next to the score. The protein table: search over accession, gene and description, the same q-value threshold (applied to the PSMs, so peptide and PSM counts follow), a minimum of distinct peptides, and "found in at least n replicates of a condition" from the conditions set on Describe experiment. Contaminants are shown or hidden with openms-insight's own toggle in the table's title row (hidden by default on the protein table, shown on the PSM table as before), and the q-value threshold of the PSM table is an insight range filter, so changing it needs no new cache. The filter logic lives in src/common/result_filters.py, without Streamlit. 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.
|
Combine the protein filters with per-sample counts for fractionated runs: "found in n replicates" counts samples, not fractions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
The peptide table of the protein page got extra_key twice (the q-value threshold and the per-sample key), a SyntaxError on that page; key the cache on both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
The separate filter bars above the PSM and protein tables are gone. Each table now filters itself through openms-insight's toolbar search box and filter dialog, on the server, over every row: - PSM table: search over the sequence (OpenMS, label and ProForma forms) and proteins; q-value thresholds in the dialog, the run's own FDR first, then 0.5 / 0.1 / 0.01 %. - Protein table: search over accession, gene and description; "at least" thresholds for peptides (2, 3, 5) and, with conditions, replicates. The filters in force show as removable chips under the table's toolbar. The protein page's key figures count the rows the table's filters leave (Table.export_data with the page's state), so show_insight_table now returns the Table. Dropped: the protein page's q-value threshold applied to the underlying PSMs. It changed peptide and PSM counts, coverage and the linked tables, which a filter on one column of the protein table cannot express. Needs the table options search / search_placeholder / numeric_filters from openms-insight (t0mdavid-m/OpenMS-Insight#32); requirements.txt still pins 0.4.0 until that is released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
Member
Author
|
Three checks are red on 1aaefc8, and none of them needs a code change in this PR:
Generated by Claude Code |
t0mdavid-m
enabled auto-merge
November 3, 2026 15:21
Member
Author
|
fix ci |
…ilter menu openms-insight 0.4.0 predates the Table search box, one-sided numeric filters and filter chips this PR uses (Insight #32, merged at 01df461). Until a release has them, requirements.txt installs a wheel built from Insight main at that commit, with its Vue bundle, from the claude/insight-dev-wheels branch (sha256-pinned). Replace it with the next PyPI release before an app release. 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.
Needs openms-insight with t0mdavid-m/OpenMS-Insight#32 released. That PR adds the table options this one uses (
search,search_placeholder,numeric_filters).requirements.txtstill pinsopenms-insight==0.4.0. After the release, this PR needs one more commit that bumps the pin. Until then,tests/test_sequence_display.py::test_filtered_table_adds_q_values_and_a_filter_menufails against 0.4.0. Everything else passes either way.Before: the PSM and Identified proteins pages only had the Insight Table's per-column filter dialog:
After: each table filters itself, from its own toolbar and filter menu. There is no separate filter bar above it.
M(ox),M[Oxidation]andM(Oxidation)all match) and the protein accessions.replicatescolumn. A fractionated run counts samples, not fractions.toggle_filterscheckbox in each table's title row. It is on by default for proteins and off for PSMs.Dropped: the protein page's PSM q-value threshold. It filtered the PSMs underneath the protein table, so it changed each protein's peptide and PSM counts, its coverage and the linked peptide and PSM tables. A filter on a column of the protein table can't express that. Faking it with a per-protein "best q-value" column would keep proteins whose counts still include PSMs above the threshold, which is misleading. The PSM table keeps its q-value threshold.
How: the search and the thresholds are openms-insight Table options, applied in Python over every row through the table's pagination state. Neither a search nor a threshold builds a new cache.
sequence_display.filtered_table_id()builds one table variant per run and sequence form from the workflow's cached PSM table, as the modification-display variants already do. It addsq_value(read from the idXML inid_idxorder) andnot_contaminant, and declaressearch=[sequence, sequence_display, proforma, protein_accession],numeric_filters={"q_value": ...}andtoggle_filters. The thresholds offered come fromresult_filters.q_suggestions().show_insight_tablewithsearch,numeric_filters(protein_numeric_filters()) andtoggle_filters.show_insight_tablenow returns the Table, so the key figures come fromTable.export_data(state), the rows the viewer's filters leave.src/common/filter_bar.pyis removed. The no-Streamlit logic stays insrc/common/result_filters.py.Video (mp4): https://raw.githubusercontent.com/OpenMS/quantms-web/claude/media-nav/r6-table-menu.mp4
Testing
PYTHONPATH.tests/test_result_filters.pycovers:test_filtered_table_adds_q_values_and_a_filter_menuchecks:id_idx;python -m pytest tests/ test_gui.pywith the openms-insight branch: 363 passed, 2 skipped. With the pinned 0.4.0: the one test named above fails, all others pass.python -m py_compile content/*.py src/common/*.py: clean. pylint--errors-only: only the existing E0611 errors on pyopenms imports.Note: with 4 or more files the protein table folds its per-file columns into the rows (Tabulator's responsive collapse). That happens on
maintoo, and this PR doesn't change it.🤖 Generated with Claude Code
https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk