@datagrok/sequence-translator 0.0.12 → 1.0.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/README.md +19 -11
- package/dist/package-test.js +192 -135
- package/dist/package.js +195 -122
- package/package.json +7 -6
- package/src/defineAxolabsPattern.ts +58 -55
- package/src/package-test.ts +1 -1
- package/src/package.ts +28 -17
- package/src/structures-works/from-monomers.ts +20 -12
- package/src/structures-works/save-sense-antisense.ts +5 -2
- package/src/structures-works/sequence-codes-tools.ts +128 -45
- package/src/tests/smiles-tests.ts +31 -27
- package/{test-SequenceTranslator-c2bbc2b235db-afc0e1c5.html → test-SequenceTranslator-089b6516ed77-d62c21a9.html} +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as grok from 'datagrok-api/grok';
|
|
2
|
-
import * as ui from 'datagrok-api/ui';
|
|
1
|
+
// import * as grok from 'datagrok-api/grok';
|
|
2
|
+
// import * as ui from 'datagrok-api/ui';
|
|
3
3
|
// import * as DG from 'datagrok-api/dg';
|
|
4
4
|
import {map, SYNTHESIZERS, TECHNOLOGIES, MODIFICATIONS} from './map';
|
|
5
5
|
import {asoGapmersNucleotidesToBioSpring, asoGapmersNucleotidesToGcrs,
|
|
@@ -13,24 +13,105 @@ import {asoGapmersNucleotidesToBioSpring, asoGapmersNucleotidesToGcrs,
|
|
|
13
13
|
const noTranslationTableAvailable = 'No translation table available';
|
|
14
14
|
export const undefinedInputSequence = 'Type of input sequence is undefined';
|
|
15
15
|
|
|
16
|
-
export function
|
|
16
|
+
export function getFormat(sequence: string): string | null {
|
|
17
|
+
const possibleSynthesizers = getListOfPossibleSynthesizersByFirstMatchedCode(sequence);
|
|
18
|
+
|
|
19
|
+
if (possibleSynthesizers.length == 0)
|
|
20
|
+
return null;
|
|
21
|
+
|
|
22
|
+
let outputIndex = 0;
|
|
23
|
+
|
|
24
|
+
const firstUniqueCharacters = ['r', 'd'];
|
|
25
|
+
const nucleotides = ['A', 'U', 'T', 'C', 'G'];
|
|
26
|
+
|
|
27
|
+
possibleSynthesizers.forEach((synthesizer) => {
|
|
28
|
+
const codes = getAllCodesOfSynthesizer(synthesizer);
|
|
29
|
+
while (outputIndex < sequence.length) {
|
|
30
|
+
const matchedCode = codes.find((c) => c == sequence.slice(outputIndex, outputIndex + c.length));
|
|
31
|
+
|
|
32
|
+
if (matchedCode == null)
|
|
33
|
+
break;
|
|
34
|
+
|
|
35
|
+
if ( // for mistake pattern 'rAA'
|
|
36
|
+
outputIndex > 1 &&
|
|
37
|
+
nucleotides.includes(sequence[outputIndex]) &&
|
|
38
|
+
firstUniqueCharacters.includes(sequence[outputIndex - 2])
|
|
39
|
+
) break;
|
|
40
|
+
|
|
41
|
+
if ( // for mistake pattern 'ArA'
|
|
42
|
+
firstUniqueCharacters.includes(sequence[outputIndex + 1]) &&
|
|
43
|
+
nucleotides.includes(sequence[outputIndex])
|
|
44
|
+
) {
|
|
45
|
+
outputIndex++;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
outputIndex += matchedCode.length;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const indexOfFirstNotValidChar = (outputIndex == sequence.length) ? -1 : outputIndex;
|
|
54
|
+
if (indexOfFirstNotValidChar != -1)
|
|
55
|
+
return possibleSynthesizers[0];
|
|
56
|
+
|
|
57
|
+
const possibleTechnologies = getListOfPossibleTechnologiesByFirstMatchedCode(sequence, possibleSynthesizers[0]);
|
|
58
|
+
|
|
59
|
+
if (possibleTechnologies.length == 0)
|
|
60
|
+
return null;
|
|
61
|
+
|
|
62
|
+
outputIndex = 0;
|
|
63
|
+
|
|
64
|
+
possibleTechnologies.forEach((technology: string) => {
|
|
65
|
+
const codes = Object.keys(map[possibleSynthesizers[0]][technology]);
|
|
66
|
+
while (outputIndex < sequence.length) {
|
|
67
|
+
const matchedCode = codes.find((c) => c == sequence.slice(outputIndex, outputIndex + c.length));
|
|
68
|
+
|
|
69
|
+
if (matchedCode == null)
|
|
70
|
+
break;
|
|
71
|
+
|
|
72
|
+
if ( // for mistake pattern 'rAA'
|
|
73
|
+
outputIndex > 1 &&
|
|
74
|
+
nucleotides.includes(sequence[outputIndex]) &&
|
|
75
|
+
firstUniqueCharacters.includes(sequence[outputIndex - 2])
|
|
76
|
+
) break;
|
|
77
|
+
|
|
78
|
+
if ( // for mistake pattern 'ArA'
|
|
79
|
+
firstUniqueCharacters.includes(sequence[outputIndex + 1]) &&
|
|
80
|
+
nucleotides.includes(sequence[outputIndex])
|
|
81
|
+
) {
|
|
82
|
+
outputIndex++;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
outputIndex += matchedCode.length;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
return possibleSynthesizers[0];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function isValidSequence(sequence: string, format: string | null): {
|
|
17
94
|
indexOfFirstNotValidChar: number,
|
|
18
|
-
synthesizer: string | null,
|
|
19
|
-
technology: string | null
|
|
95
|
+
synthesizer: string[] | null,
|
|
96
|
+
technology: string[] | null
|
|
20
97
|
} {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
98
|
+
const possibleSynthesizers = format == null ?
|
|
99
|
+
getListOfPossibleSynthesizersByFirstMatchedCode(sequence) :
|
|
100
|
+
[format];
|
|
101
|
+
|
|
102
|
+
// if (possibleSynthesizers.length > 1) {
|
|
103
|
+
// const synthesizer = ui.choiceInput('Choose synthesizer from list: ', possibleSynthesizers[0],
|
|
104
|
+
// possibleSynthesizers);
|
|
105
|
+
// ui.dialog('Choose Synthesizer')
|
|
106
|
+
// .add(ui.panel([synthesizer.root], {style: {fontWeight: 'bold'}}))
|
|
107
|
+
// .onOK(() => possibleSynthesizers = [synthesizer.value])
|
|
108
|
+
// .onCancel(() => {
|
|
109
|
+
// possibleSynthesizers = [possibleSynthesizers[0]];
|
|
110
|
+
// grok.shell.warning('Input sequence is expected to be in format ' + possibleSynthesizers[0]);
|
|
111
|
+
// })
|
|
112
|
+
// .show();
|
|
113
|
+
// } else if (possibleSynthesizers.length == 0)
|
|
114
|
+
if (possibleSynthesizers.length == 0)
|
|
34
115
|
return {indexOfFirstNotValidChar: 0, synthesizer: null, technology: null};
|
|
35
116
|
|
|
36
117
|
let outputIndex = 0;
|
|
@@ -68,24 +149,26 @@ export function isValidSequence(sequence: string): {
|
|
|
68
149
|
if (indexOfFirstNotValidChar != -1) {
|
|
69
150
|
return {
|
|
70
151
|
indexOfFirstNotValidChar: indexOfFirstNotValidChar,
|
|
71
|
-
synthesizer: possibleSynthesizers
|
|
152
|
+
synthesizer: possibleSynthesizers,
|
|
72
153
|
technology: null,
|
|
73
154
|
};
|
|
74
155
|
}
|
|
75
156
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (possibleTechnologies.length > 1) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
157
|
+
const possibleTechnologies = getListOfPossibleTechnologiesByFirstMatchedCode(sequence, possibleSynthesizers[0]);
|
|
158
|
+
|
|
159
|
+
// if (possibleTechnologies.length > 1) {
|
|
160
|
+
// const technology = ui.choiceInput('Choose technology from list: ', possibleTechnologies[0],
|
|
161
|
+
// possibleTechnologies);
|
|
162
|
+
// ui.dialog('Choose Technology')
|
|
163
|
+
// .add(ui.panel([technology.root], {style: {fontWeight: 'bold'}}))
|
|
164
|
+
// .onOK(() => possibleTechnologies = [technology.value])
|
|
165
|
+
// .onCancel(() => {
|
|
166
|
+
// possibleTechnologies = [possibleTechnologies[0]];
|
|
167
|
+
// grok.shell.warning('Input sequence is expected to be in format ' + possibleTechnologies[0]);
|
|
168
|
+
// })
|
|
169
|
+
// .show();
|
|
170
|
+
// } else if (possibleTechnologies.length == 0)
|
|
171
|
+
if (possibleTechnologies.length == 0)
|
|
89
172
|
return {indexOfFirstNotValidChar: 0, synthesizer: null, technology: null};
|
|
90
173
|
|
|
91
174
|
outputIndex = 0;
|
|
@@ -118,8 +201,8 @@ export function isValidSequence(sequence: string): {
|
|
|
118
201
|
|
|
119
202
|
return {
|
|
120
203
|
indexOfFirstNotValidChar: indexOfFirstNotValidChar,
|
|
121
|
-
synthesizer: possibleSynthesizers
|
|
122
|
-
technology: possibleTechnologies[outputIndex],
|
|
204
|
+
synthesizer: possibleSynthesizers,
|
|
205
|
+
technology: [possibleTechnologies[outputIndex]],
|
|
123
206
|
};
|
|
124
207
|
}
|
|
125
208
|
|
|
@@ -159,7 +242,7 @@ function getListOfPossibleTechnologiesByFirstMatchedCode(sequence: string, synth
|
|
|
159
242
|
}
|
|
160
243
|
|
|
161
244
|
export function convertSequence(sequence: string, output: {
|
|
162
|
-
indexOfFirstNotValidChar: number, synthesizer: string | null, technology: string | null}) {
|
|
245
|
+
indexOfFirstNotValidChar: number, synthesizer: string[] | null, technology: string[] | null}) {
|
|
163
246
|
if (output.indexOfFirstNotValidChar != -1) {
|
|
164
247
|
return {
|
|
165
248
|
// type: '',
|
|
@@ -167,15 +250,15 @@ export function convertSequence(sequence: string, output: {
|
|
|
167
250
|
Error: undefinedInputSequence,
|
|
168
251
|
};
|
|
169
252
|
}
|
|
170
|
-
if (output.synthesizer
|
|
253
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.RAW_NUCLEOTIDES)) {//&& output.technology!.includes(TECHNOLOGIES.DNA)) {
|
|
171
254
|
return {
|
|
172
|
-
type: SYNTHESIZERS.RAW_NUCLEOTIDES + ' ' + TECHNOLOGIES.DNA,
|
|
255
|
+
type: SYNTHESIZERS.RAW_NUCLEOTIDES, // + ' ' + TECHNOLOGIES.DNA,
|
|
173
256
|
Nucleotides: sequence,
|
|
174
257
|
BioSpring: asoGapmersNucleotidesToBioSpring(sequence),
|
|
175
258
|
GCRS: asoGapmersNucleotidesToGcrs(sequence),
|
|
176
259
|
};
|
|
177
260
|
}
|
|
178
|
-
if (output.synthesizer
|
|
261
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.BIOSPRING) && output.technology!.includes(TECHNOLOGIES.ASO_GAPMERS)) {
|
|
179
262
|
return {
|
|
180
263
|
type: SYNTHESIZERS.BIOSPRING + ' ' + TECHNOLOGIES.ASO_GAPMERS,
|
|
181
264
|
Nucleotides: asoGapmersBioSpringToNucleotides(sequence),
|
|
@@ -183,7 +266,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
183
266
|
GCRS: asoGapmersBioSpringToGcrs(sequence),
|
|
184
267
|
};
|
|
185
268
|
}
|
|
186
|
-
if (output.synthesizer
|
|
269
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.GCRS) && output.technology!.includes(TECHNOLOGIES.ASO_GAPMERS)) {
|
|
187
270
|
return {
|
|
188
271
|
type: SYNTHESIZERS.GCRS + ' ' + TECHNOLOGIES.ASO_GAPMERS,
|
|
189
272
|
Nucleotides: asoGapmersGcrsToNucleotides(sequence),
|
|
@@ -192,7 +275,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
192
275
|
GCRS: sequence,
|
|
193
276
|
};
|
|
194
277
|
}
|
|
195
|
-
if (output.synthesizer
|
|
278
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.RAW_NUCLEOTIDES) && output.technology!.includes(TECHNOLOGIES.RNA)) {
|
|
196
279
|
return {
|
|
197
280
|
type: SYNTHESIZERS.RAW_NUCLEOTIDES + ' ' + TECHNOLOGIES.RNA,
|
|
198
281
|
Nucleotides: sequence,
|
|
@@ -201,7 +284,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
201
284
|
GCRS: siRnaNucleotidesToGcrs(sequence),
|
|
202
285
|
};
|
|
203
286
|
}
|
|
204
|
-
if (output.synthesizer
|
|
287
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.BIOSPRING) && output.technology!.includes(TECHNOLOGIES.SI_RNA)) {
|
|
205
288
|
return {
|
|
206
289
|
type: SYNTHESIZERS.BIOSPRING + ' ' + TECHNOLOGIES.SI_RNA,
|
|
207
290
|
Nucleotides: siRnaBioSpringToNucleotides(sequence),
|
|
@@ -210,7 +293,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
210
293
|
GCRS: siRnaBioSpringToGcrs(sequence),
|
|
211
294
|
};
|
|
212
295
|
}
|
|
213
|
-
if (output.synthesizer
|
|
296
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.AXOLABS)) {
|
|
214
297
|
return {
|
|
215
298
|
type: SYNTHESIZERS.AXOLABS + ' ' + TECHNOLOGIES.SI_RNA,
|
|
216
299
|
Nucleotides: siRnaAxolabsToNucleotides(sequence),
|
|
@@ -219,7 +302,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
219
302
|
GCRS: siRnaAxolabsToGcrs(sequence),
|
|
220
303
|
};
|
|
221
304
|
}
|
|
222
|
-
if (output.synthesizer
|
|
305
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.GCRS) && output.technology!.includes(TECHNOLOGIES.SI_RNA)) {
|
|
223
306
|
return {
|
|
224
307
|
type: SYNTHESIZERS.GCRS + ' ' + TECHNOLOGIES.SI_RNA,
|
|
225
308
|
Nucleotides: siRnaGcrsToNucleotides(sequence),
|
|
@@ -229,7 +312,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
229
312
|
GCRS: sequence,
|
|
230
313
|
};
|
|
231
314
|
}
|
|
232
|
-
if (output.synthesizer
|
|
315
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.GCRS)) {
|
|
233
316
|
return {
|
|
234
317
|
type: SYNTHESIZERS.GCRS,
|
|
235
318
|
Nucleotides: gcrsToNucleotides(sequence),
|
|
@@ -237,7 +320,7 @@ export function convertSequence(sequence: string, output: {
|
|
|
237
320
|
Mermade12: gcrsToMermade12(sequence),
|
|
238
321
|
};
|
|
239
322
|
}
|
|
240
|
-
if (output.synthesizer
|
|
323
|
+
if (output.synthesizer!.includes(SYNTHESIZERS.MERMADE_12)) {
|
|
241
324
|
return {
|
|
242
325
|
type: SYNTHESIZERS.MERMADE_12,
|
|
243
326
|
Nucleotides: noTranslationTableAvailable,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {category, expect, test} from '@datagrok-libraries/utils/src/test';
|
|
2
2
|
import {sequenceToSmiles} from '../structures-works/from-monomers';
|
|
3
|
+
import {SYNTHESIZERS} from '../structures-works/map';
|
|
3
4
|
|
|
4
5
|
category('sequence-translator', () => {
|
|
5
6
|
test('AGGTCCTCTTGACTTAGGCC', async () => {
|
|
@@ -23,7 +24,7 @@ category('sequence-translator', () => {
|
|
|
23
24
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
24
25
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))C[C@@H]1OP(=O)(O)OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))C[C@@H]1O';
|
|
25
26
|
|
|
26
|
-
expect(sequenceToSmiles('AGGTCCTCTTGACTTAGGCC'), expected);
|
|
27
|
+
expect(sequenceToSmiles('AGGTCCTCTTGACTTAGGCC', false, SYNTHESIZERS.RAW_NUCLEOTIDES), expected);
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
test('invabasic/galnac1', async () => {
|
|
@@ -34,7 +35,7 @@ category('sequence-translator', () => {
|
|
|
34
35
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
35
36
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
36
37
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
37
|
-
expect(sequenceToSmiles('(invabasic)sgg(invabasic)(GalNAc-2-JNJ)'), expected);
|
|
38
|
+
expect(sequenceToSmiles('(invabasic)sgg(invabasic)(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
test('invabasic/galnac2', async () => {
|
|
@@ -45,7 +46,7 @@ category('sequence-translator', () => {
|
|
|
45
46
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
46
47
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
47
48
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
48
|
-
expect(sequenceToSmiles('(invabasic)sgsg(invabasic)(GalNAc-2-JNJ)'), expected);
|
|
49
|
+
expect(sequenceToSmiles('(invabasic)sgsg(invabasic)(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
test('invabasic/galnac3', async () => {
|
|
@@ -56,7 +57,7 @@ category('sequence-translator', () => {
|
|
|
56
57
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
57
58
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
58
59
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
59
|
-
expect(sequenceToSmiles('(invabasic)sggs(invabasic)(GalNAc-2-JNJ)'), expected);
|
|
60
|
+
expect(sequenceToSmiles('(invabasic)sggs(invabasic)(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
60
61
|
});
|
|
61
62
|
|
|
62
63
|
test('invabasic/galnac4', async () => {
|
|
@@ -67,7 +68,7 @@ category('sequence-translator', () => {
|
|
|
67
68
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
68
69
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
69
70
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
70
|
-
expect(sequenceToSmiles('(invabasic)sgg(invabasic)s(GalNAc-2-JNJ)'), expected);
|
|
71
|
+
expect(sequenceToSmiles('(invabasic)sgg(invabasic)s(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
test('usCfCfUfGfAf', async () => {
|
|
@@ -77,7 +78,7 @@ category('sequence-translator', () => {
|
|
|
77
78
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](F)[C@@H]1OP(=O)(O)' +
|
|
78
79
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](F)[C@@H]1OP(=O)(O)' +
|
|
79
80
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](F)[C@@H]1O';
|
|
80
|
-
expect(sequenceToSmiles('usCfCfUfGfAf'), expected);
|
|
81
|
+
expect(sequenceToSmiles('usCfCfUfGfAf', false, SYNTHESIZERS.AXOLABS), expected);
|
|
81
82
|
});
|
|
82
83
|
|
|
83
84
|
test('usAfsusgsgsg', async () => {
|
|
@@ -87,7 +88,7 @@ category('sequence-translator', () => {
|
|
|
87
88
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
88
89
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
89
90
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
90
|
-
expect(sequenceToSmiles('usAfsusgsgsg'), expected);
|
|
91
|
+
expect(sequenceToSmiles('usAfsusgsgsg', false, SYNTHESIZERS.AXOLABS), expected);
|
|
91
92
|
});
|
|
92
93
|
|
|
93
94
|
test('UfUfUfsCfsuacg', async () => {
|
|
@@ -99,7 +100,7 @@ category('sequence-translator', () => {
|
|
|
99
100
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
100
101
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
101
102
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
102
|
-
expect(sequenceToSmiles('UfUfUfsCfsuacg'), expected);
|
|
103
|
+
expect(sequenceToSmiles('UfUfUfsCfsuacg', false, SYNTHESIZERS.AXOLABS), expected);
|
|
103
104
|
});
|
|
104
105
|
|
|
105
106
|
test('susususauasu', async () => {
|
|
@@ -110,7 +111,7 @@ category('sequence-translator', () => {
|
|
|
110
111
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
111
112
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
112
113
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1O';
|
|
113
|
-
expect(sequenceToSmiles('susususauasu'), expected);
|
|
114
|
+
expect(sequenceToSmiles('susususauasu', false, SYNTHESIZERS.AXOLABS), expected);
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
test('CfGfCfsGfsCf', async () => {
|
|
@@ -119,7 +120,7 @@ category('sequence-translator', () => {
|
|
|
119
120
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](F)[C@@H]1OP(=O)(S)' +
|
|
120
121
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](F)[C@@H]1OP(=O)(S)' +
|
|
121
122
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](F)[C@@H]1O';
|
|
122
|
-
expect(sequenceToSmiles('CfGfCfsGfsCf'), expected);
|
|
123
|
+
expect(sequenceToSmiles('CfGfCfsGfsCf', false, SYNTHESIZERS.AXOLABS), expected);
|
|
123
124
|
});
|
|
124
125
|
|
|
125
126
|
test('acacacsacsac', async () => {
|
|
@@ -133,7 +134,7 @@ category('sequence-translator', () => {
|
|
|
133
134
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
134
135
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
135
136
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](OC)[C@@H]1O';
|
|
136
|
-
expect(sequenceToSmiles('acacacsacsac'), expected);
|
|
137
|
+
expect(sequenceToSmiles('acacacsacsac', false, SYNTHESIZERS.AXOLABS), expected);
|
|
137
138
|
});
|
|
138
139
|
|
|
139
140
|
test('cccgggusug', async () => {
|
|
@@ -147,7 +148,7 @@ category('sequence-translator', () => {
|
|
|
147
148
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
148
149
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
149
150
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
150
|
-
expect(sequenceToSmiles('cccgggusug'), expected);
|
|
151
|
+
expect(sequenceToSmiles('cccgggusug', false, SYNTHESIZERS.AXOLABS), expected);
|
|
151
152
|
});
|
|
152
153
|
|
|
153
154
|
test('UfAfCfGfGfCfAfUf', async () => {
|
|
@@ -160,7 +161,7 @@ category('sequence-translator', () => {
|
|
|
160
161
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](F)[C@@H]1OP(=O)(O)' +
|
|
161
162
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](F)[C@@H]1OP(=O)(O)' +
|
|
162
163
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](F)[C@@H]1O';
|
|
163
|
-
expect(sequenceToSmiles('UfAfCfGfGfCfAfUf'), expected);
|
|
164
|
+
expect(sequenceToSmiles('UfAfCfGfGfCfAfUf', false, SYNTHESIZERS.AXOLABS), expected);
|
|
164
165
|
});
|
|
165
166
|
|
|
166
167
|
test('(invabasic)sucuCfuUf', async () => {
|
|
@@ -172,7 +173,7 @@ category('sequence-translator', () => {
|
|
|
172
173
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](F)[C@@H]1OP(=O)(O)' +
|
|
173
174
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
174
175
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](F)[C@@H]1O';
|
|
175
|
-
expect(sequenceToSmiles('(invabasic)sucuCfuUf'), expected);
|
|
176
|
+
expect(sequenceToSmiles('(invabasic)sucuCfuUf', false, SYNTHESIZERS.AXOLABS), expected);
|
|
176
177
|
});
|
|
177
178
|
|
|
178
179
|
test('(invabasic)sAfgcugUf', async () => {
|
|
@@ -184,7 +185,7 @@ category('sequence-translator', () => {
|
|
|
184
185
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
185
186
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
186
187
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](F)[C@@H]1O';
|
|
187
|
-
expect(sequenceToSmiles('(invabasic)sAfgcugUf'), expected);
|
|
188
|
+
expect(sequenceToSmiles('(invabasic)sAfgcugUf', false, SYNTHESIZERS.AXOLABS), expected);
|
|
188
189
|
});
|
|
189
190
|
|
|
190
191
|
test('(invabasic)cuCfuUfsc', async () => {
|
|
@@ -196,7 +197,7 @@ category('sequence-translator', () => {
|
|
|
196
197
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
197
198
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](F)[C@@H]1OP(=O)(S)' +
|
|
198
199
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](OC)[C@@H]1O';
|
|
199
|
-
expect(sequenceToSmiles('(invabasic)cuCfuUfsc'), expected);
|
|
200
|
+
expect(sequenceToSmiles('(invabasic)cuCfuUfsc', false, SYNTHESIZERS.AXOLABS), expected);
|
|
200
201
|
});
|
|
201
202
|
|
|
202
203
|
test('(invabasic)scususu(GalNAc-2-JNJ)', async () => {
|
|
@@ -209,7 +210,7 @@ category('sequence-translator', () => {
|
|
|
209
210
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
210
211
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
211
212
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
212
|
-
expect(sequenceToSmiles('(invabasic)scususu(GalNAc-2-JNJ)'), expected);
|
|
213
|
+
expect(sequenceToSmiles('(invabasic)scususu(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
213
214
|
});
|
|
214
215
|
|
|
215
216
|
test('(invabasic)usAfsucuCfuUfAfgcugUfgCfacususu', async () => {
|
|
@@ -236,7 +237,7 @@ category('sequence-translator', () => {
|
|
|
236
237
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
237
238
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(S)' +
|
|
238
239
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1O';
|
|
239
|
-
expect(sequenceToSmiles('(invabasic)usAfsucuCfuUfAfgcugUfgCfacususu'), expected);
|
|
240
|
+
expect(sequenceToSmiles('(invabasic)usAfsucuCfuUfAfgcugUfgCfacususu', false, SYNTHESIZERS.AXOLABS), expected);
|
|
240
241
|
});
|
|
241
242
|
|
|
242
243
|
test('(invabasic)asacgGfuGfCfAfacucuauuca', async () => {
|
|
@@ -261,7 +262,7 @@ category('sequence-translator', () => {
|
|
|
261
262
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
262
263
|
'OC[C@H]1O[C@@H](N2C=CC(N)=NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
263
264
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
264
|
-
expect(sequenceToSmiles('(invabasic)asacgGfuGfCfAfacucuauuca'), expected);
|
|
265
|
+
expect(sequenceToSmiles('(invabasic)asacgGfuGfCfAfacucuauuca', false, SYNTHESIZERS.AXOLABS), expected);
|
|
265
266
|
});
|
|
266
267
|
|
|
267
268
|
test('(invabasic)scsgguGfcAfAfCfucuauucuga', async () => {
|
|
@@ -286,7 +287,7 @@ category('sequence-translator', () => {
|
|
|
286
287
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
287
288
|
'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
288
289
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
289
|
-
expect(sequenceToSmiles('(invabasic)scsgguGfcAfAfCfucuauucuga'), expected);
|
|
290
|
+
expect(sequenceToSmiles('(invabasic)scsgguGfcAfAfCfucuauucuga', false, SYNTHESIZERS.AXOLABS), expected);
|
|
290
291
|
});
|
|
291
292
|
|
|
292
293
|
test('(invabasic)scsaacUfcUfAfUfucuggacuua', async () => {
|
|
@@ -311,7 +312,7 @@ category('sequence-translator', () => {
|
|
|
311
312
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
312
313
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
313
314
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
314
|
-
expect(sequenceToSmiles('(invabasic)scsaacUfcUfAfUfucuggacuua'), expected);
|
|
315
|
+
expect(sequenceToSmiles('(invabasic)scsaacUfcUfAfUfucuggacuua', false, SYNTHESIZERS.AXOLABS), expected);
|
|
315
316
|
});
|
|
316
317
|
|
|
317
318
|
test('(invabasic)sasacuCfuAfUfUfcuggacuuua', async () => {
|
|
@@ -336,7 +337,7 @@ category('sequence-translator', () => {
|
|
|
336
337
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
337
338
|
'OC[C@H]1O[C@@H](N2C=CC(=O)NC2(=O))[C@H](OC)[C@@H]1OP(=O)(O)' +
|
|
338
339
|
'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)[C@H](OC)[C@@H]1O';
|
|
339
|
-
expect(sequenceToSmiles('(invabasic)sasacuCfuAfUfUfcuggacuuua'), expected);
|
|
340
|
+
expect(sequenceToSmiles('(invabasic)sasacuCfuAfUfUfcuggacuuua', false, SYNTHESIZERS.AXOLABS), expected);
|
|
340
341
|
});
|
|
341
342
|
|
|
342
343
|
test('(invabasic)usAfscug(invabasic)(GalNAc-2-JNJ)', async () => {
|
|
@@ -350,7 +351,7 @@ category('sequence-translator', () => {
|
|
|
350
351
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
351
352
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
352
353
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
353
|
-
expect(sequenceToSmiles('(invabasic)usAfscug(invabasic)(GalNAc-2-JNJ)'), expected);
|
|
354
|
+
expect(sequenceToSmiles('(invabasic)usAfscug(invabasic)(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
354
355
|
});
|
|
355
356
|
|
|
356
357
|
test('(invabasic)sasuaaCfcUf(GalNAc-2-JNJ)', async () => {
|
|
@@ -365,7 +366,7 @@ category('sequence-translator', () => {
|
|
|
365
366
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
366
367
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
367
368
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
368
|
-
expect(sequenceToSmiles('(invabasic)sasuaaCfcUf(GalNAc-2-JNJ)'), expected);
|
|
369
|
+
expect(sequenceToSmiles('(invabasic)sasuaaCfcUf(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS), expected);
|
|
369
370
|
});
|
|
370
371
|
|
|
371
372
|
test('(invabasic)sasuaaCfcUfCfUfuguaguuaua(GalNAc-2-JNJ)', async () => {
|
|
@@ -392,7 +393,8 @@ category('sequence-translator', () => {
|
|
|
392
393
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
393
394
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
394
395
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
395
|
-
expect(sequenceToSmiles('(invabasic)sasuaaCfcUfCfUfuguaguuaua(GalNAc-2-JNJ)'
|
|
396
|
+
expect(sequenceToSmiles('(invabasic)sasuaaCfcUfCfUfuguaguuaua(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS),
|
|
397
|
+
expected);
|
|
396
398
|
});
|
|
397
399
|
|
|
398
400
|
test('(invabasic)scsaucacguUfGfCfagccgucuua(invabasic)(GalNAc-2-JNJ)', async () => {
|
|
@@ -422,7 +424,8 @@ category('sequence-translator', () => {
|
|
|
422
424
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
423
425
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
424
426
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
425
|
-
expect(sequenceToSmiles('(invabasic)scsaucacguUfGfCfagccgucuua(invabasic)(GalNAc-2-JNJ)'
|
|
427
|
+
expect(sequenceToSmiles('(invabasic)scsaucacguUfGfCfagccgucuua(invabasic)(GalNAc-2-JNJ)',
|
|
428
|
+
false, SYNTHESIZERS.AXOLABS), expected);
|
|
426
429
|
});
|
|
427
430
|
|
|
428
431
|
test('(invabasic)susguuUfgCfCfUfacaucuacua(GalNAc-2-JNJ)', async () => {
|
|
@@ -449,6 +452,7 @@ category('sequence-translator', () => {
|
|
|
449
452
|
'OCC(O)CNC(=O)CCCC(=O)NC(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
450
453
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)' +
|
|
451
454
|
'(COCCC(=O)NCCCNC(=O)CCCCOC2OC(CO)C(O)C(O)C2NC(=O)C)';
|
|
452
|
-
expect(sequenceToSmiles('(invabasic)susguuUfgCfCfUfacaucuacua(GalNAc-2-JNJ)'
|
|
455
|
+
expect(sequenceToSmiles('(invabasic)susguuUfgCfCfUfacaucuacua(GalNAc-2-JNJ)', false, SYNTHESIZERS.AXOLABS),
|
|
456
|
+
expected);
|
|
453
457
|
});
|
|
454
458
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>SequenceTranslator Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>SequenceTranslator Test Report. Datagrok version datagrok/datagrok:latest SHA=089b6516ed77. Commit d62c21a9.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,7 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">SequenceTranslator Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">SequenceTranslator Test Report. Datagrok version datagrok/datagrok:latest SHA=089b6516ed77. Commit d62c21a9.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-06-09 13:34:01</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/SequenceTranslator/src/__jest__/remote.test.ts</div><div class="suite-time warn">12.701s</div></div><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">failed</div><div class="test-duration">0.313s</div></div><div class="failureMessages"> <pre class="failureMsg">Error: Evaluation failed: Unable to find JS function "test"
|
|
233
233
|
at ExecutionContext._evaluateInternal (/home/runner/work/public/public/packages/SequenceTranslator/node_modules/puppeteer/src/common/ExecutionContext.ts:273:13)
|
|
234
234
|
at processTicksAndRejections (internal/process/task_queues.js:97:5)
|
|
235
235
|
at ExecutionContext.evaluate (/home/runner/work/public/public/packages/SequenceTranslator/node_modules/puppeteer/src/common/ExecutionContext.ts:140:12)</pre></div></div></div><div class="suite-consolelog"><div class="suite-consolelog-header">Console Log</div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at Object.<anonymous> (/home/runner/work/public/public/packages/SequenceTranslator/src/__jest__/test-node.ts:62:11)
|