jbrowse-plugin-protein3d 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +3 -9
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/HighlightComponents.d.ts +1 -2
- package/dist/AddHighlightModel/HighlightComponents.js.map +1 -1
- package/dist/AddHighlightModel/ProteinToGenomeClickHighlight.js +4 -3
- package/dist/AddHighlightModel/ProteinToGenomeClickHighlight.js.map +1 -1
- package/dist/AddHighlightModel/ProteinToGenomeHoverHighlight.d.ts +1 -2
- package/dist/AddHighlightModel/ProteinToGenomeHoverHighlight.js +4 -3
- package/dist/AddHighlightModel/ProteinToGenomeHoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/util.js +1 -1
- package/dist/AddHighlightModel/util.js.map +1 -1
- package/dist/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.d.ts +16 -0
- package/dist/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.js +43 -0
- package/dist/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.js.map +1 -0
- package/dist/AlphaFoldConfidenceAdapter/configSchema.d.ts +13 -0
- package/dist/AlphaFoldConfidenceAdapter/configSchema.js +16 -0
- package/dist/AlphaFoldConfidenceAdapter/configSchema.js.map +1 -0
- package/dist/AlphaFoldConfidenceAdapter/index.d.ts +2 -0
- package/dist/AlphaFoldConfidenceAdapter/index.js +11 -0
- package/dist/AlphaFoldConfidenceAdapter/index.js.map +1 -0
- package/dist/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.d.ts +30 -0
- package/dist/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.js +78 -0
- package/dist/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.js.map +1 -0
- package/dist/AlphaMissensePathogenicityAdapter/configSchema.d.ts +13 -0
- package/dist/AlphaMissensePathogenicityAdapter/configSchema.js +16 -0
- package/dist/AlphaMissensePathogenicityAdapter/configSchema.js.map +1 -0
- package/dist/AlphaMissensePathogenicityAdapter/index.d.ts +2 -0
- package/dist/AlphaMissensePathogenicityAdapter/index.js +11 -0
- package/dist/AlphaMissensePathogenicityAdapter/index.js.map +1 -0
- package/dist/LaunchProteinView/components/AlphaFoldDBSearch.js +162 -13
- package/dist/LaunchProteinView/components/AlphaFoldDBSearch.js.map +1 -1
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.js +8 -6
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.js.map +1 -1
- package/dist/LaunchProteinView/components/HelpButton.js +6 -2
- package/dist/LaunchProteinView/components/HelpButton.js.map +1 -1
- package/dist/LaunchProteinView/components/HelpDialog.js +3 -1
- package/dist/LaunchProteinView/components/HelpDialog.js.map +1 -1
- package/dist/LaunchProteinView/components/LaunchProteinViewDialog.js +12 -4
- package/dist/LaunchProteinView/components/LaunchProteinViewDialog.js.map +1 -1
- package/dist/LaunchProteinView/components/MSATable.js +3 -1
- package/dist/LaunchProteinView/components/MSATable.js.map +1 -1
- package/dist/LaunchProteinView/components/ManualUniProtIDEntry.d.ts +8 -0
- package/dist/LaunchProteinView/components/ManualUniProtIDEntry.js +225 -0
- package/dist/LaunchProteinView/components/ManualUniProtIDEntry.js.map +1 -0
- package/dist/LaunchProteinView/components/TranscriptSelector.js +3 -1
- package/dist/LaunchProteinView/components/TranscriptSelector.js.map +1 -1
- package/dist/LaunchProteinView/components/UserProvidedStructure.js +19 -12
- package/dist/LaunchProteinView/components/UserProvidedStructure.js.map +1 -1
- package/dist/LaunchProteinView/components/calculateProteinSequence.js +5 -3
- package/dist/LaunchProteinView/components/calculateProteinSequence.js.map +1 -1
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.d.ts +1 -1
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.js +29 -9
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.js.map +1 -1
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.d.ts +1 -1
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.js +25 -8
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.js.map +1 -1
- package/dist/LaunchProteinView/components/util.js +1 -1
- package/dist/LaunchProteinView/index.js +7 -3
- package/dist/LaunchProteinView/index.js.map +1 -1
- package/dist/ProteinView/{loadStructureFromData.d.ts → addStructureFromData.d.ts} +2 -2
- package/dist/ProteinView/{loadStructureFromData.js → addStructureFromData.js} +3 -8
- package/dist/ProteinView/addStructureFromData.js.map +1 -0
- package/dist/ProteinView/{loadStructureFromURL.d.ts → addStructureFromURL.d.ts} +2 -2
- package/dist/ProteinView/{loadStructureFromURL.js → addStructureFromURL.js} +11 -9
- package/dist/ProteinView/addStructureFromURL.js.map +1 -0
- package/dist/ProteinView/clearSelection.js +1 -1
- package/dist/ProteinView/clearSelection.js.map +1 -1
- package/dist/ProteinView/components/ProteinAlignment.d.ts +2 -2
- package/dist/ProteinView/components/ProteinAlignment.js +37 -26
- package/dist/ProteinView/components/ProteinAlignment.js.map +1 -1
- package/dist/ProteinView/components/ProteinAlignmentHelpButton.d.ts +2 -2
- package/dist/ProteinView/components/ProteinAlignmentHelpButton.js +6 -4
- package/dist/ProteinView/components/ProteinAlignmentHelpButton.js.map +1 -1
- package/dist/ProteinView/components/ProteinAlignmentHelpDialog.js +6 -5
- package/dist/ProteinView/components/ProteinAlignmentHelpDialog.js.map +1 -1
- package/dist/ProteinView/components/ProteinView.js +18 -60
- package/dist/ProteinView/components/ProteinView.js.map +1 -1
- package/dist/ProteinView/components/{Header.js → ProteinViewHeader.js} +29 -12
- package/dist/ProteinView/components/ProteinViewHeader.js.map +1 -0
- package/dist/ProteinView/components/SplitString.d.ts +4 -4
- package/dist/ProteinView/components/SplitString.js +3 -3
- package/dist/ProteinView/components/SplitString.js.map +1 -1
- package/dist/ProteinView/genomeToProtein.d.ts +2 -2
- package/dist/ProteinView/genomeToProtein.js +4 -5
- package/dist/ProteinView/genomeToProtein.js.map +1 -1
- package/dist/ProteinView/highlightResidue.js +2 -2
- package/dist/ProteinView/highlightResidue.js.map +1 -1
- package/dist/ProteinView/launchRemotePairwiseAlignment.d.ts +2 -5
- package/dist/ProteinView/launchRemotePairwiseAlignment.js +7 -3
- package/dist/ProteinView/launchRemotePairwiseAlignment.js.map +1 -1
- package/dist/ProteinView/model.d.ts +492 -160
- package/dist/ProteinView/model.js +62 -246
- package/dist/ProteinView/model.js.map +1 -1
- package/dist/ProteinView/proteinToGenomeMapping.d.ts +6 -6
- package/dist/ProteinView/proteinToGenomeMapping.js +29 -28
- package/dist/ProteinView/proteinToGenomeMapping.js.map +1 -1
- package/dist/ProteinView/selectResidue.js +1 -1
- package/dist/ProteinView/selectResidue.js.map +1 -1
- package/dist/ProteinView/structureModel.d.ts +183 -0
- package/dist/ProteinView/structureModel.js +407 -0
- package/dist/ProteinView/structureModel.js.map +1 -0
- package/dist/ProteinView/useProteinView.d.ts +1 -4
- package/dist/ProteinView/useProteinView.js +3 -15
- package/dist/ProteinView/useProteinView.js.map +1 -1
- package/dist/ProteinView/util.d.ts +3 -3
- package/dist/ProteinView/util.js +8 -6
- package/dist/ProteinView/util.js.map +1 -1
- package/dist/UniProtVariationAdapter/UniProtVariationAdapter.d.ts +15 -0
- package/dist/UniProtVariationAdapter/UniProtVariationAdapter.js +55 -0
- package/dist/UniProtVariationAdapter/UniProtVariationAdapter.js.map +1 -0
- package/dist/UniProtVariationAdapter/configSchema.d.ts +17 -0
- package/dist/UniProtVariationAdapter/configSchema.js +20 -0
- package/dist/UniProtVariationAdapter/configSchema.js.map +1 -0
- package/dist/UniProtVariationAdapter/index.d.ts +2 -0
- package/dist/UniProtVariationAdapter/index.js +11 -0
- package/dist/UniProtVariationAdapter/index.js.map +1 -0
- package/dist/genomeToTranscriptMapping.d.ts +2 -2
- package/dist/genomeToTranscriptMapping.js +3 -3
- package/dist/genomeToTranscriptMapping.js.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js +2506 -1658
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js.map +4 -4
- package/dist/mappings.d.ts +12 -10
- package/dist/mappings.js +7 -7
- package/dist/mappings.js.map +1 -1
- package/dist/mappings.test.js +7 -5
- package/dist/mappings.test.js.map +1 -1
- package/dist/test_data/gene.d.ts +577 -64
- package/dist/test_data/gene.js +1 -1
- package/dist/test_data/gene.js.map +1 -1
- package/package.json +20 -19
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +4 -17
- package/src/AddHighlightModel/HighlightComponents.tsx +1 -3
- package/src/AddHighlightModel/ProteinToGenomeClickHighlight.tsx +17 -14
- package/src/AddHighlightModel/ProteinToGenomeHoverHighlight.tsx +18 -17
- package/src/AddHighlightModel/util.ts +1 -1
- package/src/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.ts +63 -0
- package/src/AlphaFoldConfidenceAdapter/configSchema.ts +21 -0
- package/src/AlphaFoldConfidenceAdapter/index.ts +19 -0
- package/src/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.ts +109 -0
- package/src/AlphaMissensePathogenicityAdapter/configSchema.ts +21 -0
- package/src/AlphaMissensePathogenicityAdapter/index.ts +19 -0
- package/src/LaunchProteinView/components/AlphaFoldDBSearch.tsx +173 -12
- package/src/LaunchProteinView/components/AlphaFoldDBSearchStatus.tsx +8 -6
- package/src/LaunchProteinView/components/HelpButton.tsx +10 -2
- package/src/LaunchProteinView/components/HelpDialog.tsx +6 -1
- package/src/LaunchProteinView/components/LaunchProteinViewDialog.tsx +20 -4
- package/src/LaunchProteinView/components/MSATable.tsx +3 -1
- package/src/LaunchProteinView/components/ManualUniProtIDEntry.tsx +332 -0
- package/src/LaunchProteinView/components/TranscriptSelector.tsx +9 -7
- package/src/LaunchProteinView/components/UserProvidedStructure.tsx +18 -13
- package/src/LaunchProteinView/components/calculateProteinSequence.ts +6 -4
- package/src/LaunchProteinView/components/useLocalStructureFileSequence.ts +28 -9
- package/src/LaunchProteinView/components/useRemoteStructureFileSequence.ts +23 -8
- package/src/LaunchProteinView/components/util.ts +1 -1
- package/src/LaunchProteinView/index.ts +36 -26
- package/src/ProteinView/{loadStructureFromData.ts → addStructureFromData.ts} +2 -8
- package/src/ProteinView/{loadStructureFromURL.ts → addStructureFromURL.ts} +11 -11
- package/src/ProteinView/clearSelection.ts +1 -1
- package/src/ProteinView/components/ProteinAlignment.tsx +51 -35
- package/src/ProteinView/components/ProteinAlignmentHelpButton.tsx +4 -4
- package/src/ProteinView/components/ProteinAlignmentHelpDialog.tsx +15 -11
- package/src/ProteinView/components/ProteinView.tsx +22 -82
- package/src/ProteinView/components/{Header.tsx → ProteinViewHeader.tsx} +44 -23
- package/src/ProteinView/components/SplitString.tsx +8 -8
- package/src/ProteinView/genomeToProtein.ts +5 -9
- package/src/ProteinView/highlightResidue.ts +2 -2
- package/src/ProteinView/launchRemotePairwiseAlignment.ts +6 -3
- package/src/ProteinView/model.ts +75 -287
- package/src/ProteinView/proteinToGenomeMapping.ts +40 -38
- package/src/ProteinView/selectResidue.ts +1 -1
- package/src/ProteinView/structureModel.ts +512 -0
- package/src/ProteinView/useProteinView.ts +2 -19
- package/src/ProteinView/util.ts +20 -9
- package/src/UniProtVariationAdapter/UniProtVariationAdapter.ts +99 -0
- package/src/UniProtVariationAdapter/configSchema.ts +25 -0
- package/src/UniProtVariationAdapter/index.ts +17 -0
- package/src/__snapshots__/mappings.test.ts.snap +224 -224
- package/src/genomeToTranscriptMapping.ts +9 -9
- package/src/index.ts +6 -0
- package/src/mappings.test.ts +7 -5
- package/src/mappings.ts +25 -23
- package/src/test_data/gene.ts +3 -3
- package/dist/ProteinView/components/Header.js.map +0 -1
- package/dist/ProteinView/loadStructureFromData.js.map +0 -1
- package/dist/ProteinView/loadStructureFromURL.js.map +0 -1
- package/dist/ProteinView/useProteinViewClickBehavior.d.ts +0 -8
- package/dist/ProteinView/useProteinViewClickBehavior.js +0 -34
- package/dist/ProteinView/useProteinViewClickBehavior.js.map +0 -1
- package/dist/ProteinView/useProteinViewHoverBehavior.d.ts +0 -6
- package/dist/ProteinView/useProteinViewHoverBehavior.js +0 -31
- package/dist/ProteinView/useProteinViewHoverBehavior.js.map +0 -1
- package/src/ProteinView/useProteinViewClickBehavior.ts +0 -48
- package/src/ProteinView/useProteinViewHoverBehavior.ts +0 -44
- /package/dist/ProteinView/components/{Header.d.ts → ProteinViewHeader.d.ts} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { Region as IRegion } from '@jbrowse/core/util/types';
|
|
2
|
+
import { Instance } from 'mobx-state-tree';
|
|
3
|
+
import { SimpleFeatureSerialized } from '@jbrowse/core/util';
|
|
4
|
+
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
|
|
5
|
+
import { PairwiseAlignment } from '../mappings';
|
|
6
|
+
import { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
7
|
+
type LGV = LinearGenomeViewModel;
|
|
8
|
+
type MaybeLGV = LGV | undefined;
|
|
9
|
+
type MaybePairwiseAlignment = PairwiseAlignment | undefined;
|
|
10
|
+
type StructureModel = Awaited<ReturnType<PluginContext['builders']['structure']['createModel']>>;
|
|
11
|
+
declare const Structure: import("mobx-state-tree").IModelType<{
|
|
12
|
+
/**
|
|
13
|
+
* #property
|
|
14
|
+
*/
|
|
15
|
+
url: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
16
|
+
/**
|
|
17
|
+
* #property
|
|
18
|
+
*/
|
|
19
|
+
data: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
20
|
+
/**
|
|
21
|
+
* #property
|
|
22
|
+
*/
|
|
23
|
+
connectedViewId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
24
|
+
/**
|
|
25
|
+
* #property
|
|
26
|
+
*/
|
|
27
|
+
pairwiseAlignment: import("mobx-state-tree").IType<MaybePairwiseAlignment, MaybePairwiseAlignment, MaybePairwiseAlignment>;
|
|
28
|
+
/**
|
|
29
|
+
* #property
|
|
30
|
+
*/
|
|
31
|
+
feature: import("mobx-state-tree").IType<SimpleFeatureSerialized | undefined, SimpleFeatureSerialized | undefined, SimpleFeatureSerialized | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* #property
|
|
34
|
+
*/
|
|
35
|
+
userProvidedTranscriptSequence: import("mobx-state-tree").ISimpleType<string>;
|
|
36
|
+
}, {
|
|
37
|
+
/**
|
|
38
|
+
* #volatile
|
|
39
|
+
*/
|
|
40
|
+
model: StructureModel | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* #volatile
|
|
43
|
+
*/
|
|
44
|
+
clickGenomeHighlights: IRegion[];
|
|
45
|
+
/**
|
|
46
|
+
* #volatile
|
|
47
|
+
*/
|
|
48
|
+
hoverGenomeHighlights: IRegion[];
|
|
49
|
+
/**
|
|
50
|
+
* #volatile
|
|
51
|
+
*/
|
|
52
|
+
clickPosition: {
|
|
53
|
+
structureSeqPos: number;
|
|
54
|
+
code: string;
|
|
55
|
+
chain: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* #volatile
|
|
59
|
+
*/
|
|
60
|
+
hoverPosition: {
|
|
61
|
+
structureSeqPos?: number;
|
|
62
|
+
code?: string;
|
|
63
|
+
chain?: string;
|
|
64
|
+
} | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* #volatile
|
|
67
|
+
*/
|
|
68
|
+
pairwiseAlignmentStatus: string;
|
|
69
|
+
/**
|
|
70
|
+
* #volatile
|
|
71
|
+
*/
|
|
72
|
+
structureSequences: string[] | undefined;
|
|
73
|
+
} & {
|
|
74
|
+
/**
|
|
75
|
+
* #action
|
|
76
|
+
*/
|
|
77
|
+
setModel(model: StructureModel): void;
|
|
78
|
+
setSequences(str?: string[]): void;
|
|
79
|
+
} & {
|
|
80
|
+
/**
|
|
81
|
+
* #getter
|
|
82
|
+
*/
|
|
83
|
+
readonly connectedView: MaybeLGV;
|
|
84
|
+
} & {
|
|
85
|
+
/**
|
|
86
|
+
* #action
|
|
87
|
+
*/
|
|
88
|
+
setClickedPosition(arg?: {
|
|
89
|
+
structureSeqPos: number;
|
|
90
|
+
code: string;
|
|
91
|
+
chain: string;
|
|
92
|
+
}): void;
|
|
93
|
+
/**
|
|
94
|
+
* #action
|
|
95
|
+
*/
|
|
96
|
+
setClickGenomeHighlights(r: IRegion[]): void;
|
|
97
|
+
/**
|
|
98
|
+
* #action
|
|
99
|
+
*/
|
|
100
|
+
clearClickGenomeHighlights(): void;
|
|
101
|
+
/**
|
|
102
|
+
* #action
|
|
103
|
+
*/
|
|
104
|
+
setHoverGenomeHighlights(r: IRegion[]): void;
|
|
105
|
+
/**
|
|
106
|
+
* #action
|
|
107
|
+
*/
|
|
108
|
+
clearHoverGenomeHighlights(): void;
|
|
109
|
+
/**
|
|
110
|
+
* #action
|
|
111
|
+
*/
|
|
112
|
+
setHoveredPosition(arg?: {
|
|
113
|
+
structureSeqPos?: number;
|
|
114
|
+
chain?: string;
|
|
115
|
+
code?: string;
|
|
116
|
+
}): void;
|
|
117
|
+
/**
|
|
118
|
+
* #action
|
|
119
|
+
*/
|
|
120
|
+
setAlignment(r?: PairwiseAlignment): void;
|
|
121
|
+
/**
|
|
122
|
+
* #action
|
|
123
|
+
*/
|
|
124
|
+
setAlignmentStatus(str: string): void;
|
|
125
|
+
} & {
|
|
126
|
+
/**
|
|
127
|
+
* #getter
|
|
128
|
+
*/
|
|
129
|
+
readonly structureSeqToTranscriptSeqPosition: Record<string, number> | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* #getter
|
|
132
|
+
*/
|
|
133
|
+
readonly transcriptSeqToStructureSeqPosition: Record<string, number> | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* #getter
|
|
136
|
+
*/
|
|
137
|
+
readonly structurePositionToAlignmentMap: Record<string, number> | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* #getter
|
|
140
|
+
*/
|
|
141
|
+
readonly transcriptPositionToAlignmentMap: Record<string, number> | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* #getter
|
|
144
|
+
*/
|
|
145
|
+
readonly pairwiseAlignmentToTranscriptPosition: Record<number, number> | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* #getter
|
|
148
|
+
*/
|
|
149
|
+
readonly pairwiseAlignmentToStructurePosition: Record<number, number> | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* #getter
|
|
152
|
+
*/
|
|
153
|
+
readonly clickString: string;
|
|
154
|
+
/**
|
|
155
|
+
* #getter
|
|
156
|
+
*/
|
|
157
|
+
readonly hoverString: string;
|
|
158
|
+
/**
|
|
159
|
+
* #getter
|
|
160
|
+
*/
|
|
161
|
+
readonly genomeToTranscriptSeqMapping: {
|
|
162
|
+
g2p: Record<number, number | undefined>;
|
|
163
|
+
p2g: Record<number, number | undefined>;
|
|
164
|
+
refName: string;
|
|
165
|
+
strand: number;
|
|
166
|
+
} | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* #getter
|
|
169
|
+
*/
|
|
170
|
+
readonly structureSeqHoverPos: number | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* #getter
|
|
173
|
+
*/
|
|
174
|
+
readonly exactMatch: boolean;
|
|
175
|
+
readonly zoomToBaseLevel: boolean;
|
|
176
|
+
readonly showHighlight: boolean;
|
|
177
|
+
readonly molstarPluginContext: PluginContext | undefined;
|
|
178
|
+
} & {
|
|
179
|
+
afterAttach(): void;
|
|
180
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
181
|
+
export default Structure;
|
|
182
|
+
export type JBrowsePluginProteinStructureStateModel = typeof Structure;
|
|
183
|
+
export type JBrowsePluginProteinStructureModel = Instance<JBrowsePluginProteinStructureStateModel>;
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { autorun } from 'mobx';
|
|
2
|
+
import { addDisposer, getParent, types } from 'mobx-state-tree';
|
|
3
|
+
import { SimpleFeature, getSession, } from '@jbrowse/core/util';
|
|
4
|
+
// locals
|
|
5
|
+
import { checkHovered, invertMap, toStr } from './util';
|
|
6
|
+
import { launchPairwiseAlignment } from './launchRemotePairwiseAlignment';
|
|
7
|
+
import { genomeToTranscriptSeqMapping, structureSeqVsTranscriptSeqMap, structurePositionToAlignmentMap, transcriptPositionToAlignmentMap, } from '../mappings';
|
|
8
|
+
import { StructureElement, StructureProperties, } from 'molstar/lib/mol-model/structure';
|
|
9
|
+
import { clickProteinToGenome, hoverProteinToGenome, } from './proteinToGenomeMapping';
|
|
10
|
+
import selectResidue from './selectResidue';
|
|
11
|
+
import clearSelection from './clearSelection';
|
|
12
|
+
import highlightResidue from './highlightResidue';
|
|
13
|
+
const Structure = types
|
|
14
|
+
.model({
|
|
15
|
+
/**
|
|
16
|
+
* #property
|
|
17
|
+
*/
|
|
18
|
+
url: types.maybe(types.string),
|
|
19
|
+
/**
|
|
20
|
+
* #property
|
|
21
|
+
*/
|
|
22
|
+
data: types.maybe(types.string),
|
|
23
|
+
/**
|
|
24
|
+
* #property
|
|
25
|
+
*/
|
|
26
|
+
connectedViewId: types.maybe(types.string),
|
|
27
|
+
/**
|
|
28
|
+
* #property
|
|
29
|
+
*/
|
|
30
|
+
pairwiseAlignment: types.frozen(),
|
|
31
|
+
/**
|
|
32
|
+
* #property
|
|
33
|
+
*/
|
|
34
|
+
feature: types.frozen(),
|
|
35
|
+
/**
|
|
36
|
+
* #property
|
|
37
|
+
*/
|
|
38
|
+
userProvidedTranscriptSequence: types.string,
|
|
39
|
+
})
|
|
40
|
+
.volatile(() => ({
|
|
41
|
+
/**
|
|
42
|
+
* #volatile
|
|
43
|
+
*/
|
|
44
|
+
model: undefined,
|
|
45
|
+
/**
|
|
46
|
+
* #volatile
|
|
47
|
+
*/
|
|
48
|
+
clickGenomeHighlights: [],
|
|
49
|
+
/**
|
|
50
|
+
* #volatile
|
|
51
|
+
*/
|
|
52
|
+
hoverGenomeHighlights: [],
|
|
53
|
+
/**
|
|
54
|
+
* #volatile
|
|
55
|
+
*/
|
|
56
|
+
clickPosition: undefined,
|
|
57
|
+
/**
|
|
58
|
+
* #volatile
|
|
59
|
+
*/
|
|
60
|
+
hoverPosition: undefined,
|
|
61
|
+
/**
|
|
62
|
+
* #volatile
|
|
63
|
+
*/
|
|
64
|
+
pairwiseAlignmentStatus: '',
|
|
65
|
+
/**
|
|
66
|
+
* #volatile
|
|
67
|
+
*/
|
|
68
|
+
structureSequences: undefined,
|
|
69
|
+
}))
|
|
70
|
+
.actions(self => ({
|
|
71
|
+
/**
|
|
72
|
+
* #action
|
|
73
|
+
*/
|
|
74
|
+
setModel(model) {
|
|
75
|
+
self.model = model;
|
|
76
|
+
},
|
|
77
|
+
setSequences(str) {
|
|
78
|
+
self.structureSequences = str;
|
|
79
|
+
},
|
|
80
|
+
}))
|
|
81
|
+
.views(self => ({
|
|
82
|
+
/**
|
|
83
|
+
* #getter
|
|
84
|
+
*/
|
|
85
|
+
get connectedView() {
|
|
86
|
+
const { views } = getSession(self);
|
|
87
|
+
return views.find(f => f.id === self.connectedViewId);
|
|
88
|
+
},
|
|
89
|
+
}))
|
|
90
|
+
.actions(self => ({
|
|
91
|
+
/**
|
|
92
|
+
* #action
|
|
93
|
+
*/
|
|
94
|
+
setClickedPosition(arg) {
|
|
95
|
+
self.clickPosition = arg;
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* #action
|
|
99
|
+
*/
|
|
100
|
+
setClickGenomeHighlights(r) {
|
|
101
|
+
self.clickGenomeHighlights = r;
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* #action
|
|
105
|
+
*/
|
|
106
|
+
clearClickGenomeHighlights() {
|
|
107
|
+
self.clickGenomeHighlights = [];
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* #action
|
|
111
|
+
*/
|
|
112
|
+
setHoverGenomeHighlights(r) {
|
|
113
|
+
self.hoverGenomeHighlights = r;
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* #action
|
|
117
|
+
*/
|
|
118
|
+
clearHoverGenomeHighlights() {
|
|
119
|
+
self.hoverGenomeHighlights = [];
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* #action
|
|
123
|
+
*/
|
|
124
|
+
setHoveredPosition(arg) {
|
|
125
|
+
self.hoverPosition = arg;
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* #action
|
|
129
|
+
*/
|
|
130
|
+
setAlignment(r) {
|
|
131
|
+
self.pairwiseAlignment = r;
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* #action
|
|
135
|
+
*/
|
|
136
|
+
setAlignmentStatus(str) {
|
|
137
|
+
self.pairwiseAlignmentStatus = str;
|
|
138
|
+
},
|
|
139
|
+
}))
|
|
140
|
+
.views(self => ({
|
|
141
|
+
/**
|
|
142
|
+
* #getter
|
|
143
|
+
*/
|
|
144
|
+
get structureSeqToTranscriptSeqPosition() {
|
|
145
|
+
return self.pairwiseAlignment
|
|
146
|
+
? structureSeqVsTranscriptSeqMap(self.pairwiseAlignment)
|
|
147
|
+
.structureSeqToTranscriptSeqPosition
|
|
148
|
+
: undefined;
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* #getter
|
|
152
|
+
*/
|
|
153
|
+
get transcriptSeqToStructureSeqPosition() {
|
|
154
|
+
return self.pairwiseAlignment
|
|
155
|
+
? structureSeqVsTranscriptSeqMap(self.pairwiseAlignment)
|
|
156
|
+
.transcriptSeqToStructureSeqPosition
|
|
157
|
+
: undefined;
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* #getter
|
|
161
|
+
*/
|
|
162
|
+
get structurePositionToAlignmentMap() {
|
|
163
|
+
return self.pairwiseAlignment
|
|
164
|
+
? structurePositionToAlignmentMap(self.pairwiseAlignment)
|
|
165
|
+
: undefined;
|
|
166
|
+
},
|
|
167
|
+
/**
|
|
168
|
+
* #getter
|
|
169
|
+
*/
|
|
170
|
+
get transcriptPositionToAlignmentMap() {
|
|
171
|
+
return self.pairwiseAlignment
|
|
172
|
+
? transcriptPositionToAlignmentMap(self.pairwiseAlignment)
|
|
173
|
+
: undefined;
|
|
174
|
+
},
|
|
175
|
+
/**
|
|
176
|
+
* #getter
|
|
177
|
+
*/
|
|
178
|
+
get pairwiseAlignmentToTranscriptPosition() {
|
|
179
|
+
return this.transcriptPositionToAlignmentMap
|
|
180
|
+
? invertMap(this.transcriptPositionToAlignmentMap)
|
|
181
|
+
: undefined;
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* #getter
|
|
185
|
+
*/
|
|
186
|
+
get pairwiseAlignmentToStructurePosition() {
|
|
187
|
+
return this.structurePositionToAlignmentMap
|
|
188
|
+
? invertMap(this.structurePositionToAlignmentMap)
|
|
189
|
+
: undefined;
|
|
190
|
+
},
|
|
191
|
+
/**
|
|
192
|
+
* #getter
|
|
193
|
+
*/
|
|
194
|
+
get clickString() {
|
|
195
|
+
const r = self.clickPosition;
|
|
196
|
+
return r === undefined ? '' : toStr(r);
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* #getter
|
|
200
|
+
*/
|
|
201
|
+
get hoverString() {
|
|
202
|
+
const r = self.hoverPosition;
|
|
203
|
+
return r === undefined ? '' : toStr(r);
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* #getter
|
|
207
|
+
*/
|
|
208
|
+
get genomeToTranscriptSeqMapping() {
|
|
209
|
+
return self.feature
|
|
210
|
+
? genomeToTranscriptSeqMapping(new SimpleFeature(self.feature))
|
|
211
|
+
: undefined;
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* #getter
|
|
215
|
+
*/
|
|
216
|
+
get structureSeqHoverPos() {
|
|
217
|
+
return self.hoverPosition?.structureSeqPos;
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
* #getter
|
|
221
|
+
*/
|
|
222
|
+
get exactMatch() {
|
|
223
|
+
const r1 = self.userProvidedTranscriptSequence.replaceAll('*', '');
|
|
224
|
+
const r2 = self.structureSequences?.[0]?.replaceAll('*', '');
|
|
225
|
+
return r1 === r2;
|
|
226
|
+
},
|
|
227
|
+
get zoomToBaseLevel() {
|
|
228
|
+
// @ts-expect-error
|
|
229
|
+
return getParent(self, 2).zoomToBaseLevel;
|
|
230
|
+
},
|
|
231
|
+
get showHighlight() {
|
|
232
|
+
// @ts-expect-error
|
|
233
|
+
return getParent(self, 2).showHighlight;
|
|
234
|
+
},
|
|
235
|
+
get molstarPluginContext() {
|
|
236
|
+
// @ts-expect-error
|
|
237
|
+
return getParent(self, 2).molstarPluginContext;
|
|
238
|
+
},
|
|
239
|
+
}))
|
|
240
|
+
.actions(self => ({
|
|
241
|
+
afterAttach() {
|
|
242
|
+
// pairwise align transcript sequence to structure residues
|
|
243
|
+
addDisposer(self, autorun(async () => {
|
|
244
|
+
try {
|
|
245
|
+
const { userProvidedTranscriptSequence, structureSequences, exactMatch, } = self;
|
|
246
|
+
const seq1 = userProvidedTranscriptSequence;
|
|
247
|
+
const seq2 = structureSequences?.[0];
|
|
248
|
+
if (!!self.pairwiseAlignment || !seq1 || !seq2) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const r1 = seq1.replaceAll('*', '');
|
|
252
|
+
const r2 = seq2.replaceAll('*', '');
|
|
253
|
+
if (exactMatch) {
|
|
254
|
+
let consensus = '';
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
256
|
+
for (let i = 0; i < r1.length; i++) {
|
|
257
|
+
consensus += '|';
|
|
258
|
+
}
|
|
259
|
+
self.setAlignment({
|
|
260
|
+
consensus,
|
|
261
|
+
alns: [
|
|
262
|
+
{ id: 'seq1', seq: r1 },
|
|
263
|
+
{ id: 'seq2', seq: r2 },
|
|
264
|
+
],
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
const pairwiseAlignment = await launchPairwiseAlignment({
|
|
269
|
+
seq1: r1,
|
|
270
|
+
seq2: r2,
|
|
271
|
+
algorithm: 'emboss_needle',
|
|
272
|
+
onProgress: arg => {
|
|
273
|
+
self.setAlignmentStatus(arg);
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
self.setAlignment(pairwiseAlignment.pairwiseAlignment);
|
|
277
|
+
// showHighlight when we are
|
|
278
|
+
// @ts-expect-error
|
|
279
|
+
getParent(self, 2).setShowHighlight(true);
|
|
280
|
+
// @ts-expect-error
|
|
281
|
+
getParent(self, 2).setShowAlignment(true);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
catch (e) {
|
|
285
|
+
console.error(e);
|
|
286
|
+
// @ts-expect-error
|
|
287
|
+
getParent(self, 2).setError(e);
|
|
288
|
+
}
|
|
289
|
+
}));
|
|
290
|
+
// convert hover over the genome to structure position
|
|
291
|
+
addDisposer(self, autorun(() => {
|
|
292
|
+
const { hovered } = getSession(self);
|
|
293
|
+
const { transcriptSeqToStructureSeqPosition, genomeToTranscriptSeqMapping, connectedView, } = self;
|
|
294
|
+
if (connectedView?.initialized &&
|
|
295
|
+
genomeToTranscriptSeqMapping &&
|
|
296
|
+
checkHovered(hovered)) {
|
|
297
|
+
const { hoverPosition } = hovered;
|
|
298
|
+
const pos = genomeToTranscriptSeqMapping.g2p[hoverPosition.coord];
|
|
299
|
+
const c0 = pos === undefined
|
|
300
|
+
? undefined
|
|
301
|
+
: transcriptSeqToStructureSeqPosition?.[pos];
|
|
302
|
+
if (c0 !== undefined) {
|
|
303
|
+
self.setHoveredPosition({
|
|
304
|
+
structureSeqPos: c0,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}));
|
|
309
|
+
addDisposer(self, autorun(() => {
|
|
310
|
+
const { molstarPluginContext } = self;
|
|
311
|
+
if (molstarPluginContext) {
|
|
312
|
+
const ret = molstarPluginContext.behaviors.interaction.click.subscribe(e => {
|
|
313
|
+
if (StructureElement.Loci.is(e.current.loci)) {
|
|
314
|
+
const loc = StructureElement.Loci.getFirstLocation(e.current.loci);
|
|
315
|
+
if (loc) {
|
|
316
|
+
const pos = StructureProperties.residue.auth_seq_id(loc);
|
|
317
|
+
const code = StructureProperties.atom.label_comp_id(loc);
|
|
318
|
+
const chain = StructureProperties.chain.auth_asym_id(loc);
|
|
319
|
+
self.setHoveredPosition({
|
|
320
|
+
structureSeqPos: pos - 1,
|
|
321
|
+
code,
|
|
322
|
+
chain,
|
|
323
|
+
});
|
|
324
|
+
clickProteinToGenome({
|
|
325
|
+
model: self,
|
|
326
|
+
structureSeqPos: pos - 1,
|
|
327
|
+
}).catch((e) => {
|
|
328
|
+
console.error(e);
|
|
329
|
+
// @ts-expect-error
|
|
330
|
+
getParent(self, 2).setError(e);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
return () => {
|
|
336
|
+
ret.unsubscribe();
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
return () => { };
|
|
340
|
+
}));
|
|
341
|
+
addDisposer(self, autorun(() => {
|
|
342
|
+
const { molstarPluginContext } = self;
|
|
343
|
+
if (molstarPluginContext) {
|
|
344
|
+
const ret = molstarPluginContext.behaviors.interaction.hover.subscribe(e => {
|
|
345
|
+
if (StructureElement.Loci.is(e.current.loci)) {
|
|
346
|
+
const loc = StructureElement.Loci.getFirstLocation(e.current.loci);
|
|
347
|
+
if (loc) {
|
|
348
|
+
// example code for this label
|
|
349
|
+
// https://github.com/molstar/molstar/blob/60550cfea1f62a50a764d5714307d6d1049be71d/src/mol-theme/label.ts#L255-L264
|
|
350
|
+
const pos = StructureProperties.residue.auth_seq_id(loc);
|
|
351
|
+
const code = StructureProperties.atom.label_comp_id(loc);
|
|
352
|
+
const chain = StructureProperties.chain.auth_asym_id(loc);
|
|
353
|
+
self.setHoveredPosition({
|
|
354
|
+
structureSeqPos: pos - 1,
|
|
355
|
+
code,
|
|
356
|
+
chain,
|
|
357
|
+
});
|
|
358
|
+
hoverProteinToGenome({
|
|
359
|
+
model: self,
|
|
360
|
+
structureSeqPos: pos - 1,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
return () => {
|
|
366
|
+
ret.unsubscribe();
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
return () => { };
|
|
370
|
+
}));
|
|
371
|
+
addDisposer(self, autorun(() => {
|
|
372
|
+
const { showHighlight, structureSeqToTranscriptSeqPosition, molstarPluginContext, } = self;
|
|
373
|
+
const structure = molstarPluginContext?.managers.structure.hierarchy.current
|
|
374
|
+
.structures[0]?.cell.obj?.data;
|
|
375
|
+
if (structure && structureSeqToTranscriptSeqPosition) {
|
|
376
|
+
if (showHighlight) {
|
|
377
|
+
for (const coord of Object.keys(structureSeqToTranscriptSeqPosition)) {
|
|
378
|
+
selectResidue({
|
|
379
|
+
structure,
|
|
380
|
+
plugin: molstarPluginContext,
|
|
381
|
+
selectedResidue: +coord + 1,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
clearSelection({
|
|
387
|
+
plugin: molstarPluginContext,
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}));
|
|
392
|
+
addDisposer(self, autorun(() => {
|
|
393
|
+
const { structureSeqHoverPos, molstarPluginContext } = self;
|
|
394
|
+
const structure = molstarPluginContext?.managers.structure.hierarchy.current
|
|
395
|
+
.structures[0]?.cell.obj?.data;
|
|
396
|
+
if (structure && structureSeqHoverPos !== undefined) {
|
|
397
|
+
highlightResidue({
|
|
398
|
+
structure,
|
|
399
|
+
plugin: molstarPluginContext,
|
|
400
|
+
selectedResidue: structureSeqHoverPos,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}));
|
|
404
|
+
},
|
|
405
|
+
}));
|
|
406
|
+
export default Structure;
|
|
407
|
+
//# sourceMappingURL=structureModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structureModel.js","sourceRoot":"","sources":["../../src/ProteinView/structureModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,OAAO,EAAY,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EACL,aAAa,EAEb,UAAU,GACX,MAAM,oBAAoB,CAAA;AAG3B,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,GAEjC,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AASjD,MAAM,SAAS,GAAG,KAAK;KACpB,KAAK,CAAC;IACL;;OAEG;IACH,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IAC/B;;OAEG;IACH,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1C;;OAEG;IACH,iBAAiB,EAAE,KAAK,CAAC,MAAM,EAA0B;IACzD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,EAAu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AC;QACH,CAAC,CAAC,CACH,CAAA;QAED,WAAW,CACT,IAAI,EACJ,OAAO,CAAC,GAAG,EAAE;YACX,MAAM,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAA;YAC3D,MAAM,SAAS,GACb,oBAAoB,EAAE,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO;iBACvD,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAA;YAClC,IAAI,SAAS,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;gBACpD,gBAAgB,CAAC;oBACf,SAAS;oBACT,MAAM,EAAE,oBAAoB;oBAC5B,eAAe,EAAE,oBAAoB;iBACtC,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAC,CAAC,CAAA;AAEL,eAAe,SAAS,CAAA"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
2
|
-
export default function useProteinView({
|
|
3
|
-
url?: string;
|
|
4
|
-
data?: string;
|
|
2
|
+
export default function useProteinView({ showControls, }: {
|
|
5
3
|
showControls: boolean;
|
|
6
4
|
}): {
|
|
7
5
|
parentRef: import("react").RefObject<HTMLDivElement>;
|
|
8
6
|
error: unknown;
|
|
9
7
|
plugin: PluginContext | undefined;
|
|
10
|
-
seq: string;
|
|
11
8
|
};
|
|
@@ -2,14 +2,10 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { createPluginUI } from 'molstar/lib/mol-plugin-ui';
|
|
3
3
|
import { renderReact18 } from 'molstar/lib/mol-plugin-ui/react18';
|
|
4
4
|
import { DefaultPluginUISpec } from 'molstar/lib/mol-plugin-ui/spec';
|
|
5
|
-
|
|
6
|
-
import { loadStructureFromURL } from './loadStructureFromURL';
|
|
7
|
-
import { loadStructureFromData } from './loadStructureFromData';
|
|
8
|
-
export default function useProteinView({ url, data, showControls, }) {
|
|
5
|
+
export default function useProteinView({ showControls, }) {
|
|
9
6
|
const parentRef = useRef(null);
|
|
10
7
|
const [plugin, setPlugin] = useState();
|
|
11
8
|
const [error, setError] = useState();
|
|
12
|
-
const [seq, setSeq] = useState('');
|
|
13
9
|
useEffect(() => {
|
|
14
10
|
let p;
|
|
15
11
|
(async () => {
|
|
@@ -34,14 +30,6 @@ export default function useProteinView({ url, data, showControls, }) {
|
|
|
34
30
|
});
|
|
35
31
|
await p.initialized;
|
|
36
32
|
setPlugin(p);
|
|
37
|
-
if (url) {
|
|
38
|
-
const { seq } = await loadStructureFromURL({ url, plugin: p });
|
|
39
|
-
setSeq(seq);
|
|
40
|
-
}
|
|
41
|
-
else if (data) {
|
|
42
|
-
const { seq } = await loadStructureFromData({ data, plugin: p });
|
|
43
|
-
setSeq(seq);
|
|
44
|
-
}
|
|
45
33
|
}
|
|
46
34
|
catch (e) {
|
|
47
35
|
console.error(e);
|
|
@@ -51,7 +39,7 @@ export default function useProteinView({ url, data, showControls, }) {
|
|
|
51
39
|
return () => {
|
|
52
40
|
p?.unmount();
|
|
53
41
|
};
|
|
54
|
-
}, [
|
|
55
|
-
return { parentRef, error, plugin
|
|
42
|
+
}, [showControls]);
|
|
43
|
+
return { parentRef, error, plugin };
|
|
56
44
|
}
|
|
57
45
|
//# sourceMappingURL=useProteinView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProteinView.js","sourceRoot":"","sources":["../../src/ProteinView/useProteinView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAEpE,
|
|
1
|
+
{"version":3,"file":"useProteinView.js","sourceRoot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CAAC,CAAA;gBAChB,QAAQ,CAAC,CAAC,CAAC,CAAA;YACb,CAAC;QACH,CAAC,CAAC,EAAE,CAAA;QACJ,OAAO,GAAG,EAAE;YACV,CAAC,EAAE,OAAO,EAAE,CAAA;QACd,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAA;IAElB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AACrC,CAAC"}
|
|
@@ -11,9 +11,9 @@ export declare function getMolstarStructureSelection({ structure, selectedResidu
|
|
|
11
11
|
structure: Structure;
|
|
12
12
|
selectedResidue: number;
|
|
13
13
|
}): import("molstar/lib/mol-model/structure").StructureSelection;
|
|
14
|
-
export declare function toStr(
|
|
15
|
-
structureSeqPos
|
|
14
|
+
export declare function toStr({ chain, code, structureSeqPos, }: {
|
|
15
|
+
structureSeqPos?: number;
|
|
16
16
|
code?: string;
|
|
17
17
|
chain?: string;
|
|
18
18
|
}): string;
|
|
19
|
-
export declare function invertMap(arg: Record<number, number
|
|
19
|
+
export declare function invertMap(arg: Record<number, number>): Record<number, number>;
|