@datagrok/peptides 0.4.1 → 0.6.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/package.json +3 -3
- package/src/describe.ts +16 -23
- package/src/package.ts +21 -34
- package/src/peptides.ts +53 -29
- package/src/utils/cell-renderer.ts +126 -19
- package/src/utils/chem-palette.ts +317 -209
- package/src/utils/correlation-analysis.ts +150 -72
- package/src/utils/peptide-similarity-space.ts +22 -25
- package/src/utils/split-aligned.ts +8 -1
- package/src/viewers/logo-viewer.ts +48 -5
- package/src/viewers/model.ts +27 -0
- package/src/viewers/sar-viewer.ts +85 -24
- package/src/viewers/spiral-plot.ts +97 -0
- package/src/viewers/stacked-barchart-viewer.ts +82 -7
- package/src/viewers/subst-viewer.ts +244 -0
- package/src/widgets/analyze-peptides.ts +15 -5
- package/src/widgets/manual-alignment.ts +7 -0
- package/src/widgets/peptide-molecule.ts +7 -0
|
@@ -2,243 +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
|
-
|
|
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])];
|
|
28
41
|
}
|
|
29
|
-
|
|
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);
|
|
30
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
|
+
* @returns {string} Color.
|
|
60
|
+
*/
|
|
61
|
+
getColor(c: string): string {
|
|
62
|
+
const [color] = this.getColorPivot(c);
|
|
63
|
+
return color;
|
|
64
|
+
}
|
|
31
65
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Get color for the provided amino acid residue pivot
|
|
68
|
+
* @param {string} [c=''] Amino acid residue string.
|
|
69
|
+
* @returns {[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];
|
|
35
77
|
}
|
|
36
78
|
|
|
37
|
-
|
|
38
|
-
if (c.length ==
|
|
39
|
-
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()!;
|
|
40
82
|
return amino in this.cp?
|
|
41
|
-
[this.cp[amino], amino,
|
|
42
|
-
[ChemPalette.undefinedColor, '',
|
|
83
|
+
[this.cp[amino], amino, 2]:
|
|
84
|
+
[ChemPalette.undefinedColor, '', 2];
|
|
43
85
|
}
|
|
86
|
+
}
|
|
44
87
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
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];
|
|
52
94
|
}
|
|
95
|
+
}
|
|
53
96
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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)];
|
|
57
101
|
return amino in this.cp?
|
|
58
|
-
[this.cp[amino], amino,
|
|
59
|
-
[ChemPalette.undefinedColor, '',
|
|
102
|
+
[this.cp[amino], amino, 4]:
|
|
103
|
+
[ChemPalette.undefinedColor, '', 4];
|
|
60
104
|
}
|
|
61
105
|
}
|
|
106
|
+
}
|
|
62
107
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (c.length == 4 || c[4] == '(') {
|
|
66
|
-
const amino = ChemPalette.AAFullNames[c.substr(1, 3)];
|
|
67
|
-
return amino in this.cp?
|
|
68
|
-
[this.cp[amino], amino, 4]:
|
|
69
|
-
[ChemPalette.undefinedColor, '', 4];
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
108
|
+
return [ChemPalette.undefinedColor, '', 0];
|
|
109
|
+
}
|
|
73
110
|
|
|
74
|
-
|
|
75
|
-
|
|
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
|
+
};
|
|
76
122
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
'
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
+
}
|
|
104
152
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
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
|
+
}
|
|
121
168
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
+
}
|
|
129
183
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
monomers.forEach((monomer, index) => {
|
|
138
|
-
palette[grouping ? groups[currentGroup] : monomer] = ChemPalette.colourPalette[color][simplified ? 0 : index];
|
|
139
|
-
});
|
|
140
|
-
currentGroup++;
|
|
141
|
-
}
|
|
142
|
-
return palette;
|
|
143
|
-
}
|
|
184
|
+
/**
|
|
185
|
+
* Undefined color.
|
|
186
|
+
*
|
|
187
|
+
* @static
|
|
188
|
+
* @memberof ChemPalette
|
|
189
|
+
*/
|
|
190
|
+
static undefinedColor = 'rgb(100,100,100)';
|
|
144
191
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
'W': 'Tryptophan',
|
|
163
|
-
'I': 'Isoleucine',
|
|
164
|
-
'M': 'Methionine',
|
|
165
|
-
'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++;
|
|
166
209
|
}
|
|
210
|
+
return palette;
|
|
211
|
+
}
|
|
167
212
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
+
}
|
|
190
242
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
+
}
|
|
213
272
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
+
}
|
|
236
302
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
+
}
|
|
240
332
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
+
}
|
|
244
352
|
}
|