protvista-uniprot 4.3.7 → 4.4.0
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/protvista-uniprot.mjs +18835 -18905
- package/dist/protvista-uniprot.mjs.map +1 -1
- package/dist/types/protvista-uniprot-structure.d.ts +7 -3
- package/dist/types/tooltips/ptm-tooltip.d.ts +0 -2
- package/package.json +3 -3
- package/src/adapters/alphamissense-pathogenicity-adapter.ts +12 -30
- package/src/adapters/proteomics-adapter.ts +56 -11
- package/src/adapters/ptm-exchange-adapter.ts +31 -43
- package/src/config.ts +2 -63
- package/src/protvista-uniprot-structure.ts +173 -34
- package/src/protvista-uniprot.ts +0 -6
- package/src/tooltips/feature-tooltip.ts +7 -18
- package/src/tooltips/ptm-tooltip.ts +5 -65
package/src/protvista-uniprot.ts
CHANGED
|
@@ -16,7 +16,6 @@ import NightingaleSequenceHeatmap from '@nightingale-elements/nightingale-sequen
|
|
|
16
16
|
import NightingaleFilter, {
|
|
17
17
|
Filter,
|
|
18
18
|
} from '@nightingale-elements/nightingale-filter';
|
|
19
|
-
import { amColorScale } from '@nightingale-elements/nightingale-structure';
|
|
20
19
|
|
|
21
20
|
// adapters
|
|
22
21
|
import featureAdapter from './adapters/feature-adapter';
|
|
@@ -295,11 +294,6 @@ class ProtvistaUniprot extends LitElement {
|
|
|
295
294
|
...new Set(heatmapData.map((hotMapItem) => hotMapItem.yValue)),
|
|
296
295
|
] as string[];
|
|
297
296
|
heatmapComponent.setHeatmapData(xDomain, yDomain, heatmapData);
|
|
298
|
-
heatmapComponent.updateComplete.then(() => {
|
|
299
|
-
heatmapComponent.heatmapInstance.setColor((d) =>
|
|
300
|
-
amColorScale(d.score)
|
|
301
|
-
);
|
|
302
|
-
});
|
|
303
297
|
}
|
|
304
298
|
}
|
|
305
299
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import ecoMap from '../adapters/config/evidence';
|
|
2
|
-
import {
|
|
3
|
-
acetylate,
|
|
4
|
-
phosphorylate,
|
|
5
|
-
sumoylate,
|
|
6
|
-
ubiquitinate,
|
|
7
|
-
} from './ptm-tooltip';
|
|
2
|
+
import { phosphorylate, sumoylate } from './ptm-tooltip';
|
|
8
3
|
|
|
9
4
|
const taxIdToPeptideAtlasBuildData = {
|
|
10
5
|
'36329': { build: '542', organism: 'Plasmodium' },
|
|
@@ -106,18 +101,12 @@ const findModifiedResidueName = (feature, ptm) => {
|
|
|
106
101
|
const { peptide, begin: peptideStart } = feature;
|
|
107
102
|
const proteinLocation = Number(peptideStart) + ptm.position - 1;
|
|
108
103
|
const modifiedResidue = peptide.charAt(ptm.position - 1); // CharAt index starts from 0
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return `${proteinLocation} ${sumoylate(modifiedResidue)}`;
|
|
114
|
-
case 'Ubiquitinylation':
|
|
115
|
-
return `${proteinLocation} ${ubiquitinate(modifiedResidue)}`;
|
|
116
|
-
case 'Acetylation':
|
|
117
|
-
return `${proteinLocation} ${acetylate(modifiedResidue)}`;
|
|
118
|
-
default:
|
|
119
|
-
return '';
|
|
104
|
+
if (ptm.name === 'Phosphorylation') {
|
|
105
|
+
return `${proteinLocation} ${phosphorylate(modifiedResidue)}`;
|
|
106
|
+
} else if (ptm.name === 'SUMOylation') {
|
|
107
|
+
return `${proteinLocation} ${sumoylate(modifiedResidue)}`;
|
|
120
108
|
}
|
|
109
|
+
return '';
|
|
121
110
|
};
|
|
122
111
|
|
|
123
112
|
const formatTooltip = (feature, taxId?: string) => {
|
|
@@ -245,7 +234,7 @@ const formatTooltip = (feature, taxId?: string) => {
|
|
|
245
234
|
}
|
|
246
235
|
${
|
|
247
236
|
ref.properties['Universal Spectrum Id']
|
|
248
|
-
? `<li class="text-indent-2 nowrap
|
|
237
|
+
? `<li class="text-indent-2 nowrap">Universal Spectrum Id:
|
|
249
238
|
<a href="http://proteomecentral.proteomexchange.org/usi/?usi=${ref.properties['Universal Spectrum Id']}" target="_blank">View on ProteomeXchange</a>
|
|
250
239
|
</li>`
|
|
251
240
|
: ``
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { PTM } from '../adapters/ptm-exchange-adapter';
|
|
2
2
|
|
|
3
|
-
type Modification =
|
|
4
|
-
| 'Phosphorylation'
|
|
5
|
-
| 'SUMOylation'
|
|
6
|
-
| 'Ubiquitinylation'
|
|
7
|
-
| 'Acetylation';
|
|
3
|
+
type Modification = 'Phosphorylation' | 'SUMOylation';
|
|
8
4
|
|
|
9
5
|
const aaToPhosphorylated = {
|
|
10
6
|
R: 'Phosphoarginine',
|
|
@@ -19,31 +15,6 @@ const aaToSumoylated = {
|
|
|
19
15
|
K: 'Sumoylated lysine',
|
|
20
16
|
};
|
|
21
17
|
|
|
22
|
-
const aaToUbiquitinated = {
|
|
23
|
-
K: 'Ubiquitinated lysine',
|
|
24
|
-
S: 'Ubiquitinated serine',
|
|
25
|
-
T: 'Ubiquitinated threonine',
|
|
26
|
-
C: 'Ubiquitinated cysteine',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const aaToAcetylated = {
|
|
30
|
-
S: 'Acetylserine',
|
|
31
|
-
A: 'Acetylalanine',
|
|
32
|
-
G: 'Acetylglycine',
|
|
33
|
-
T: 'Acetylthreonine',
|
|
34
|
-
V: 'Acetylvaline',
|
|
35
|
-
C: 'Acetylcysteine',
|
|
36
|
-
E: 'Acetylglutamin acid',
|
|
37
|
-
D: 'Acetylaspartic acid',
|
|
38
|
-
N: 'Acetylasparagine',
|
|
39
|
-
Q: 'Acetylglutamine',
|
|
40
|
-
L: 'Acetyllucine',
|
|
41
|
-
I: 'Acetlyisolucine',
|
|
42
|
-
W: 'Acetyltryptophan',
|
|
43
|
-
F: 'Acetylphenylalanine',
|
|
44
|
-
K: 'Acetyllysine',
|
|
45
|
-
};
|
|
46
|
-
|
|
47
18
|
export const phosphorylate = (aa: string) => {
|
|
48
19
|
const AA = aa.toUpperCase();
|
|
49
20
|
if (AA in aaToPhosphorylated) {
|
|
@@ -62,39 +33,6 @@ export const sumoylate = (aa: string) => {
|
|
|
62
33
|
return '';
|
|
63
34
|
};
|
|
64
35
|
|
|
65
|
-
export const ubiquitinate = (aa: string) => {
|
|
66
|
-
const AA = aa.toUpperCase();
|
|
67
|
-
if (AA in aaToUbiquitinated) {
|
|
68
|
-
return aaToUbiquitinated[AA as keyof typeof aaToUbiquitinated];
|
|
69
|
-
}
|
|
70
|
-
console.error(`${AA} not a valid amino acid for Ubiquitinylation`);
|
|
71
|
-
return '';
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export const acetylate = (aa: string) => {
|
|
75
|
-
const AA = aa.toUpperCase();
|
|
76
|
-
if (AA in aaToAcetylated) {
|
|
77
|
-
return aaToAcetylated[AA as keyof typeof aaToAcetylated];
|
|
78
|
-
}
|
|
79
|
-
console.error(`${AA} not a valid amino acid for Acetylation`);
|
|
80
|
-
return '';
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const getDescription = (modification: Modification, aa: string) => {
|
|
84
|
-
switch (modification) {
|
|
85
|
-
case 'Phosphorylation':
|
|
86
|
-
return phosphorylate(aa);
|
|
87
|
-
case 'SUMOylation':
|
|
88
|
-
return sumoylate(aa);
|
|
89
|
-
case 'Ubiquitinylation':
|
|
90
|
-
return ubiquitinate(aa);
|
|
91
|
-
case 'Acetylation':
|
|
92
|
-
return acetylate(aa);
|
|
93
|
-
default:
|
|
94
|
-
return '';
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
36
|
const formatTooltip = (
|
|
99
37
|
title: string,
|
|
100
38
|
ptms: PTM[],
|
|
@@ -114,7 +52,7 @@ const formatTooltip = (
|
|
|
114
52
|
if (modifications.size) {
|
|
115
53
|
if (modifications.size > 1) {
|
|
116
54
|
console.error(
|
|
117
|
-
`
|
|
55
|
+
`PTMeXchange PTM has a mixture of modifications: ${Array.from(
|
|
118
56
|
modifications
|
|
119
57
|
)}`
|
|
120
58
|
);
|
|
@@ -125,7 +63,9 @@ const formatTooltip = (
|
|
|
125
63
|
|
|
126
64
|
return `
|
|
127
65
|
${title ? `<h4>${title}</h4><hr />` : ''}
|
|
128
|
-
<h5>Description</h5><p>${
|
|
66
|
+
<h5>Description</h5><p>${
|
|
67
|
+
modification === 'Phosphorylation' ? phosphorylate(aa) : sumoylate(aa)
|
|
68
|
+
}</p>
|
|
129
69
|
${
|
|
130
70
|
confidenceScore
|
|
131
71
|
? `<h5 data-article-id="mod_res_large_scale#confidence-score">Confidence Score</h5><p>${confidenceScore}</p>`
|