@datagrok/sequence-translator 1.0.12 → 1.0.14
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/package-test.js +70739 -1417
- package/dist/package.js +70546 -4914
- package/package.json +6 -4
- package/scripts/build-monomer-lib.py +140 -0
- package/setup-unlink-clean.cmd +14 -0
- package/setup.cmd +14 -11
- package/setup.sh +37 -0
- package/src/__jest__/remote.test.ts +11 -3
- package/src/{ICDs.ts → autostart/ICDs.ts} +0 -0
- package/src/{IDPs.ts → autostart/IDPs.ts} +0 -0
- package/src/autostart/calculations.ts +37 -0
- package/src/autostart/constants.ts +49 -0
- package/src/autostart/registration.ts +101 -122
- package/src/{salts.ts → autostart/salts.ts} +0 -0
- package/src/{sources.ts → autostart/sources.ts} +0 -0
- package/src/{users.ts → autostart/users.ts} +0 -0
- package/src/axolabs/constants.ts +10 -10
- package/src/axolabs/define-pattern.ts +13 -12
- package/src/axolabs/draw-svg.ts +140 -201
- package/src/axolabs/helpers.ts +94 -0
- package/src/helpers.ts +28 -0
- package/src/main/main-view.ts +85 -87
- package/src/package.ts +25 -8
- package/src/structures-works/const.ts +18 -0
- package/src/structures-works/converters.ts +3 -3
- package/src/structures-works/from-monomers.ts +185 -32
- package/src/structures-works/map.ts +20 -35
- package/src/structures-works/mol-transformations.ts +295 -582
- package/src/structures-works/save-sense-antisense.ts +35 -11
- package/src/structures-works/sequence-codes-tools.ts +9 -13
- package/{test-SequenceTranslator-49ff04f38f57-128d0678.html → test-SequenceTranslator-e8c06047b7e7-eb4db608.html} +10 -7
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as DG from 'datagrok-api/dg';
|
|
2
2
|
import {getAllCodesOfSynthesizer} from './sequence-codes-tools';
|
|
3
|
+
import {differenceOfTwoArrays} from '../helpers';
|
|
3
4
|
|
|
4
|
-
export const
|
|
5
|
+
export const DELIMITER = ';';
|
|
6
|
+
export const NUCLEOTIDES = ['A', 'G', 'C', 'U', 'T'];
|
|
5
7
|
export const SYNTHESIZERS = {
|
|
6
8
|
RAW_NUCLEOTIDES: 'Raw Nucleotides',
|
|
7
9
|
BIOSPRING: 'BioSpring Codes',
|
|
@@ -16,29 +18,6 @@ export const TECHNOLOGIES = {
|
|
|
16
18
|
ASO_GAPMERS: 'For ASO Gapmers',
|
|
17
19
|
SI_RNA: 'For 2\'-OMe and 2\'-F modified siRNA',
|
|
18
20
|
};
|
|
19
|
-
export const COL_NAMES = {
|
|
20
|
-
CHEMISTRY: 'Chemistry',
|
|
21
|
-
NUMBER: 'Number',
|
|
22
|
-
TYPE: 'Type',
|
|
23
|
-
CHEMISTRY_NAME: 'Chemistry Name',
|
|
24
|
-
INTERNAL_COMPOUND_ID: 'Internal compound ID',
|
|
25
|
-
IDP: 'IDP',
|
|
26
|
-
SEQUENCE: 'Sequence',
|
|
27
|
-
COMPOUND_NAME: 'Compound Name',
|
|
28
|
-
COMPOUND_COMMENTS: 'Compound Comments',
|
|
29
|
-
SALT: 'Salt',
|
|
30
|
-
EQUIVALENTS: 'Equivalents',
|
|
31
|
-
PURITY: 'Purity',
|
|
32
|
-
CPD_MW: 'Cpd MW',
|
|
33
|
-
SALT_MOL_WEIGHT: 'Salt MW',
|
|
34
|
-
SALT_MASS: 'Salt mass',
|
|
35
|
-
BATCH_MW: 'Batch MW',
|
|
36
|
-
SOURCE: 'Source',
|
|
37
|
-
ICD: 'ICD',
|
|
38
|
-
OWNER: 'Owner',
|
|
39
|
-
};
|
|
40
|
-
// interface CODES {
|
|
41
|
-
// }
|
|
42
21
|
export const MODIFICATIONS: {[index: string]: {molecularWeight: number, left: string, right: string}} = {
|
|
43
22
|
'(invabasic)': {
|
|
44
23
|
molecularWeight: 118.13,
|
|
@@ -58,7 +37,7 @@ export const MODIFICATIONS: {[index: string]: {molecularWeight: number, left: st
|
|
|
58
37
|
export const stadardPhosphateLinkSmiles = 'OP(=O)(O)O';
|
|
59
38
|
export const map: {[synthesizer: string]:
|
|
60
39
|
{[technology: string]: {[code: string]:
|
|
61
|
-
{'name'
|
|
40
|
+
{'name': string, 'weight': number, 'normalized': string, 'SMILES': string}}}} = {
|
|
62
41
|
'Raw Nucleotides': {
|
|
63
42
|
'DNA': {
|
|
64
43
|
'A': {
|
|
@@ -68,7 +47,7 @@ export const map: {[synthesizer: string]:
|
|
|
68
47
|
'SMILES': 'OC[C@H]1O[C@@H](N2C3N=CN=C(N)C=3N=C2)C[C@@H]1O',
|
|
69
48
|
},
|
|
70
49
|
'T': {
|
|
71
|
-
'name': '
|
|
50
|
+
'name': 'Thymine',
|
|
72
51
|
'weight': 304.2,
|
|
73
52
|
'normalized': 'dT',
|
|
74
53
|
'SMILES': 'OC[C@H]1O[C@@H](N2C=C(C)C(=O)NC2(=O))C[C@@H]1O',
|
|
@@ -170,7 +149,7 @@ export const map: {[synthesizer: string]:
|
|
|
170
149
|
'SMILES': 'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)C[C@@H]1O',
|
|
171
150
|
},
|
|
172
151
|
'T': {
|
|
173
|
-
'name': '
|
|
152
|
+
'name': 'Thymine',
|
|
174
153
|
'weight': 304.2,
|
|
175
154
|
'normalized': 'dT',
|
|
176
155
|
'SMILES': 'OC[C@H]1O[C@@H](N2C=C(C)C(=O)NC2(=O))C[C@@H]1O',
|
|
@@ -384,13 +363,13 @@ export const map: {[synthesizer: string]:
|
|
|
384
363
|
'SMILES': 'OC[C@H]1O[C@@H](N2C3N=C(N)NC(=O)C=3N=C2)C[C@@H]1O',
|
|
385
364
|
},
|
|
386
365
|
'T': {
|
|
387
|
-
'name': '
|
|
366
|
+
'name': 'Thymine',
|
|
388
367
|
'weight': 304.2,
|
|
389
368
|
'normalized': 'dT',
|
|
390
369
|
'SMILES': 'OC[C@H]1O[C@@H](N2C=C(C)C(=O)NC2(=O))C[C@@H]1O',
|
|
391
370
|
},
|
|
392
371
|
'dT': {
|
|
393
|
-
'name': '
|
|
372
|
+
'name': 'Thymine',
|
|
394
373
|
'weight': 304.2,
|
|
395
374
|
'normalized': 'dT',
|
|
396
375
|
'SMILES': 'OC[C@H]1O[C@@H](N2C=C(C)C(=O)NC2(=O))C[C@@H]1O',
|
|
@@ -572,8 +551,6 @@ export const map: {[synthesizer: string]:
|
|
|
572
551
|
},
|
|
573
552
|
},
|
|
574
553
|
},
|
|
575
|
-
// 'LCMS': {
|
|
576
|
-
// 'For 2\'-OMe and 2\'-F modified siRNA': {
|
|
577
554
|
};
|
|
578
555
|
|
|
579
556
|
export const lcmsToGcrs = `LCMS, GCRS
|
|
@@ -724,12 +701,20 @@ fU, fU
|
|
|
724
701
|
/J-CbCS/, J-CbCS
|
|
725
702
|
/J-MtCD/, J-MtCD`;
|
|
726
703
|
|
|
727
|
-
function differenceOfTwoArrays(a: string[], b: string[]): string[] {
|
|
728
|
-
return a.filter((x) => !b.includes(x));
|
|
729
|
-
}
|
|
730
704
|
|
|
731
705
|
const codesWithSmiles = getAllCodesOfSynthesizer(SYNTHESIZERS.GCRS);
|
|
732
706
|
const allGcrsCodes = DG.DataFrame.fromCsv(lcmsToGcrs).getCol('GCRS').toList();
|
|
733
707
|
export const gcrsCodesWithoutSmiles = differenceOfTwoArrays(allGcrsCodes, codesWithSmiles);
|
|
734
708
|
for (const e of gcrsCodesWithoutSmiles)
|
|
735
|
-
map[SYNTHESIZERS.GCRS]['Others'][e] = {'
|
|
709
|
+
map[SYNTHESIZERS.GCRS]['Others'][e] = {name: '', weight: 0, normalized: '', SMILES: ''};
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
export const weightsObj: {[code: string]: number} = {};
|
|
713
|
+
for (const synthesizer of Object.keys(map)) {
|
|
714
|
+
for (const technology of Object.keys(map[synthesizer])) {
|
|
715
|
+
for (const code of Object.keys(map[synthesizer][technology]))
|
|
716
|
+
weightsObj[code] = map[synthesizer][technology][code].weight;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
for (const [key, value] of Object.entries(MODIFICATIONS))
|
|
720
|
+
weightsObj[key] = value.molecularWeight;
|