@datagrok/bio 1.7.16 → 1.7.21
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 -4
- package/dist/package-test.js +281 -143
- package/dist/package.js +146 -106
- package/files/tests/testDmvOffices.csv +514 -0
- package/package.json +3 -3
- package/setup +35 -0
- package/setup-unlink-clean +22 -0
- package/src/package-test.ts +1 -0
- package/src/package.ts +11 -69
- package/src/tests/WebLogo-positions-test.ts +68 -0
- package/src/tests/activity-cliffs-tests.ts +2 -2
- package/src/tests/detectors-test.ts +10 -1
- package/src/tests/msa-tests.ts +45 -20
- package/src/tests/utils.ts +0 -12
- package/src/utils/cell-renderer.ts +16 -29
- package/src/utils/multiple-sequence-alignment.ts +7 -11
- package/src/utils/utils.ts +6 -6
- package/src/widgets/representations.ts +1 -0
- package/{test-Bio-4f0c8bae6479-dda97945.html → test-Bio-4f0c8bae6479-9ad1eb12.html} +8 -10
package/detectors.js
CHANGED
|
@@ -21,9 +21,10 @@ class BioPackageDetectors extends DG.Package {
|
|
|
21
21
|
static RnaFastaAlphabet = new Set(['A', 'C', 'G', 'U']);
|
|
22
22
|
|
|
23
23
|
static SmilesRawAlphabet = new Set([
|
|
24
|
-
'B', 'C', '
|
|
24
|
+
'A', 'B', 'C', 'E', 'F', 'H', 'I', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'Z',
|
|
25
|
+
'a', 'c', 'e', 'g', 'i', 'l', 'n', 'o', 'r', 's', 't', 'u',
|
|
25
26
|
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
|
26
|
-
'+', '-', '@', '[', ']', '
|
|
27
|
+
'+', '-', '.', , '/', '\\', '@', '[', ']', '(', ')', '#', '%', '=']);
|
|
27
28
|
|
|
28
29
|
/** @param s {String} - string to check
|
|
29
30
|
* @returns {boolean} */
|
|
@@ -75,7 +76,7 @@ class BioPackageDetectors extends DG.Package {
|
|
|
75
76
|
const statsAsChars = BioPackageDetectors.getStats(col, 5, BioPackageDetectors.splitterAsChars);
|
|
76
77
|
// if (Object.keys(statsAsChars.freq).length === 0) return;
|
|
77
78
|
|
|
78
|
-
const decoy = BioPackageDetectors.detectAlphabet(statsAsChars.freq, decoyAlphabets, null, 0.
|
|
79
|
+
const decoy = BioPackageDetectors.detectAlphabet(statsAsChars.freq, decoyAlphabets, null, 0.30);
|
|
79
80
|
if (decoy != 'UN') return null;
|
|
80
81
|
|
|
81
82
|
if (statsAsChars.sameLength) {
|
|
@@ -215,7 +216,7 @@ class BioPackageDetectors extends DG.Package {
|
|
|
215
216
|
const alphabetA = [];
|
|
216
217
|
for (const m of keys) {
|
|
217
218
|
freqA.push(m in freq ? freq[m] : 0);
|
|
218
|
-
alphabetA.push(alphabet.has(m) ? 10 : -
|
|
219
|
+
alphabetA.push(alphabet.has(m) ? 10 : -20 /* penalty for character outside alphabet set*/);
|
|
219
220
|
}
|
|
220
221
|
/* There were a few ideas: chi-squared, pearson correlation (variance?), scalar product */
|
|
221
222
|
const cos = BioPackageDetectors.vectorDotProduct(freqA, alphabetA) / (BioPackageDetectors.vectorLength(freqA) * BioPackageDetectors.vectorLength(alphabetA));
|