@datagrok/bio 2.11.6 → 2.11.7
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 +2 -5
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +2 -2
- package/src/tests/units-handler-splitted-tests.ts +43 -13
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Leonid Stolbov",
|
|
6
6
|
"email": "lstolbov@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.11.
|
|
8
|
+
"version": "2.11.7",
|
|
9
9
|
"description": "Bioinformatics support (import/export of sequences, conversion, visualization, analysis). [See more](https://github.com/datagrok-ai/public/blob/master/packages/Bio/README.md) for details.",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@biowasm/aioli": "^3.1.0",
|
|
37
|
-
"@datagrok-libraries/bio": "^5.39.
|
|
37
|
+
"@datagrok-libraries/bio": "^5.39.2",
|
|
38
38
|
"@datagrok-libraries/chem-meta": "^1.0.1",
|
|
39
39
|
"@datagrok-libraries/ml": "^6.3.53",
|
|
40
40
|
"@datagrok-libraries/tutorials": "^1.3.6",
|
|
@@ -6,12 +6,25 @@ import {GapSymbols, UnitsHandler} from '@datagrok-libraries/bio/src/utils/units-
|
|
|
6
6
|
import {NOTATION} from '@datagrok-libraries/bio/src/utils/macromolecule';
|
|
7
7
|
import {ISeqSplitted} from '@datagrok-libraries/bio/src/utils/macromolecule/types';
|
|
8
8
|
|
|
9
|
+
enum Tests {
|
|
10
|
+
fasta = 'fasta',
|
|
11
|
+
fastaMsa = 'fastaMsa',
|
|
12
|
+
separator = 'separator',
|
|
13
|
+
separatorMsa = 'separatorMsa',
|
|
14
|
+
helm = 'helm',
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
category('UnitsHandler', () => {
|
|
10
18
|
const fG = GapSymbols[NOTATION.FASTA];
|
|
11
19
|
const hG = GapSymbols[NOTATION.HELM];
|
|
12
20
|
const sG = GapSymbols[NOTATION.SEPARATOR];
|
|
13
|
-
const data: {
|
|
14
|
-
|
|
21
|
+
const data: {
|
|
22
|
+
[testName: string]: {
|
|
23
|
+
src: { csv: string },
|
|
24
|
+
tgt: { notation: NOTATION, separator?: string, splitted: (string[] | string)[] }
|
|
25
|
+
}
|
|
26
|
+
} = {
|
|
27
|
+
[Tests.fasta]: {
|
|
15
28
|
src: {
|
|
16
29
|
csv: `seq
|
|
17
30
|
ACGTCACGTC
|
|
@@ -19,6 +32,7 @@ CAGTGTCAGTGT
|
|
|
19
32
|
TTCAACTTCAAC`
|
|
20
33
|
},
|
|
21
34
|
tgt: {
|
|
35
|
+
notation: NOTATION.FASTA,
|
|
22
36
|
splitted: [
|
|
23
37
|
'ACGTCACGTC',
|
|
24
38
|
'CAGTGTCAGTGT',
|
|
@@ -26,7 +40,7 @@ TTCAACTTCAAC`
|
|
|
26
40
|
]
|
|
27
41
|
}
|
|
28
42
|
},
|
|
29
|
-
fastaMsa: {
|
|
43
|
+
[Tests.fastaMsa]: {
|
|
30
44
|
src: {
|
|
31
45
|
csv: `seq
|
|
32
46
|
AC-GT-CTAC-GT-CT
|
|
@@ -34,6 +48,7 @@ CAC-T-GTCAC-T-GT
|
|
|
34
48
|
ACCGTACTACCGTACT`,
|
|
35
49
|
},
|
|
36
50
|
tgt: {
|
|
51
|
+
notation: NOTATION.FASTA,
|
|
37
52
|
splitted: [
|
|
38
53
|
//@formatter:off
|
|
39
54
|
'AC-GT-CTAC-GT-CT',
|
|
@@ -43,7 +58,7 @@ ACCGTACTACCGTACT`,
|
|
|
43
58
|
]
|
|
44
59
|
}
|
|
45
60
|
},
|
|
46
|
-
separator: {
|
|
61
|
+
[Tests.separator]: {
|
|
47
62
|
src: {
|
|
48
63
|
csv: `seq
|
|
49
64
|
abc-dfgg-abc1-cfr3-rty-wert-abc-dfgg-abc1-cfr3-rty-wert
|
|
@@ -51,6 +66,8 @@ rut12-her2-rty-wert-abc-abc1-dfgg-rut12-her2-rty-wert-abc
|
|
|
51
66
|
rut12-rty-her2-abc-cfr3-wert-rut12-rut12-rty-her2-abc-cfr3`,
|
|
52
67
|
},
|
|
53
68
|
tgt: {
|
|
69
|
+
notation: NOTATION.SEPARATOR,
|
|
70
|
+
separator: '-',
|
|
54
71
|
splitted: [
|
|
55
72
|
['abc', 'dfgg', 'abc1', 'cfr3', 'rty', 'wert', 'abc', 'dfgg', 'abc1', 'cfr3', 'rty', 'wert'],
|
|
56
73
|
['rut12', 'her2', 'rty', 'wert', 'abc', 'abc1', 'dfgg', 'rut12', 'her2', 'rty', 'wert', 'abc'],
|
|
@@ -59,22 +76,31 @@ rut12-rty-her2-abc-cfr3-wert-rut12-rut12-rty-her2-abc-cfr3`,
|
|
|
59
76
|
}
|
|
60
77
|
},
|
|
61
78
|
|
|
62
|
-
separatorMsa: {
|
|
79
|
+
[Tests.separatorMsa]: {
|
|
63
80
|
src: {
|
|
64
81
|
csv: `seq
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
rut0-dfgg-abc1-cfr3-rty-wert-abc-dfgg-abc1-cfr3-rty-wert
|
|
83
|
+
rut1-her2-rty--abc1-dfgg-rut12-her2-rty--abc1-dfgg
|
|
84
|
+
rut2-rty-her2---wert-rut12-rty-her2---wert
|
|
85
|
+
\"rut3-rty-her2-\"\"-\"\"-\"\"-\"\"-wert-rut12-rty-her2-\"\"-\"\"-\"\"-\"\"-wert\"
|
|
86
|
+
\"\"\"-\"\"-rut4-her2-wert-rut12-rty-her2-wert\"
|
|
87
|
+
\"rut5-rty-her2-wert-rut12-rty-her2-wert-\"\"-\"\"\"`
|
|
68
88
|
},
|
|
69
89
|
tgt: {
|
|
90
|
+
notation: NOTATION.SEPARATOR,
|
|
91
|
+
separator: '-',
|
|
70
92
|
splitted: [
|
|
71
|
-
['
|
|
72
|
-
['
|
|
73
|
-
['
|
|
93
|
+
['rut0', 'dfgg', 'abc1', 'cfr3', 'rty', 'wert', 'abc', 'dfgg', 'abc1', 'cfr3', 'rty', 'wert'],
|
|
94
|
+
['rut1', 'her2', 'rty', sG, 'abc1', 'dfgg', 'rut12', 'her2', 'rty', sG, 'abc1', 'dfgg'],
|
|
95
|
+
['rut2', 'rty', 'her2', sG, sG, 'wert', 'rut12', 'rty', 'her2', sG, sG, 'wert'],
|
|
96
|
+
['rut3', 'rty', 'her2', sG, sG, 'wert', 'rut12', 'rty', 'her2', sG, sG, 'wert'],
|
|
97
|
+
[sG, 'rut4', 'her2', 'wert', 'rut12', 'rty', 'her2', 'wert'],
|
|
98
|
+
['rut5', 'rty', 'her2', 'wert', 'rut12', 'rty', 'her2', 'wert', sG],
|
|
74
99
|
]
|
|
75
100
|
}
|
|
76
101
|
},
|
|
77
|
-
|
|
102
|
+
|
|
103
|
+
[Tests.helm]: {
|
|
78
104
|
src: {
|
|
79
105
|
csv: `seq
|
|
80
106
|
PEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et.Thr_PO3H2.Aca.D-Tyr_Et}$$$$
|
|
@@ -83,6 +109,7 @@ PEPTIDE1{Lys_Boc.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.dK.Thr_PO3H2.Aca}$$$$
|
|
|
83
109
|
PEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.T.dK.Thr_PO3H2}$$$$`
|
|
84
110
|
},
|
|
85
111
|
tgt: {
|
|
112
|
+
notation: NOTATION.HELM,
|
|
86
113
|
splitted: [
|
|
87
114
|
['meI', 'hHis', 'Aca', 'N', 'T', 'dE', 'Thr_PO3H2', 'Aca', 'D-Tyr_Et', 'Thr_PO3H2', 'Aca', 'D-Tyr_Et'],
|
|
88
115
|
['meI', 'hHis', 'Aca', 'Cys_SEt', 'T', 'dK', 'Thr_PO3H2', 'Aca', 'dK', 'Thr_PO3H2', 'Aca'],
|
|
@@ -103,8 +130,11 @@ PEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.T.dK.Thr_PO3H2}$$$$`
|
|
|
103
130
|
expect(col.semType, DG.SEMTYPE.MACROMOLECULE);
|
|
104
131
|
|
|
105
132
|
const uh = UnitsHandler.getOrCreate(col);
|
|
133
|
+
expect(uh.notation, testData.tgt.notation);
|
|
134
|
+
expect(uh.separator === testData.tgt.separator, true);
|
|
135
|
+
|
|
106
136
|
const resSplitted: ISeqSplitted[] = uh.splitted;
|
|
107
137
|
expectArray(resSplitted, testData.tgt.splitted);
|
|
108
|
-
});
|
|
138
|
+
}, testName == Tests.separatorMsa ? {skipReason: '#2468 CSV row starting with the quote character'} : undefined);
|
|
109
139
|
}
|
|
110
140
|
});
|