ProteinStructureView improvements#700
Open
davereinhart wants to merge 3 commits into
Open
Conversation
Query the AlphaFold prediction API with the UniProt ID directly instead of first fetching the UniProt XML entry, parsing out AlphaFoldDB references, and having the user select one. This removes the AlphaFold ID dropdown and its supporting state. - Drop fetchUniprotData, the alphaFoldData computed property, and the alphaFoldData/selectedAlphaFold watchers; the uniprotId watcher now renders the viewer directly. - fetchAlphaFoldCifUrl and render key off uniprotId; the model is matched by entryId AF-<uniprotId>-F1 to disambiguate multi-entry responses (e.g. P42167). - Remove now-unused jquery, FloatLabel, and Select imports and the uniprotData/selectedAlphaFold data fields.# Please enter the commit message for your changes. Lines starting
…riants are completely or partially mapped
The viewer assumed a single canonical AlphaFold model (AF-<id>-F1), which does not exist for proteins over ~2700 aa, so those score sets rendered no structure (and silently errored). When no canonical AlphaFold model is available, fetch experimental (PDBe) and template (SWISS-MODEL) structures from 3D-Beacons and let the user switch between the covering segments via a dropdown. Normal-length proteins keep loading their single AlphaFold model as before. - Overlay heatmap scores on every structure: canonical-numbered models (AlphaFold, SWISS-MODEL) directly, and PDBe experimental structures via their SIFTS UniProt mapping (uniprot_accession selection). Always apply the selection with nonSelectedColor so molstar's per-chain default never shows. - Default to the structure that best covers the scored residues, and re-pick when score data arrives after the structures load. - Map clicked-residue events back to canonical UniProt positions (unp_seq_id) so clicking a residue selects and scrolls to the matching heatmap column on SIFTS-mapped structures. - Contain the dropdown overlay's scroll (overscroll-behavior) so it no longer chains into the molstar viewer, and dispose the previous molstar plugin when switching structures. - Offer only structures overlapping the assayed residues, and always show the segment selector for fragment structures (hidden only for a single full-length AlphaFold model).
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.
This pull request refactors and enhances the
ProteinStructureViewcomponent to support viewing protein structures beyond just AlphaFold, including experimental and template models from PDBe and SWISS-MODEL via 3D-Beacons. The structure selection logic is improved, and the UI is updated to allow users to choose among overlapping models. Additionally, the display of the protein structure button inScoreSetViewis now conditional on the presence of mapped variants.Protein structure viewer enhancements:
ProteinStructureView.vueto support multiple structure sources (AlphaFold, PDBe, SWISS-MODEL) using 3D-Beacons, with logic to fetch, filter, and select structures covering the scored residues. The UI now includes a segment selector when multiple or partial models are available, and the coloring logic is generalized to all structure types. [1] [2] [3] [4] [5] [6] [7] [8]Improved UI logic:
ScoreSetView.vueis now only shown when mapped variants are present and a UniProt ID is available, preventing display when no structure visualization is possible. [1] [2]These changes provide more robust and flexible protein structure visualization, supporting a wider range of use cases and improving the user experience.
Some existing scoresets useful for testing these changes: