@datagrok/bio 2.10.26 → 2.10.28
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/CHANGELOG.md +2 -2
- package/dist/1.js +1 -1
- package/dist/1.js.map +1 -1
- package/dist/196.js +1 -1
- package/dist/196.js.map +1 -1
- package/dist/770.js +2 -0
- package/dist/770.js.map +1 -0
- 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/files/tests/sepComplex.csv +4 -0
- package/package.json +35 -3
- package/src/package.g.ts +0 -0
- package/src/package.ts +17 -3
- package/src/tests/WebLogo-positions-test.ts +4 -4
- package/src/tests/detectors-benchmark-tests.ts +1 -1
- package/src/tests/detectors-tests.ts +15 -4
- package/tsconfig.json +2 -2
- package/webpack.config.js +4 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Leonid Stolbov",
|
|
6
6
|
"email": "lstolbov@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.10.
|
|
8
|
+
"version": "2.10.28",
|
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@biowasm/aioli": "^3.1.0",
|
|
37
37
|
"@datagrok-libraries/bio": "^5.38.13",
|
|
38
38
|
"@datagrok-libraries/chem-meta": "^1.0.1",
|
|
39
|
-
"@datagrok-libraries/ml": "^6.3.
|
|
39
|
+
"@datagrok-libraries/ml": "^6.3.50",
|
|
40
40
|
"@datagrok-libraries/tutorials": "^1.3.6",
|
|
41
41
|
"@datagrok-libraries/utils": "^4.0.17",
|
|
42
42
|
"cash-dom": "^8.0.0",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"@types/wu": "latest",
|
|
56
56
|
"@typescript-eslint/eslint-plugin": "latest",
|
|
57
57
|
"@typescript-eslint/parser": "latest",
|
|
58
|
+
"datagrok-tools": "latest",
|
|
58
59
|
"eslint": "latest",
|
|
59
60
|
"eslint-config-google": "latest",
|
|
60
61
|
"source-map-loader": "^4.0.1",
|
|
@@ -100,5 +101,36 @@
|
|
|
100
101
|
"sources": [
|
|
101
102
|
"css/helm.css"
|
|
102
103
|
],
|
|
103
|
-
"category": "Bioinformatics"
|
|
104
|
+
"category": "Bioinformatics",
|
|
105
|
+
"meta": {
|
|
106
|
+
"menu": {
|
|
107
|
+
"Bio": {
|
|
108
|
+
"Analyze": {
|
|
109
|
+
"SAR...": null,
|
|
110
|
+
"Sequence Space...": null,
|
|
111
|
+
"Hierarchical Clustering...": null,
|
|
112
|
+
"Activity Cliffs...": null,
|
|
113
|
+
"Sequence Space": null,
|
|
114
|
+
"MSA...": null,
|
|
115
|
+
"Composition": null
|
|
116
|
+
},
|
|
117
|
+
"Search": {
|
|
118
|
+
"Diversity Search": null,
|
|
119
|
+
"Similarity Search": null,
|
|
120
|
+
"Subsequence Search...": null
|
|
121
|
+
},
|
|
122
|
+
"Calculate": {
|
|
123
|
+
"Identity...": null,
|
|
124
|
+
"Similarity...": null
|
|
125
|
+
},
|
|
126
|
+
"Convert": {
|
|
127
|
+
"Split to Monomerts...": null,
|
|
128
|
+
"Get Region...": null,
|
|
129
|
+
"Notation...": null,
|
|
130
|
+
"SDF to JSON Library...": null,
|
|
131
|
+
"To Atomic Level...": null
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
104
136
|
}
|
package/src/package.g.ts
ADDED
|
File without changes
|
package/src/package.ts
CHANGED
|
@@ -74,6 +74,7 @@ import {DIMENSIONALITY_REDUCER_TERMINATE_EVENT}
|
|
|
74
74
|
from '@datagrok-libraries/ml/src/workers/dimensionality-reducing-worker-creator';
|
|
75
75
|
import {Options} from '@datagrok-libraries/utils/src/type-declarations';
|
|
76
76
|
import {sequenceToMolfile} from './utils/sequence-to-mol';
|
|
77
|
+
import {SHOW_SCATTERPLOT_PROGRESS} from '@datagrok-libraries/ml/src/functionEditors/seq-space-base-editor';
|
|
77
78
|
|
|
78
79
|
export const _package = new BioPackage();
|
|
79
80
|
|
|
@@ -465,8 +466,9 @@ export async function activityCliffs(df: DG.DataFrame, macroMolecule: DG.Column<
|
|
|
465
466
|
//input: string methodName { choices:["UMAP", "t-SNE"] }
|
|
466
467
|
//input: string similarityMetric { choices:["Hamming", "Levenshtein", "Monomer chemical distance"] }
|
|
467
468
|
//input: bool plotEmbeddings = true
|
|
468
|
-
//input: double sparseMatrixThreshold = 0
|
|
469
|
+
//input: double sparseMatrixThreshold = 0 [Similarity Threshold for sparse matrix calculation]
|
|
469
470
|
//input: object options {optional: true}
|
|
471
|
+
//output: viewer result
|
|
470
472
|
//editor: Bio:SequenceSpaceEditor
|
|
471
473
|
export async function sequenceSpaceTopMenu(
|
|
472
474
|
table: DG.DataFrame, macroMolecule: DG.Column, methodName: DimReductionMethods,
|
|
@@ -497,8 +499,11 @@ export async function sequenceSpaceTopMenu(
|
|
|
497
499
|
embedYCol = table.columns.byName(embedColsNames[1]);
|
|
498
500
|
}
|
|
499
501
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
if (options?.[SHOW_SCATTERPLOT_PROGRESS]) {
|
|
503
|
+
scatterPlot?.root && ui.setUpdateIndicator(scatterPlot!.root, false);
|
|
504
|
+
embedXCol.init((i) => embeddings[i] ? embeddings[i][0] : undefined);
|
|
505
|
+
embedYCol.init((i) => embeddings[i] ? embeddings[i][1] : undefined);
|
|
506
|
+
}
|
|
502
507
|
const progress = (_nEpoch / epochsLength * 100);
|
|
503
508
|
pg.update(progress, `Running sequence space ... ${progress.toFixed(0)}%`);
|
|
504
509
|
}
|
|
@@ -524,6 +529,14 @@ export async function sequenceSpaceTopMenu(
|
|
|
524
529
|
}
|
|
525
530
|
|
|
526
531
|
async function getSeqSpace() {
|
|
532
|
+
table.columns.add(DG.Column.float(embedColsNames[0], table.rowCount));
|
|
533
|
+
table.columns.add(DG.Column.float(embedColsNames[1], table.rowCount));
|
|
534
|
+
if (plotEmbeddings) {
|
|
535
|
+
scatterPlot = grok.shell
|
|
536
|
+
.tableView(table.name)
|
|
537
|
+
.scatterPlot({x: embedColsNames[0], y: embedColsNames[1], title: 'Sequence space'});
|
|
538
|
+
ui.setUpdateIndicator(scatterPlot.root, true);
|
|
539
|
+
}
|
|
527
540
|
let resolveF: Function | null = null;
|
|
528
541
|
|
|
529
542
|
const sub = grok.events.onViewerClosed.subscribe((args) => {
|
|
@@ -579,6 +592,7 @@ export async function sequenceSpaceTopMenu(
|
|
|
579
592
|
.tableView(table.name)
|
|
580
593
|
.scatterPlot({x: embedColsNames[0], y: embedColsNames[1], title: 'Sequence space'});
|
|
581
594
|
}
|
|
595
|
+
ui.setUpdateIndicator(scatterPlot.root, false);
|
|
582
596
|
return scatterPlot;
|
|
583
597
|
}
|
|
584
598
|
}
|
|
@@ -32,7 +32,7 @@ ATC-G-TTGC--
|
|
|
32
32
|
const wlViewer: WebLogoViewer = (await df.plot.fromType('WebLogo')) as WebLogoViewer;
|
|
33
33
|
await testEvent(wlViewer.onLayoutCalculated, () => {}, () => {
|
|
34
34
|
tv.dockManager.dock(wlViewer.root, DG.DOCK_TYPE.DOWN);
|
|
35
|
-
},
|
|
35
|
+
}, 500);
|
|
36
36
|
const positions: PI[] = wlViewer['positions'];
|
|
37
37
|
|
|
38
38
|
const resAllDf1: PI[] = [
|
|
@@ -122,7 +122,7 @@ ATC-G-TTGC--
|
|
|
122
122
|
{'skipEmptyPositions': true})) as WebLogoViewer;
|
|
123
123
|
await testEvent(wlViewer.onLayoutCalculated, () => {}, () => {
|
|
124
124
|
tv.dockManager.dock(wlViewer.root, DG.DOCK_TYPE.DOWN);
|
|
125
|
-
},
|
|
125
|
+
}, 500);
|
|
126
126
|
const resPosList: PI[] = wlViewer['positions'];
|
|
127
127
|
|
|
128
128
|
const tgtPosList: PI[] = [
|
|
@@ -158,7 +158,7 @@ ATC-G-TTGC--
|
|
|
158
158
|
})) as WebLogoViewer;
|
|
159
159
|
await testEvent(wlViewer.onLayoutCalculated, () => {}, () => {
|
|
160
160
|
tv.dockManager.dock(wlViewer.root, DG.DOCK_TYPE.DOWN);
|
|
161
|
-
},
|
|
161
|
+
}, 500);
|
|
162
162
|
const resPosList: PI[] = wlViewer['positions'];
|
|
163
163
|
const tgtPosList: PI[] = [
|
|
164
164
|
new PI(2, '3', {'C': new PMI(5)}),
|
|
@@ -194,7 +194,7 @@ ATC-G-TTGC--
|
|
|
194
194
|
const wlViewer: WebLogoViewer = (await df.plot.fromType('WebLogo')) as WebLogoViewer;
|
|
195
195
|
await testEvent(wlViewer.onLayoutCalculated, () => {}, () => {
|
|
196
196
|
tv.dockManager.dock(wlViewer.root, DG.DOCK_TYPE.DOWN);
|
|
197
|
-
},
|
|
197
|
+
}, 500);
|
|
198
198
|
const resPosList: PI[] = wlViewer['positions'];
|
|
199
199
|
});
|
|
200
200
|
});
|
|
@@ -25,7 +25,7 @@ category('detectorsBenchmark', () => {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
test('fastaDnaShorts50Many1E6', async () => {
|
|
28
|
-
await detectMacromoleculeBenchmark(
|
|
28
|
+
await detectMacromoleculeBenchmark(20, NOTATION.FASTA, ALPHABET.DNA, 50, 1E6);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
test('fastaDnaLong1e6Few50', async () => {
|
|
@@ -39,6 +39,7 @@ category('detectors', () => {
|
|
|
39
39
|
sepUn2 = 'sepUn2',
|
|
40
40
|
sepMsaDna1 = 'sepMsaDna1',
|
|
41
41
|
sepMsaUnWEmpty = 'sepMsaUnWEmpty',
|
|
42
|
+
sepComplex = 'sepComplex',
|
|
42
43
|
fastaMsaDna1 = 'fastaMsaDna1',
|
|
43
44
|
fastaMsaPt1 = 'fastaMsaPt1',
|
|
44
45
|
}
|
|
@@ -115,6 +116,10 @@ m1-M-m3-mon4-mon5-N-T-MON8-N9
|
|
|
115
116
|
m1-mon2-m3-mon4-mon5-Num--MON8-N9
|
|
116
117
|
|
|
117
118
|
mon1-M-mon3-mon4-mon5---MON8-N9`;
|
|
119
|
+
[csvTests.sepComplex]: string = `seq
|
|
120
|
+
Ac(1)-F-K(AEEA-AEEA-R-Ac)-L-mF-V-Y-mNle-D-W-N-mF-C(1)-G-NH2
|
|
121
|
+
Ac(1)-F-K(AEEA-ARRA-W-Ac)-L-mF-V-Y-mNle-D-W-N-mF-C(1)-G-NH2
|
|
122
|
+
Ac(1)-F-K(AEEA-AEEA-Ac)-L-mF-V-Y-mNle-D-W-N-mF-C(1)-G-NH2`;
|
|
118
123
|
[csvTests.fastaMsaDna1]: string = `seq
|
|
119
124
|
AC-GT-CT
|
|
120
125
|
CAC-T-GT
|
|
@@ -244,10 +249,6 @@ MWRSWY-CKHP`;
|
|
|
244
249
|
NOTATION.FASTA, ALIGNMENT.SEQ_MSA, ALPHABET.UN, 12, true);
|
|
245
250
|
});
|
|
246
251
|
|
|
247
|
-
test('SepMsaUnWEmpty', async () => {
|
|
248
|
-
await _testPos(readCsv(csvTests.sepMsaUnWEmpty), 'seq',
|
|
249
|
-
NOTATION.SEPARATOR, ALIGNMENT.SEQ_MSA, ALPHABET.UN, 14, true);
|
|
250
|
-
});
|
|
251
252
|
test('FastaMsaDna1', async () => {
|
|
252
253
|
await _testPos(readCsv(csvTests.fastaMsaDna1), 'seq',
|
|
253
254
|
NOTATION.FASTA, ALIGNMENT.SEQ_MSA, ALPHABET.DNA, 4, false);
|
|
@@ -284,6 +285,16 @@ MWRSWY-CKHP`;
|
|
|
284
285
|
NOTATION.SEPARATOR, ALIGNMENT.SEQ_MSA, ALPHABET.DNA, 4, false, '-');
|
|
285
286
|
});
|
|
286
287
|
|
|
288
|
+
test('SepMsaUnWEmpty', async () => {
|
|
289
|
+
await _testPos(readCsv(csvTests.sepMsaUnWEmpty), 'seq',
|
|
290
|
+
NOTATION.SEPARATOR, ALIGNMENT.SEQ_MSA, ALPHABET.UN, 14, true);
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
test('SepComplex', async () => {
|
|
294
|
+
await _testPos(readCsv(csvTests.sepComplex), 'seq',
|
|
295
|
+
NOTATION.SEPARATOR, ALIGNMENT.SEQ, ALPHABET.UN, 18, true);
|
|
296
|
+
});
|
|
297
|
+
|
|
287
298
|
test('samplesFastaCsv', async () => {
|
|
288
299
|
await _testDf(readSamples(Samples.fastaCsv), {
|
|
289
300
|
'Sequence': new PosCol(NOTATION.FASTA, ALIGNMENT.SEQ, ALPHABET.PT, 20, false),
|
package/tsconfig.json
CHANGED
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
62
62
|
|
|
63
63
|
/* Experimental Options */
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
65
|
+
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
66
66
|
|
|
67
67
|
/* Advanced Options */
|
|
68
68
|
"skipLibCheck": false, /* Skip type checking of declaration files. */
|
package/webpack.config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
+
const FuncGeneratorPlugin = require('datagrok-tools/plugins/func-gen-plugin');
|
|
2
3
|
const packageName = path.parse(require('./package.json').name).name.toLowerCase().replace(/-/g, '');
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
@@ -22,6 +23,9 @@ module.exports = {
|
|
|
22
23
|
{test: /\.css$/, use: ['style-loader', 'css-loader']},
|
|
23
24
|
],
|
|
24
25
|
},
|
|
26
|
+
plugins: [
|
|
27
|
+
new FuncGeneratorPlugin({outputPath: './src/package.g.ts'}),
|
|
28
|
+
],
|
|
25
29
|
devtool: 'source-map',
|
|
26
30
|
externals: {
|
|
27
31
|
'datagrok-api/dg': 'DG',
|