@datagrok/bio 1.5.7 → 1.5.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/css/helm.css +3 -0
- package/detectors.js +9 -10
- package/dist/package-test.js +1095 -416
- package/dist/package.js +898 -250
- package/files/samples/sample_FASTA.csv +66 -66
- package/helm/JSDraw/Pistoia.HELM-uncompressed.js +9694 -0
- package/helm/JSDraw/Pistoia.HELM.js +27 -0
- package/helm/JSDraw/ReadMe.txt +8 -0
- package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +31126 -0
- package/helm/JSDraw/Scilligence.JSDraw2.Lite.js +12 -0
- package/helm/JSDraw/Scilligence.JSDraw2.Resources.js +762 -0
- package/helm/JSDraw/dojo.js +250 -0
- package/helm/JSDraw/test.html +21 -0
- package/package.json +8 -1
- package/src/monomer-library.ts +199 -0
- package/src/package-test.ts +2 -0
- package/src/package.ts +41 -13
- package/src/tests/convert-test.ts +143 -22
- package/src/tests/detectors-test.ts +97 -156
- package/src/tests/renderer-test.ts +36 -0
- package/src/tests/splitter-test.ts +22 -0
- package/src/tests/types.ts +7 -0
- package/src/utils/atomic-works.ts +218 -97
- package/src/utils/cell-renderer.ts +214 -0
- package/src/utils/chem-palette.ts +280 -0
- package/src/utils/convert.ts +25 -16
- package/src/utils/misc.ts +29 -0
- package/src/utils/multiple-sequence-alignment.ts +1 -1
- package/src/utils/notation-converter.ts +120 -84
- package/src/utils/sequence-activity-cliffs.ts +2 -2
- package/src/utils/types.ts +13 -0
- package/src/utils/utils.ts +35 -30
- package/test-Bio-34f75e5127b8-c4c5a3dc.html +259 -0
- package/files/sample_FASTA.csv +0 -66
- package/files/sample_FASTA_with_activities.csv +0 -66
- package/files/sample_MSA.csv +0 -541
package/css/helm.css
ADDED
package/detectors.js
CHANGED
|
@@ -13,16 +13,14 @@ class BioPackageDetectors extends DG.Package {
|
|
|
13
13
|
|
|
14
14
|
static mmSemType = 'Macromolecule';
|
|
15
15
|
|
|
16
|
-
static
|
|
17
|
-
FastaSeqPt: 'fasta:SEQ:PT', FastaSeqNt: 'fasta:SEQ:NT', FastaMsaPt: 'fasta:MSA:PT', FastaMsaNt: 'fasta:MSA:NT',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
static AminoacidsFastaAlphabet = new Set([
|
|
16
|
+
static PeptideFastaAlphabet = new Set([
|
|
21
17
|
'G', 'L', 'Y', 'S', 'E', 'Q', 'D', 'N', 'F', 'A',
|
|
22
18
|
'K', 'R', 'H', 'C', 'V', 'P', 'W', 'I', 'M', 'T',
|
|
23
19
|
]);
|
|
24
20
|
|
|
25
|
-
static
|
|
21
|
+
static DnaFastaAlphabet = new Set(['A', 'C', 'G', 'T']);
|
|
22
|
+
|
|
23
|
+
static RnaFastaAlphabet = new Set(['A', 'C', 'G', 'U']);
|
|
26
24
|
|
|
27
25
|
|
|
28
26
|
/** @param s {String} - string to check
|
|
@@ -43,8 +41,9 @@ class BioPackageDetectors extends DG.Package {
|
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
const alphabetCandidates = [
|
|
46
|
-
['
|
|
47
|
-
['
|
|
44
|
+
['PT', BioPackageDetectors.PeptideFastaAlphabet],
|
|
45
|
+
['DNA', BioPackageDetectors.DnaFastaAlphabet],
|
|
46
|
+
['RNA', BioPackageDetectors.RnaFastaAlphabet],
|
|
48
47
|
];
|
|
49
48
|
|
|
50
49
|
// TODO: Detect HELM sequence
|
|
@@ -103,8 +102,8 @@ class BioPackageDetectors extends DG.Package {
|
|
|
103
102
|
const cleanFreq = Object.assign({}, ...Object.entries(freq)
|
|
104
103
|
.filter(([m, f]) => m != ' ' &&
|
|
105
104
|
!noSeparatorChemRe.test(m) && !noSeparatorAlphaDigitRe.test(m) &&
|
|
106
|
-
!BioPackageDetectors.
|
|
107
|
-
!BioPackageDetectors.
|
|
105
|
+
!BioPackageDetectors.PeptideFastaAlphabet.has(m) &&
|
|
106
|
+
!BioPackageDetectors.DnaFastaAlphabet.has(m))
|
|
108
107
|
.map(([m, f]) => ({[m]: f})));
|
|
109
108
|
if (Object.keys(cleanFreq).length == 0) return null;
|
|
110
109
|
|