Browse Source

Merge branch 'master' into dev-sb-v2

# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	package.json
#	src/viewer/helpers/preset.ts
#	src/viewer/helpers/selection.ts
#	src/viewer/index.html
Sebastian Bittrich 3 năm trước cách đây
mục cha
commit
593b94dd4b
4 tập tin đã thay đổi với 322 bổ sung129 xóa
  1. 8 0
      CHANGELOG.md
  2. 17 4
      src/viewer/helpers/preset.ts
  3. 6 0
      src/viewer/helpers/selection.ts
  4. 291 125
      src/viewer/index.html

+ 8 - 0
CHANGELOG.md

@@ -18,6 +18,14 @@
   - The loading configuration includes an optional trajectory preset provider `TrajectoryHierarchyPresetProvider`
 - Remove `alignMotif` methods (& pecos-integration) as the strucmotif service now reports RMSD and transformations for all hits
 
+## [1.9.3] - 2021-10-18
+### Bug fixes
+- Rewire index parameter of symmetry preset
+
+## [1.9.2] - 2021-10-15
+### Bug fixes
+- removed implicit 'chain-mode', must be explicitly requested by setting 'extendToChain' to true as part of the part
+
 ## [1.9.1] - 2021-10-14
 ### Bug fixes
 - More robust 'chain-mode' check in feature preset

+ 17 - 4
src/viewer/helpers/preset.ts

@@ -41,6 +41,11 @@ import {
     toRange
 } from './selection';
 import { RcsbSuperpositionRepresentationPreset } from './superpose/preset';
+import {
+    AssemblySymmetryDataProvider,
+    AssemblySymmetryProvider
+} from 'molstar/lib/extensions/rcsb/assembly-symmetry/prop';
+import { Task } from 'molstar/lib/mol-task';
 
 type BaseProps = {
     assemblyId?: string
@@ -228,8 +233,16 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
             representation = await plugin.builders.structure.representation.applyPreset<any>(structureProperties!, RcsbSuperpositionRepresentationPreset, params);
         } else if (p.kind === 'validation') {
             representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, ValidationReportGeometryQualityPreset);
-        } else if (p.kind === 'symmetry') {
-            representation = await plugin.builders.structure.representation.applyPreset<any>(structureProperties!, AssemblySymmetryPreset, { symmetryIndex: p.symmetryIndex });
+        } else if (p.kind === 'symmetry' && structure?.obj) {
+            const data = structure!.obj.data;
+            if (!AssemblySymmetryDataProvider.get(data).value) {
+                await plugin.runTask(Task.create('Assembly Symmetry', async runtime => {
+                    const propCtx = { runtime, assetManager: plugin.managers.asset };
+                    await AssemblySymmetryDataProvider.attach(propCtx, data);
+                    await AssemblySymmetryProvider.attach(propCtx, data, { symmetryIndex: p.symmetryIndex });
+                }));
+            }
+            representation = await plugin.builders.structure.representation.applyPreset<any>(structureProperties!, AssemblySymmetryPreset);
 
             ViewerState(plugin).collapsed.next({
                 ...ViewerState(plugin).collapsed.value,
@@ -258,8 +271,8 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
 
         if ((p.kind === 'feature' || p.kind === 'feature-density') && structure?.obj) {
             let loci = targetToLoci(p.target, structure!.obj.data);
-            // if target is only defined by chain: then don't force first residue
-            const chainMode = Object.keys(p.target).length === 1 && !!p.target.labelAsymId;
+            // if requested: then don't force first residue
+            const chainMode = !!p.target.extendToChain;
             // HELP-16678: check for rare case where ligand is not present in requested assembly
             if (loci.elements.length === 0 && !!p.assemblyId) {
                 // switch to Model (a.k.a. show coordinates independent of assembly)

+ 6 - 0
src/viewer/helpers/selection.ts

@@ -33,6 +33,12 @@ export type Target = {
      * the source CIF file.
      */
     readonly structOperId?: string
+    /**
+     * Extend selection to whole chain, by default only the first residue is selected. This is used by the
+     * oligoInteraction preset in rcsb-sierra, which should focus the whole oligo chain. Not wanted for the
+     * ligandInteraction preset, which would otherwise focus alternative conformations and symmetry mates.
+     */
+    readonly extendToChain?: boolean
 }
 
 export type SelectBase = {

+ 291 - 125
src/viewer/index.html

@@ -175,130 +175,281 @@
                         }
                     }
                 },
-                // {
-                //     id: '1LTI',
-                //     info: 'medium: local symmetry (C5)'
-                // },
-                // {
-                //     id: '1QO1',
-                //     info: 'medium: C-alpha only, local symmetries (C10, C3)'
-                // },
-                // {
-                //     id: '6V9Q',
-                //     info: 'medium: local symmetries (H, C2)'
-                // },
-                // {
-                //     id: '6R6B',
-                //     info: 'medium: local symmetries (H x2)'
-                // },
-                // {
-                //     id: '2VTU',
-                //     info: 'medium: octahedral symmetry (O)'
-                // },
-                // {
-                //     id: '4NWP',
-                //     info: 'medium: tetrahedral symmetry (T)'
-                // },
-                // {
-                //     id: '1RB8',
-                //     info: 'medium-large: small virus capsid, icosahedral symmetry (I)'
-                // },
-                // {
-                //     id: '6QVK',
-                //     info: 'large: The cryo-EM structure of bacteriophage phi29 prohead (C5)'
-                // },
-                // {
-                //     id: '5Y6P',
-                //     info: 'large: Structure of the phycobilisome from the red alga Griffithsia pacifica'
-                // },
-                // {
-                //     id: '6O2S',
-                //     info: 'large: Deacetylated Microtubules (H)'
-                // },
-                // {
-                //     id: '5MQ7',
-                //     info: 'large: Structure of AaLS-13'
-                // },
-                // {
-                //     id: '5IV5',
-                //     info: 'large: Cryo-electron microscopy structure of the hexagonal pre-attachment T4 baseplate-tail tube complex'
-                // },
-                // {
-                //     id: '3JC8',
-                //     info: 'large: Architectural model of the type IVa pilus machine in a piliated state'
-                // },
-                // {
-                //     id: '4V99',
-                //     info: 'large: The Crystallographic Structure of Panicum Mosaic Virus'
-                // },
-                // {
-                //     id: '3J3Q',
-                //     info: 'large: Atomic-level structure of the entire HIV-1 capsid'
-                // },
-                // {
-                //     id: '6NCL',
-                //     info: 'large: Near-atomic structure of icosahedrally averaged PBCV-1 capsid'
-                // },
-                // {
-                //     id: '6EKC',
-                //     info: 'large: Crystal structure of the BSD2 homolog of Arabidopsis thaliana bound to the octameric assembly of RbcL from Thermosynechococcus elongatus'
-                // },
-                // {
-                //     id: '1M4X',
-                //     info: 'large: PBCV-1 virus capsid, quasi-atomic model'
-                // },
-                // {
-                //     id: '4V5A',
-                //     info: 'large: Structure of the Ribosome Recycling Factor bound to the Thermus thermophilus 70S ribosome with mRNA, ASL-Phe and tRNA-fMet'
-                // },
-                // {
-                //     id: '4UDF',
-                //     info: 'large: STRUCTURAL BASIS OF HUMAN PARECHOVIRUS NEUTRALIZATION BY HUMAN MONOCLONAL ANTIBODIES'
-                // },
-                // {
-                //     id: '6J5K',
-                //     info: 'Cryo-EM structure of the mammalian ATP synthase tetramer bound with inhibitory protein IF1'
-                // },
-                // {
-                //     id: '6RVV',
-                //     info: 'Structure of left-handed protein cage consisting of 24 eleven-membered ring proteins held together by gold (I) bridges.'
-                // },
-                // {
-                //     id: '6EK5',
-                //     info: 'Near-atomic resolution structure of a plant geminivirus determined by electron cryo-microscopy'
-                // },
-                // {
-                //     id: '4V93',
-                //     info: 'Fitted coordinates for Lumbricus terrestris hemoglobin cryo-EM complex'
-                // },
-                // {
-                //     id: '5VLZ',
-                //     info: 'Backbone model for phage Qbeta capsid'
-                // },
-                // {
-                //     id: '5XTI',
-                //     info: 'Cryo-EM architecture of human respiratory chain megacomplex-I2III2IV2'
-                // },
-                // {
-                //     id: '6BY7',
-                //     info: 'Folding DNA into a lipid-conjugated nano-barrel for controlled reconstitution of membrane proteins'
-                // },
-                // {
-                //     id: '6C50',
-                //     info: 'Cross-alpha Amyloid-like Structure alphaAmS'
-                // },
-                // {
-                //     id: '6K3I',
-                //     info: 'Salmonella hook in curved state - 66 subunit models'
-                // },
-                // {
-                //     id: '1UNO',
-                //     info: 'Crystal structure of a d,l-alternating peptide. Double-starnded helix from beta-sheets.'
-                // },
-                // {
-                //     id: '1GRM',
-                //     info: 'REFINEMENT OF THE SPATIAL STRUCTURE OF THE GRAMICIDIN A TRANSMEMBRANE ION-CHANNEL. Single-starnded helix from beta-sheet. NMR structure.'
-                // },
+                {
+                    id: '1LTI',
+                    info: 'medium: local symmetry (C5)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '1QO1',
+                    info: 'medium: C-alpha only, local symmetries (C10, C3)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6V9Q',
+                    info: 'medium: local symmetries (H, C2)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6R6B',
+                    info: 'medium: local symmetries (H x2)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '2VTU',
+                    info: 'medium: octahedral symmetry (O)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '4NWP',
+                    info: 'medium: tetrahedral symmetry (T)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '1RB8',
+                    info: 'medium-large: small virus capsid, icosahedral symmetry (I)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6QVK',
+                    info: 'large: The cryo-EM structure of bacteriophage phi29 prohead (C5)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '5Y6P',
+                    info: 'large: Structure of the phycobilisome from the red alga Griffithsia pacifica',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6O2S',
+                    info: 'large: Deacetylated Microtubules (H)',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '5MQ7',
+                    info: 'large: Structure of AaLS-13',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '5IV5',
+                    info: 'large: Cryo-electron microscopy structure of the hexagonal pre-attachment T4 baseplate-tail tube complex',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '3JC8',
+                    info: 'large: Architectural model of the type IVa pilus machine in a piliated state',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '4V99',
+                    info: 'large: The Crystallographic Structure of Panicum Mosaic Virus',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '3J3Q',
+                    info: 'large: Atomic-level structure of the entire HIV-1 capsid',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6NCL',
+                    info: 'large: Near-atomic structure of icosahedrally averaged PBCV-1 capsid',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6EKC',
+                    info: 'large: Crystal structure of the BSD2 homolog of Arabidopsis thaliana bound to the octameric assembly of RbcL from Thermosynechococcus elongatus',
+                    props: {
+                        assemblyId: '1'
+                    }
+                },
+                {
+                    id: '1M4X',
+                    info: 'large: PBCV-1 virus capsid, quasi-atomic model',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '4V5A',
+                    info: 'large: Structure of the Ribosome Recycling Factor bound to the Thermus thermophilus 70S ribosome with mRNA, ASL-Phe and tRNA-fMet',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '4UDF',
+                    info: 'large: STRUCTURAL BASIS OF HUMAN PARECHOVIRUS NEUTRALIZATION BY HUMAN MONOCLONAL ANTIBODIES',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6J5K',
+                    info: 'Cryo-EM structure of the mammalian ATP synthase tetramer bound with inhibitory protein IF1',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6RVV',
+                    info: 'Structure of left-handed protein cage consisting of 24 eleven-membered ring proteins held together by gold (I) bridges.',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6EK5',
+                    info: 'Near-atomic resolution structure of a plant geminivirus determined by electron cryo-microscopy',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '4V93',
+                    info: 'Fitted coordinates for Lumbricus terrestris hemoglobin cryo-EM complex',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '5VLZ',
+                    info: 'Backbone model for phage Qbeta capsid',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '5XTI',
+                    info: 'Cryo-EM architecture of human respiratory chain megacomplex-I2III2IV2',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6BY7',
+                    info: 'Folding DNA into a lipid-conjugated nano-barrel for controlled reconstitution of membrane proteins',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6C50',
+                    info: 'Cross-alpha Amyloid-like Structure alphaAmS',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '6K3I',
+                    info: 'Salmonella hook in curved state - 66 subunit models',
+                    props: {
+                        assemblyId: '1'
+                    }
+                },
+                {
+                    id: '1UNO',
+                    info: 'Crystal structure of a d,l-alternating peptide. Double-starnded helix from beta-sheets.',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
+                {
+                    id: '1GRM',
+                    info: 'REFINEMENT OF THE SPATIAL STRUCTURE OF THE GRAMICIDIN A TRANSMEMBRANE ION-CHANNEL. Single-starnded helix from beta-sheet. NMR structure.',
+                    config: {
+                        props: {
+                            assemblyId: '1'
+                        }
+                    }
+                },
                 {
                     id: '1B5F',
                     info: 'oligosaccharide: NATIVE CARDOSIN A FROM CYNARA CARDUNCULUS L.',
@@ -306,7 +457,22 @@
                         props: {
                             kind: 'feature',
                             target: {
-                                labelAsymId: 'E'
+                                labelAsymId: 'E',
+                                extendToChain: true
+                            }
+                        }
+                    }
+                },
+                {
+                    id: '1BCS',
+                    // this should focus on 1 of 2 (!) ARGs in chain G
+                    info: 'ligand: COMPLEX OF THE WHEAT SERINE CARBOXYPEPTIDASE, CPDW-II, WITH THE MICROBIAL PEPTIDE ALDEHYDE INHIBITOR, CHYMOSTATIN, AND ARGININE AT 100 DEGREES KELVIN\n',
+                    config: {
+                        props: {
+                            kind: 'feature',
+                            assemblyId: '1',
+                            target: {
+                                labelAsymId: 'F'
                             }
                         }
                     }