@datagrok/bio 1.11.4 → 2.0.0
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/README.md +10 -9
- package/dist/package-test.js +33 -31
- package/dist/package.js +25 -87
- package/package.json +2 -6
- package/src/package.ts +10 -12
- package/src/tests/renderers-test.ts +9 -0
- package/src/utils/cell-renderer.ts +7 -11
- package/{test-Bio-a3ba57cf36f3-42effe59.html → test-Bio-c5a05867bf79-1b9affa5.html} +2 -2
- package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
- package/helm/JSDraw/Pistoia.HELM.js +0 -27
- package/helm/JSDraw/ReadMe.txt +0 -8
- package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
- package/helm/JSDraw/Scilligence.JSDraw2.Lite.js +0 -12
- package/helm/JSDraw/Scilligence.JSDraw2.Resources.js +0 -762
- package/helm/JSDraw/dojo.js +0 -250
- package/helm/JSDraw/test.html +0 -21
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Leonid Stolbov",
|
|
6
6
|
"email": "lstolbov@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "2.0.0",
|
|
9
9
|
"description": "Bio is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -70,11 +70,7 @@
|
|
|
70
70
|
"Developers"
|
|
71
71
|
],
|
|
72
72
|
"sources": [
|
|
73
|
-
"css/helm.css"
|
|
74
|
-
"https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js",
|
|
75
|
-
"helm/JSDraw/Scilligence.JSDraw2.Lite.js",
|
|
76
|
-
"helm/JSDraw/Scilligence.JSDraw2.Resources.js",
|
|
77
|
-
"helm/JSDraw/Pistoia.HELM-uncompressed.js"
|
|
73
|
+
"css/helm.css"
|
|
78
74
|
],
|
|
79
75
|
"category": "Bioinformatics"
|
|
80
76
|
}
|
package/src/package.ts
CHANGED
|
@@ -37,17 +37,6 @@ import * as C from './utils/constants';
|
|
|
37
37
|
export async function initBio() {
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//name: testManySequencesPerformance
|
|
41
|
-
export function testManySequencesPerformance(): void {
|
|
42
|
-
performanceTest(generateManySequences, 'Many sequences');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//name: testLongSequencesPerformance
|
|
46
|
-
export function testLongSequencesPerformance(): void {
|
|
47
|
-
performanceTest(generateLongSequence, 'Long sequences');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
40
|
//name: fastaSequenceCellRenderer
|
|
52
41
|
//tags: cellRenderer
|
|
53
42
|
//meta.cellType: Sequence
|
|
@@ -457,7 +446,16 @@ export function splitToMonomers(col: DG.Column<string>): void {
|
|
|
457
446
|
for (const tempCol of tempDf.columns) {
|
|
458
447
|
const newCol = originalDf.columns.add(tempCol);
|
|
459
448
|
newCol.semType = C.SEM_TYPES.MONOMER;
|
|
460
|
-
|
|
449
|
+
newCol.setTag(DG.TAGS.CELL_RENDERER, C.SEM_TYPES.MONOMER);
|
|
461
450
|
newCol.setTag(C.TAGS.ALPHABET, col.getTag(C.TAGS.ALPHABET));
|
|
462
451
|
}
|
|
452
|
+
(grok.shell.v as DG.TableView)?.grid.invalidate();
|
|
463
453
|
}
|
|
454
|
+
|
|
455
|
+
//name: Bio: getHelmMonomers
|
|
456
|
+
//input: column col {semType: Macromolecule}
|
|
457
|
+
//output: string[] result
|
|
458
|
+
export function getHelmMonomers(seqCol: DG.Column<string>): string[] {
|
|
459
|
+
const stats = WebLogo.getStats(seqCol, 5, WebLogo.splitterAsHelm);
|
|
460
|
+
return Object.keys(stats.freq);
|
|
461
|
+
}
|
|
@@ -6,6 +6,7 @@ import {importFasta, multipleSequenceAlignmentAny} from '../package';
|
|
|
6
6
|
import {convertDo} from '../utils/convert';
|
|
7
7
|
import {ALPHABET, NOTATION, UnitsHandler} from '@datagrok-libraries/bio/src/utils/units-handler';
|
|
8
8
|
import {SEM_TYPES, TAGS} from '../utils/constants';
|
|
9
|
+
import {generateLongSequence, generateManySequences, performanceTest} from './test-sequnces-generators';
|
|
9
10
|
|
|
10
11
|
category('renderers', () => {
|
|
11
12
|
let tvList: DG.TableView[];
|
|
@@ -22,6 +23,14 @@ category('renderers', () => {
|
|
|
22
23
|
tvList.forEach((tv: DG.TableView) => tv.close());
|
|
23
24
|
});
|
|
24
25
|
|
|
26
|
+
test('long sequence performance ', async () => {
|
|
27
|
+
performanceTest(generateLongSequence, 'Long sequences');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('many sequence performance', async () => {
|
|
31
|
+
performanceTest(generateManySequences, 'Many sequences');
|
|
32
|
+
});
|
|
33
|
+
|
|
25
34
|
test('afterMsa', async () => {
|
|
26
35
|
await _testAfterMsa();
|
|
27
36
|
});
|
|
@@ -196,7 +196,7 @@ export class MacromoleculeSequenceCellRenderer extends DG.GridCellRenderer {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
export class MonomerCellRenderer extends DG.GridCellRenderer {
|
|
199
|
-
get name(): string {return
|
|
199
|
+
get name(): string {return C.SEM_TYPES.MONOMER;}
|
|
200
200
|
|
|
201
201
|
get cellType(): string {return C.SEM_TYPES.MONOMER;}
|
|
202
202
|
|
|
@@ -217,21 +217,17 @@ export class MonomerCellRenderer extends DG.GridCellRenderer {
|
|
|
217
217
|
*/
|
|
218
218
|
render(
|
|
219
219
|
g: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, gridCell: DG.GridCell,
|
|
220
|
-
|
|
221
|
-
y -= 2;
|
|
222
|
-
g.save();
|
|
223
|
-
g.beginPath();
|
|
224
|
-
g.rect(x, y, w, h);
|
|
225
|
-
g.clip();
|
|
220
|
+
_cellStyle: DG.GridCellStyle): void {
|
|
226
221
|
g.font = `12px monospace`;
|
|
227
|
-
g.textBaseline = '
|
|
222
|
+
g.textBaseline = 'middle';
|
|
223
|
+
g.textAlign = 'center';
|
|
228
224
|
|
|
229
|
-
const palette = getPaletteByType(gridCell.
|
|
225
|
+
const palette = getPaletteByType(gridCell.cell.column.getTag(C.TAGS.ALPHABET));
|
|
230
226
|
const s: string = gridCell.cell.value ? gridCell.cell.value : '-';
|
|
231
227
|
const color = palette.get(s);
|
|
232
228
|
|
|
233
|
-
|
|
234
|
-
g.
|
|
229
|
+
g.fillStyle = color;
|
|
230
|
+
g.fillText(s, x + (w / 2), y - (h / 2));
|
|
235
231
|
}
|
|
236
232
|
}
|
|
237
233
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=c5a05867bf79. Commit 1b9affa5.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,7 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=c5a05867bf79. Commit 1b9affa5.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-09-13 11:28:35</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/Bio/src/__jest__/remote.test.ts</div><div class="suite-time warn">8.755s</div></div><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">failed</div><div class="test-duration">0s</div></div><div class="failureMessages"> <pre class="failureMsg">Error: Unknown server alias. Please add it to /home/runner/.grok/config.yaml
|
|
233
233
|
at getDevKey (/home/runner/work/public/public/packages/Bio/src/__jest__/test-node.ts:48:13)
|
|
234
234
|
at Object.<anonymous> (/home/runner/work/public/public/packages/Bio/src/__jest__/test-node.ts:57:15)
|
|
235
235
|
at Generator.next (<anonymous>)
|