@datagrok/peptides 0.4.3 → 0.7.1
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/detectors.js +1 -1
- package/package.json +15 -10
- package/src/describe.ts +216 -102
- package/src/{viewers/model.ts → model.ts} +28 -1
- package/src/package.ts +15 -23
- package/src/peptides.ts +60 -6
- package/src/styles.css +46 -0
- package/src/utils/cell-renderer.ts +126 -19
- package/src/utils/chem-palette.ts +317 -206
- package/src/utils/peptide-similarity-space.ts +21 -41
- package/src/utils/split-aligned.ts +8 -0
- package/src/viewers/logo-viewer.ts +48 -0
- package/src/viewers/sar-viewer.ts +263 -170
- package/src/viewers/stacked-barchart-viewer.ts +12 -2
- package/src/viewers/subst-viewer.ts +276 -0
- package/src/widgets/analyze-peptides.ts +26 -6
- package/src/widgets/manual-alignment.ts +14 -6
- package/src/widgets/peptide-molecule.ts +7 -0
- package/src/workers/dimensionality-reducer.ts +2 -2
- package/webpack.config.js +5 -1
- package/src/utils/correlation-analysis.ts +0 -123
|
@@ -2,240 +2,351 @@ import * as grok from 'datagrok-api/grok';
|
|
|
2
2
|
import * as ui from 'datagrok-api/ui';
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Chem palette class.
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @class ChemPalette
|
|
10
|
+
*/
|
|
6
11
|
export class ChemPalette {
|
|
7
|
-
|
|
12
|
+
cp: {[key: string]: string} = {};
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Creates an instance of ChemPalette.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} scheme Color scheme to use.
|
|
18
|
+
* @param {boolean} [grouping=false] Is grouping enabled.
|
|
19
|
+
* @memberof ChemPalette
|
|
20
|
+
*/
|
|
21
|
+
constructor(scheme: string, grouping = false) {
|
|
22
|
+
if (scheme == 'grok') {
|
|
23
|
+
this.cp = ChemPalette.getDatagrok(grouping);
|
|
13
24
|
}
|
|
25
|
+
}
|
|
14
26
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
suppressChiralText: true,
|
|
30
|
-
};
|
|
31
|
-
const sketch = grok.chem.svgMol(ChemPalette.AASmiles[aar], undefined, undefined, options);
|
|
32
|
-
toDisplay.push(sketch);
|
|
27
|
+
/**
|
|
28
|
+
* Renders 2D representation of a amino acid residue in a tooltip.
|
|
29
|
+
*
|
|
30
|
+
* @param {DG.GridCell} cell Grid cell to show tooltip over.
|
|
31
|
+
* @param {number} x x coordinate of the mouse pointer.
|
|
32
|
+
* @param {number} y y coordinate of the mouse pointer.
|
|
33
|
+
*/
|
|
34
|
+
showTooltip(cell: DG.GridCell, x: number, y: number) {
|
|
35
|
+
const s = cell.cell.value as string;
|
|
36
|
+
let toDisplay = [ui.divText(s)];
|
|
37
|
+
const [, aar] = this.getColorAAPivot(s);
|
|
38
|
+
if (aar in ChemPalette.AASmiles) {
|
|
39
|
+
if (s in ChemPalette.AANames) {
|
|
40
|
+
toDisplay = [ui.divText(ChemPalette.AANames[s])];
|
|
33
41
|
}
|
|
34
|
-
|
|
42
|
+
if (s in ChemPalette.AAFullNames) {
|
|
43
|
+
toDisplay = [ui.divText(ChemPalette.AANames[ChemPalette.AAFullNames[s]])];
|
|
44
|
+
}
|
|
45
|
+
const options = {
|
|
46
|
+
autoCrop: true,
|
|
47
|
+
autoCropMargin: 0,
|
|
48
|
+
suppressChiralText: true,
|
|
49
|
+
};
|
|
50
|
+
const sketch = grok.chem.svgMol(ChemPalette.AASmiles[aar], undefined, undefined, options);
|
|
51
|
+
toDisplay.push(sketch);
|
|
35
52
|
}
|
|
53
|
+
ui.tooltip.show(ui.divV(toDisplay), x, y);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Get color for the provided amino acid residue.
|
|
58
|
+
* @param {string} c Amino acid residue string.
|
|
59
|
+
* @return {string} Color.
|
|
60
|
+
*/
|
|
61
|
+
getColor(c: string): string {
|
|
62
|
+
const [color] = this.getColorPivot(c);
|
|
63
|
+
return color;
|
|
64
|
+
}
|
|
36
65
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Get color for the provided amino acid residue pivot
|
|
68
|
+
* @param {string} [c=''] Amino acid residue string.
|
|
69
|
+
* @return {[string, string, number]}
|
|
70
|
+
*/
|
|
71
|
+
getColorAAPivot(c: string = ''): [string, string, number] {
|
|
72
|
+
if (c.length == 1 || c[1] == '(') {
|
|
73
|
+
const amino = c[0]?.toUpperCase()!;
|
|
74
|
+
return amino in this.cp?
|
|
75
|
+
[this.cp[amino], amino, 1]:
|
|
76
|
+
[ChemPalette.undefinedColor, '', 1];
|
|
40
77
|
}
|
|
41
78
|
|
|
42
|
-
|
|
43
|
-
if (c.length ==
|
|
44
|
-
const amino = c[
|
|
79
|
+
if (c[0] == 'd' && c[1]! in this.cp) {
|
|
80
|
+
if (c.length == 2 || c[2] == '(') {
|
|
81
|
+
const amino = c[1]?.toUpperCase()!;
|
|
45
82
|
return amino in this.cp?
|
|
46
|
-
[this.cp[amino], amino,
|
|
47
|
-
[ChemPalette.undefinedColor, '',
|
|
83
|
+
[this.cp[amino], amino, 2]:
|
|
84
|
+
[ChemPalette.undefinedColor, '', 2];
|
|
48
85
|
}
|
|
86
|
+
}
|
|
49
87
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
88
|
+
if (c.substr(0, 3) in ChemPalette.AAFullNames) {
|
|
89
|
+
if (c.length == 3 || c[3] == '(') {
|
|
90
|
+
const amino = ChemPalette.AAFullNames[c.substr(0, 3)];
|
|
91
|
+
return amino in this.cp?
|
|
92
|
+
[this.cp[amino], amino, 3]:
|
|
93
|
+
[ChemPalette.undefinedColor, '', 3];
|
|
57
94
|
}
|
|
95
|
+
}
|
|
58
96
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
97
|
+
if (c[0]?.toLowerCase() == c[0]) {
|
|
98
|
+
if (c.substr(1, 3) in ChemPalette.AAFullNames) {
|
|
99
|
+
if (c.length == 4 || c[4] == '(') {
|
|
100
|
+
const amino = ChemPalette.AAFullNames[c.substr(1, 3)];
|
|
62
101
|
return amino in this.cp?
|
|
63
|
-
[this.cp[amino], amino,
|
|
64
|
-
[ChemPalette.undefinedColor, '',
|
|
102
|
+
[this.cp[amino], amino, 4]:
|
|
103
|
+
[ChemPalette.undefinedColor, '', 4];
|
|
65
104
|
}
|
|
66
105
|
}
|
|
106
|
+
}
|
|
67
107
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (c.length == 4 || c[4] == '(') {
|
|
71
|
-
const amino = ChemPalette.AAFullNames[c.substr(1, 3)];
|
|
72
|
-
return amino in this.cp?
|
|
73
|
-
[this.cp[amino], amino, 4]:
|
|
74
|
-
[ChemPalette.undefinedColor, '', 4];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
108
|
+
return [ChemPalette.undefinedColor, '', 0];
|
|
109
|
+
}
|
|
78
110
|
|
|
79
|
-
|
|
80
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Get color pivot.
|
|
113
|
+
*
|
|
114
|
+
* @param c
|
|
115
|
+
* @returns
|
|
116
|
+
*/
|
|
117
|
+
getColorPivot(c = ''): [string, number] {
|
|
118
|
+
//TODO: merge with getColorAAPivot?
|
|
119
|
+
const [color,, pivot] = this.getColorAAPivot(c);
|
|
120
|
+
return [color, pivot];
|
|
121
|
+
};
|
|
81
122
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Color palette
|
|
125
|
+
*
|
|
126
|
+
* @static
|
|
127
|
+
* @type {{[key: string]: string[]}}
|
|
128
|
+
* @memberof ChemPalette
|
|
129
|
+
*/
|
|
130
|
+
static colourPalette: {[key: string]: string[]} = {
|
|
131
|
+
'orange': ['rgb(255,187,120)', 'rgb(245,167,100)', 'rgb(235,137,70)', 'rgb(205, 111, 71)'],
|
|
132
|
+
'all_green': ['rgb(44,160,44)', 'rgb(74,160,74)', 'rgb(23,103,57)', 'rgb(30,110,96)', 'rgb(60,131,95)',
|
|
133
|
+
'rgb(24,110,79)', 'rgb(152,223,138)', 'rgb(182, 223, 138)', 'rgb(152, 193, 138)'],
|
|
134
|
+
'all_blue': ['rgb(31,119,180)', 'rgb(23,190,207)', 'rgb(122, 102, 189)', 'rgb(158,218,229)', 'rgb(141, 124, 217)',
|
|
135
|
+
'rgb(31, 120, 150)'],
|
|
136
|
+
'magenta': ['rgb(162,106,192)', 'rgb(197,165,224)', 'rgb(208,113,218)'],
|
|
137
|
+
'red': ['rgb(214,39,40)', 'rgb(255,152,150)'],
|
|
138
|
+
'st_blue': ['rgb(23,190,207)', 'rgb(158,218,229)', 'rgb(31,119,180)'],
|
|
139
|
+
'dark_blue': ['rgb(31,119,180)', 'rgb(31, 120, 150)'],
|
|
140
|
+
'light_blue': ['rgb(23,190,207)', 'rgb(158,218,229)', 'rgb(108, 218, 229)', 'rgb(23,190,227)'],
|
|
141
|
+
'lilac_blue': ['rgb(124,102,211)', 'rgb(149,134,217)', 'rgb(97, 81, 150)'],
|
|
142
|
+
'dark_green': ['rgb(23,103,57)', 'rgb(30,110,96)', 'rgb(60,131,95)', 'rgb(24,110,79)'],
|
|
143
|
+
'green': ['rgb(44,160,44)', 'rgb(74,160,74)'],
|
|
144
|
+
'light_green': ['rgb(152,223,138)', 'rgb(182, 223, 138)', 'rgb(152, 193, 138)'],
|
|
145
|
+
'st_green': ['rgb(44,160,44)', 'rgb(152,223,138)', 'rgb(39, 174, 96)', 'rgb(74,160,74)'],
|
|
146
|
+
'pink': ['rgb(247,182,210)'],
|
|
147
|
+
'brown': ['rgb(140,86,75)', 'rgb(102, 62, 54)'],
|
|
148
|
+
'gray': ['rgb(127,127,127)', 'rgb(199,199,199)', 'rgb(196,156,148)', 'rgb(222, 222, 180)'],
|
|
149
|
+
'yellow': ['rgb(188,189,34)'],
|
|
150
|
+
'white': ['rgb(230,230,230)'],
|
|
151
|
+
}
|
|
109
152
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Grok color scheme groups.
|
|
155
|
+
*
|
|
156
|
+
* @static
|
|
157
|
+
* @type {{[key: string]: string[]}}
|
|
158
|
+
* @memberof ChemPalette
|
|
159
|
+
*/
|
|
160
|
+
static grokGroups: {[key: string]: string[]} = {
|
|
161
|
+
'yellow': ['C', 'U'],
|
|
162
|
+
'red': ['G', 'P'],
|
|
163
|
+
'all_green': ['A', 'V', 'I', 'L', 'M', 'F', 'Y', 'W'],
|
|
164
|
+
'light_blue': ['R', 'H', 'K'],
|
|
165
|
+
'dark_blue': ['D', 'E'],
|
|
166
|
+
'orange': ['S', 'T', 'N', 'Q'],
|
|
167
|
+
}
|
|
118
168
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Lesk color scheme groups.
|
|
171
|
+
*
|
|
172
|
+
* @static
|
|
173
|
+
* @type {{[key: string]: string[]}}
|
|
174
|
+
* @memberof ChemPalette
|
|
175
|
+
*/
|
|
176
|
+
static leskGroups: {[key: string]: string[]} = {
|
|
177
|
+
'orange': ['G', 'A', 'S', 'T'],
|
|
178
|
+
'all_green': ['C', 'V', 'I', 'L', 'P', 'F', 'Y', 'M', 'W'],
|
|
179
|
+
'magenta': ['N', 'Q', 'H'],
|
|
180
|
+
'red': ['D', 'E'],
|
|
181
|
+
'all_blue': ['K', 'R'],
|
|
182
|
+
}
|
|
126
183
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
monomers.forEach((monomer, index) => {
|
|
135
|
-
palette[grouping ? groups[currentGroup] : monomer] = ChemPalette.colourPalette[color][simplified ? 0 : index];
|
|
136
|
-
});
|
|
137
|
-
currentGroup++;
|
|
138
|
-
}
|
|
139
|
-
return palette;
|
|
140
|
-
}
|
|
184
|
+
/**
|
|
185
|
+
* Undefined color.
|
|
186
|
+
*
|
|
187
|
+
* @static
|
|
188
|
+
* @memberof ChemPalette
|
|
189
|
+
*/
|
|
190
|
+
static undefinedColor = 'rgb(100,100,100)';
|
|
141
191
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
'W': 'Tryptophan',
|
|
160
|
-
'I': 'Isoleucine',
|
|
161
|
-
'M': 'Methionine',
|
|
162
|
-
'T': 'Threonine',
|
|
192
|
+
/**
|
|
193
|
+
* Create palette.
|
|
194
|
+
*
|
|
195
|
+
* @param dt
|
|
196
|
+
* @param simplified Is simplified.
|
|
197
|
+
* @param grouping Is grouping enabled.
|
|
198
|
+
* @returns
|
|
199
|
+
*/
|
|
200
|
+
static makePalette(dt: {[key: string]: string[]}, simplified = false, grouping = false) {
|
|
201
|
+
const palette: { [key: string]: string } = {};
|
|
202
|
+
const groups = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
203
|
+
let currentGroup = 0;
|
|
204
|
+
for (const [color, monomers] of Object.entries(dt)) {
|
|
205
|
+
monomers.forEach((monomer, index) => {
|
|
206
|
+
palette[grouping ? groups[currentGroup] : monomer] = ChemPalette.colourPalette[color][simplified ? 0 : index];
|
|
207
|
+
});
|
|
208
|
+
currentGroup++;
|
|
163
209
|
}
|
|
210
|
+
return palette;
|
|
211
|
+
}
|
|
164
212
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
213
|
+
/**
|
|
214
|
+
* Amino acid residue names.
|
|
215
|
+
*
|
|
216
|
+
* @static
|
|
217
|
+
* @type {{[key: string]: string}}
|
|
218
|
+
* @memberof ChemPalette
|
|
219
|
+
*/
|
|
220
|
+
static AANames: {[key: string]: string} = {
|
|
221
|
+
'G': 'Glycine',
|
|
222
|
+
'L': 'Leucine',
|
|
223
|
+
'Y': 'Tyrosine',
|
|
224
|
+
'S': 'Serine',
|
|
225
|
+
'E': 'Glutamic acid',
|
|
226
|
+
'Q': 'Glutamine',
|
|
227
|
+
'D': 'Aspartic acid',
|
|
228
|
+
'N': 'Asparagine',
|
|
229
|
+
'F': 'Phenylalanine',
|
|
230
|
+
'A': 'Alanine',
|
|
231
|
+
'K': 'Lysine',
|
|
232
|
+
'R': 'Arginine',
|
|
233
|
+
'H': 'Histidine',
|
|
234
|
+
'C': 'Cysteine',
|
|
235
|
+
'V': 'Valine',
|
|
236
|
+
'P': 'Proline',
|
|
237
|
+
'W': 'Tryptophan',
|
|
238
|
+
'I': 'Isoleucine',
|
|
239
|
+
'M': 'Methionine',
|
|
240
|
+
'T': 'Threonine',
|
|
241
|
+
}
|
|
187
242
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
243
|
+
/**
|
|
244
|
+
* Amino acid residue SMILES.
|
|
245
|
+
*
|
|
246
|
+
* @static
|
|
247
|
+
* @type {{[key: string]: string}}
|
|
248
|
+
* @memberof ChemPalette
|
|
249
|
+
*/
|
|
250
|
+
static AASmiles: {[key: string]: string} = {
|
|
251
|
+
'G': 'NCC(=O)O',
|
|
252
|
+
'L': 'N[C@H](CC(C)C)C(=O)O',
|
|
253
|
+
'Y': 'NC(CC1=CC=C(O)C=C1)C(=O)O',
|
|
254
|
+
'S': 'NC(CO)C(=O)O',
|
|
255
|
+
'E': 'N[C@@H](CCC(O)=O)C(=O)O',
|
|
256
|
+
'Q': 'N[C@@H](CCC(N)=O)C(=O)O',
|
|
257
|
+
'D': 'N[C@@H](CC(O)=O)C(=O)O',
|
|
258
|
+
'N': 'N[C@@H](CC(N)=O)C(=O)O',
|
|
259
|
+
'F': 'NC(CC1=CC=CC=C1)C(=O)O',
|
|
260
|
+
'A': 'N[C@H](C)C(=O)O',
|
|
261
|
+
'K': 'NC(CCCCN)C(=O)O',
|
|
262
|
+
'R': 'N[C@H](CCCNC(=N)C)C(=O)O',
|
|
263
|
+
'H': 'NC(CC1=CN=C[N]1)C(=O)O',
|
|
264
|
+
'C': 'N[C@@H](CS)C(=O)O',
|
|
265
|
+
'V': 'NC(C(C)C)C(=O)O',
|
|
266
|
+
'P': 'N(CCC1)C1C(=O)O',
|
|
267
|
+
'W': 'N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O',
|
|
268
|
+
'I': 'N[C@H]([C@H](C)CC)C(=O)O',
|
|
269
|
+
'M': 'NC(CCSC)C(=O)O',
|
|
270
|
+
'T': 'NC(C(O)C)C(=O)O',
|
|
271
|
+
}
|
|
210
272
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
273
|
+
/**
|
|
274
|
+
* Amino acid residue truncated SMILES.
|
|
275
|
+
*
|
|
276
|
+
* @static
|
|
277
|
+
* @type {{[key: string]: string}}
|
|
278
|
+
* @memberof ChemPalette
|
|
279
|
+
*/
|
|
280
|
+
static AASmilesTruncated: {[key: string]: string} = {
|
|
281
|
+
'G': '*C*',
|
|
282
|
+
'L': 'CC(C)C[C@H](*)*',
|
|
283
|
+
'Y': 'C1=CC(=CC=C1CC(*)*)O',
|
|
284
|
+
'S': 'OCC(*)C*',
|
|
285
|
+
'E': '*[C@@H](CCC(O)=O)*',
|
|
286
|
+
'Q': '*N[C@@H](CCC(N)=O)*',
|
|
287
|
+
'D': '*[C@@H](CC(O)=O)*',
|
|
288
|
+
'N': '*[C@@H](CC(N)=O)*',
|
|
289
|
+
'F': 'C1=CC=C(C=C1)CC(*)*',
|
|
290
|
+
'A': 'C[C@H](*)*',
|
|
291
|
+
'K': 'C(CCN)CC(*)*',
|
|
292
|
+
'R': '*[C@H](CCCNC(=N)C)*',
|
|
293
|
+
'H': 'C1=C(NC=N1)CC(*)*',
|
|
294
|
+
'C': 'C([C@@H](*)*)S',
|
|
295
|
+
'V': 'CC(C)C(*)*',
|
|
296
|
+
'P': 'C1CCN(*)C1*',
|
|
297
|
+
'W': '*[C@@H](Cc1c2ccccc2n([H])c1)*',
|
|
298
|
+
'I': 'CC[C@H](C)[C@H](*)*',
|
|
299
|
+
'M': 'CSCCC(*)*',
|
|
300
|
+
'T': 'CC(O)C(*)*',
|
|
301
|
+
}
|
|
233
302
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Amino acid residue full names.
|
|
305
|
+
*
|
|
306
|
+
* @static
|
|
307
|
+
* @type {{[key: string]: string}}
|
|
308
|
+
* @memberof ChemPalette
|
|
309
|
+
*/
|
|
310
|
+
static AAFullNames: {[key: string]: string} = {
|
|
311
|
+
'Ala': 'A',
|
|
312
|
+
'Arg': 'R',
|
|
313
|
+
'Asn': 'N',
|
|
314
|
+
'Asp': 'D',
|
|
315
|
+
'Cys': 'C',
|
|
316
|
+
'Gln': 'Q',
|
|
317
|
+
'Glu': 'E',
|
|
318
|
+
'Gly': 'G',
|
|
319
|
+
'His': 'H',
|
|
320
|
+
'Ile': 'I',
|
|
321
|
+
'Leu': 'L',
|
|
322
|
+
'Lys': 'K',
|
|
323
|
+
'Met': 'M',
|
|
324
|
+
'Phe': 'F',
|
|
325
|
+
'Pro': 'P',
|
|
326
|
+
'Ser': 'S',
|
|
327
|
+
'Thr': 'T',
|
|
328
|
+
'Trp': 'W',
|
|
329
|
+
'Tyr': 'Y',
|
|
330
|
+
'Val': 'V',
|
|
331
|
+
}
|
|
237
332
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
333
|
+
/**
|
|
334
|
+
* Get Datagrok palette.
|
|
335
|
+
*
|
|
336
|
+
* @param grouping Is grouping enabled?
|
|
337
|
+
* @returns
|
|
338
|
+
*/
|
|
339
|
+
static getDatagrok(grouping = false) {
|
|
340
|
+
return ChemPalette.makePalette(ChemPalette.grokGroups, false, grouping);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Get Lesk palette.
|
|
345
|
+
*
|
|
346
|
+
* @param grouping Is grouping enabled?
|
|
347
|
+
* @returns
|
|
348
|
+
*/
|
|
349
|
+
static getLesk() {
|
|
350
|
+
return ChemPalette.makePalette(ChemPalette.leskGroups);
|
|
351
|
+
}
|
|
241
352
|
}
|