protvista-uniprot 4.5.2 → 4.5.4
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.
|
@@ -12,6 +12,7 @@ type ProcessedStructureData = {
|
|
|
12
12
|
};
|
|
13
13
|
declare class ProtvistaUniprotStructure extends LitElement {
|
|
14
14
|
accession?: string;
|
|
15
|
+
sequence?: string;
|
|
15
16
|
data?: ProcessedStructureData[];
|
|
16
17
|
structureId?: string;
|
|
17
18
|
metaInfo?: TemplateResult;
|
|
@@ -27,6 +28,9 @@ declare class ProtvistaUniprotStructure extends LitElement {
|
|
|
27
28
|
structureId: {
|
|
28
29
|
type: StringConstructor;
|
|
29
30
|
};
|
|
31
|
+
sequence: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
30
34
|
data: {
|
|
31
35
|
type: ObjectConstructor;
|
|
32
36
|
};
|
package/package.json
CHANGED
|
@@ -120,7 +120,7 @@ type ProcessedStructureData = {
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
const processPDBData = (data: UniProtKBData): ProcessedStructureData[] =>
|
|
123
|
-
data.uniProtKBCrossReferences
|
|
123
|
+
data.uniProtKBCrossReferences ? data.uniProtKBCrossReferences
|
|
124
124
|
.filter((xref) => xref.database === 'PDB')
|
|
125
125
|
.sort((refA, refB) => refA.id.localeCompare(refB.id))
|
|
126
126
|
.map(({ id, properties }) => {
|
|
@@ -162,7 +162,7 @@ const processPDBData = (data: UniProtKBData): ProcessedStructureData[] =>
|
|
|
162
162
|
transformedItem: ProcessedStructureData | undefined
|
|
163
163
|
): transformedItem is ProcessedStructureData =>
|
|
164
164
|
transformedItem !== undefined
|
|
165
|
-
);
|
|
165
|
+
) : [];
|
|
166
166
|
|
|
167
167
|
const processAFData = (data: AlphaFoldPayload): ProcessedStructureData[] =>
|
|
168
168
|
data.map((d) => ({
|
|
@@ -260,6 +260,7 @@ const styleId = 'protvista-styles';
|
|
|
260
260
|
@customElement('protvista-uniprot-structure')
|
|
261
261
|
class ProtvistaUniprotStructure extends LitElement {
|
|
262
262
|
accession?: string;
|
|
263
|
+
sequence?: string;
|
|
263
264
|
data?: ProcessedStructureData[];
|
|
264
265
|
structureId?: string;
|
|
265
266
|
metaInfo?: TemplateResult;
|
|
@@ -285,6 +286,7 @@ class ProtvistaUniprotStructure extends LitElement {
|
|
|
285
286
|
return {
|
|
286
287
|
accession: { type: String },
|
|
287
288
|
structureId: { type: String },
|
|
289
|
+
sequence: { type: String },
|
|
288
290
|
data: { type: Object },
|
|
289
291
|
loading: { type: Boolean },
|
|
290
292
|
colorTheme: { type: String },
|
|
@@ -309,9 +311,9 @@ class ProtvistaUniprotStructure extends LitElement {
|
|
|
309
311
|
let afData = [];
|
|
310
312
|
// Check if AF sequence matches UniProt sequence
|
|
311
313
|
const alphaFoldSequenceMatch = rawData[alphaFoldUrl]?.filter(
|
|
312
|
-
({ sequence }) => rawData[pdbUrl]
|
|
314
|
+
({ sequence: afSequence }) => rawData[pdbUrl]?.sequence?.value === afSequence || this.sequence === afSequence
|
|
313
315
|
);
|
|
314
|
-
if (alphaFoldSequenceMatch
|
|
316
|
+
if (alphaFoldSequenceMatch?.length) {
|
|
315
317
|
afData = processAFData(alphaFoldSequenceMatch);
|
|
316
318
|
this.alphamissenseAvailable = alphaFoldSequenceMatch.some(
|
|
317
319
|
(data) => data.amAnnotationsUrl
|