protvista-uniprot 4.4.4 → 4.4.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "protvista-uniprot",
3
3
  "description": "ProtVista tool for the UniProt website",
4
- "version": "4.4.4",
4
+ "version": "4.4.6",
5
5
  "files": [
6
6
  "dist",
7
7
  "src"
@@ -32,6 +32,17 @@ const providersFrom3DBeacons = [
32
32
  'levylab',
33
33
  ];
34
34
 
35
+ const sourceMethods = new Map([
36
+ ['SWISS-MODEL', 'Modeling'],
37
+ ['ModelArchive', 'Modeling'],
38
+ ['PED', 'Modeling'],
39
+ ['SASBDB', 'SAS'],
40
+ ['isoform.io', 'Predicted'],
41
+ ['AlphaFill', 'Predicted'],
42
+ ['HEGELAB', 'Modeling'],
43
+ ['levylab', 'Modeling'],
44
+ ]);
45
+
35
46
  type UniProtKBData = {
36
47
  uniProtKBCrossReferences: UniProtKBCrossReference[];
37
48
  sequence: Sequence;
@@ -164,17 +175,18 @@ const processAFData = (data: PredictionData[]): ProcessedStructureData[] =>
164
175
  }));
165
176
 
166
177
  const process3DBeaconsData = (data: BeaconsData): ProcessedStructureData[] => {
167
- const otherStructures = data.structures.filter(({ summary }) =>
178
+ const otherStructures = data?.structures?.filter(({ summary }) =>
168
179
  providersFrom3DBeacons.includes(summary.provider)
169
180
  );
170
- return otherStructures.map(({ summary }) => ({
181
+ return otherStructures?.map(({ summary }) => ({
171
182
  id: summary['model_identifier'],
172
183
  source: summary.provider,
184
+ method: sourceMethods.get(summary.provider),
173
185
  positions: `${summary['uniprot_start']}-${summary['uniprot_end']}`,
174
186
  protvistaFeatureId: summary['model_identifier'],
175
187
  downloadLink: summary['model_url'],
176
188
  sourceDBLink: summary['model_page_url'],
177
- }));
189
+ })) || [];
178
190
  };
179
191
 
180
192
  const AFMetaInfo = html`
@@ -294,6 +306,9 @@ class ProtvistaUniprotStructure extends LitElement {
294
306
  rawData[pdbUrl].sequence?.value === rawData[alphaFoldUrl]?.[0]?.sequence
295
307
  ) {
296
308
  afData = processAFData(rawData[alphaFoldUrl] || []);
309
+ this.alphamissenseAvailable = rawData[alphaFoldUrl].some(
310
+ (data) => data.amAnnotationsUrl
311
+ );
297
312
  }
298
313
  const beaconsData = process3DBeaconsData(rawData[beaconsUrl] || []);
299
314
 
@@ -304,9 +319,6 @@ class ProtvistaUniprotStructure extends LitElement {
304
319
  if (!data || !data.length) return;
305
320
 
306
321
  this.data = data;
307
- this.alphamissenseAvailable = rawData[alphaFoldUrl]?.some(
308
- (data) => data.amAnnotationsUrl
309
- );
310
322
  }
311
323
 
312
324
  disconnectedCallback() {
@@ -360,6 +372,7 @@ class ProtvistaUniprotStructure extends LitElement {
360
372
  this.structureId = undefined;
361
373
  } else {
362
374
  this.structureId = id;
375
+ this.modelUrl = undefined;
363
376
  if (this.structureId.startsWith('AF-')) {
364
377
  this.metaInfo = AFMetaInfo;
365
378
  } else {