@datagrok/bio 1.7.5 → 1.7.8
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 +5 -5
- package/dist/package-test.js +247 -121
- package/dist/package.js +182 -111
- package/files/tests/testActivityCliffs.csv +311 -0
- package/files/tests/testCereal.csv +78 -0
- package/package.json +2 -2
- package/src/__jest__/remote.test.ts +30 -16
- package/src/__jest__/test-node.ts +1 -1
- package/src/const.ts +19 -19
- package/src/package.ts +3 -2
- package/src/tests/convert-test.ts +34 -10
- package/src/tests/detectors-test.ts +13 -1
- package/src/tests/splitters-test.ts +26 -0
- package/src/utils/cell-renderer.ts +0 -1
- package/src/utils/convert.ts +19 -5
- package/src/utils/multiple-sequence-alignment.ts +3 -2
- package/src/utils/utils.ts +10 -8
- package/test-Bio-34f75e5127b8-cdc230d8.html +339 -0
- package/test-Bio-34f75e5127b8-0507068d.html +0 -256
package/detectors.js
CHANGED
|
@@ -23,8 +23,8 @@ class BioPackageDetectors extends DG.Package {
|
|
|
23
23
|
static RnaFastaAlphabet = new Set(['A', 'C', 'G', 'U']);
|
|
24
24
|
|
|
25
25
|
static SmilesRawAlphabet = new Set([
|
|
26
|
-
'
|
|
27
|
-
'1', '2', '3', '4', '5', '6', '7',
|
|
26
|
+
'B', 'C', 'c', 'E', 'H', 'L', 'M', 'N', 'O', 'S', 'F', '(', ')',
|
|
27
|
+
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
|
28
28
|
'+', '-', '@', '[', ']', '/', '\\', '#', '=']);
|
|
29
29
|
|
|
30
30
|
/** @param s {String} - string to check
|
|
@@ -58,7 +58,7 @@ class BioPackageDetectors extends DG.Package {
|
|
|
58
58
|
// TODO: Lazy calculations could be helpful for performance and convenient for expressing classification logic.
|
|
59
59
|
const statsAsChars = BioPackageDetectors.getStats(col, 5, BioPackageDetectors.splitterAsChars);
|
|
60
60
|
|
|
61
|
-
const decoy = BioPackageDetectors.detectAlphabet(statsAsChars.freq, decoyAlphabets, null, 0.
|
|
61
|
+
const decoy = BioPackageDetectors.detectAlphabet(statsAsChars.freq, decoyAlphabets, null, 0.35);
|
|
62
62
|
if (decoy != 'UN') return null;
|
|
63
63
|
|
|
64
64
|
if (statsAsChars.sameLength) {
|
|
@@ -110,10 +110,10 @@ class BioPackageDetectors extends DG.Package {
|
|
|
110
110
|
// !!! What is the difference between the gap symbol and separator symbol in stats terms?
|
|
111
111
|
// const noSeparatorRe = /[a-z\d]+$/i;
|
|
112
112
|
const noSeparatorChemRe = /[HBCNOFPSKVYI]/i; // Mendeleev's periodic table single char elements
|
|
113
|
-
const noSeparatorAlphaDigitRe = /[\dA-Z]/i;
|
|
113
|
+
const noSeparatorAlphaDigitRe = /[\dA-Z,& _]/i; // ..., comma, ampersand, space, underscore
|
|
114
114
|
const noSeparatorBracketsRe = /[\[\]()<>{}]/i;
|
|
115
115
|
const cleanFreq = Object.assign({}, ...Object.entries(freq)
|
|
116
|
-
.filter(([m, f]) =>
|
|
116
|
+
.filter(([m, f]) =>
|
|
117
117
|
!noSeparatorChemRe.test(m) && !noSeparatorAlphaDigitRe.test(m) && !noSeparatorBracketsRe.test(m) &&
|
|
118
118
|
!BioPackageDetectors.PeptideFastaAlphabet.has(m) &&
|
|
119
119
|
!BioPackageDetectors.DnaFastaAlphabet.has(m))
|