@datagrok/bio 2.22.6 → 2.22.7
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/.eslintrc.json +1 -0
- package/detectors.js +3 -2
- package/dist/package-test.js +5 -5
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +4 -4
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/demo/bio01b-hierarchical-clustering-and-activity-cliffs.ts +3 -3
- package/src/demo/bio03-atomic-level.ts +3 -3
- package/src/demo/bio05-helm-msa-sequence-space.ts +2 -2
- package/src/demo/utils.ts +2 -2
- package/src/package-api.ts +5 -8
- package/src/package.g.ts +628 -0
- package/src/package.ts +1120 -1051
- package/src/tests/renderers-test.ts +1 -1
- package/src/utils/cell-renderer.ts +2 -0
- package/src/utils/monomer-lib/monomer-lib-base.ts +17 -4
- package/src/utils/monomer-lib/monomer-lib.ts +7 -7
- package/src/utils/monomer-lib/monomer-manager/duplicate-monomer-manager.ts +48 -1
- package/src/utils/monomer-lib/monomer-manager/monomer-manager.ts +84 -85
- package/src/viewers/web-logo-viewer.ts +2 -2
- package/src/widgets/to-atomic-level-widget.ts +3 -3
- package/test-console-output-1.log +650 -652
- package/test-record-1.mp4 +0 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Davit Rizhinashvili",
|
|
6
6
|
"email": "drizhinashvili@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.22.
|
|
8
|
+
"version": "2.22.7",
|
|
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",
|
|
@@ -2,7 +2,7 @@ import * as grok from 'datagrok-api/grok';
|
|
|
2
2
|
import * as ui from 'datagrok-api/ui';
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
|
-
import {_package,
|
|
5
|
+
import {_package, PackageFunctions} from '../package';
|
|
6
6
|
import $ from 'cash-dom';
|
|
7
7
|
|
|
8
8
|
import {TEMPS as acTEMPS} from '@datagrok-libraries/ml/src/viewers/activity-cliffs';
|
|
@@ -51,7 +51,7 @@ export async function demoBio01bUI() {
|
|
|
51
51
|
})
|
|
52
52
|
.step('Find activity cliffs', async () => {
|
|
53
53
|
const seqEncodingFunc = DG.Func.find({name: 'macromoleculePreprocessingFunction', package: 'Bio'})[0];
|
|
54
|
-
activityCliffsViewer = (await activityCliffs(
|
|
54
|
+
activityCliffsViewer = (await PackageFunctions.activityCliffs(
|
|
55
55
|
df, df.getCol('Sequence'), df.getCol('Activity'),
|
|
56
56
|
80, dimRedMethod, MmDistanceFunctionsNames.LEVENSHTEIN, seqEncodingFunc, {}, true)) as DG.ScatterPlotViewer;
|
|
57
57
|
view.dockManager.dock(activityCliffsViewer, DG.DOCK_TYPE.RIGHT, null, 'Activity Cliffs', 0.35);
|
|
@@ -117,7 +117,7 @@ export async function demoActivityCliffsCyclic() {
|
|
|
117
117
|
ui.setUpdateIndicator(tv.root, true);
|
|
118
118
|
try {
|
|
119
119
|
const seqEncodingFunc = DG.Func.find({name: 'macromoleculePreprocessingFunction', package: 'Bio'})[0];
|
|
120
|
-
const activityCliffsViewer = (await activityCliffs(
|
|
120
|
+
const activityCliffsViewer = (await PackageFunctions.activityCliffs(
|
|
121
121
|
df, df.getCol('Sequence'), df.getCol('Activity'),
|
|
122
122
|
96, DimReductionMethods.UMAP, MmDistanceFunctionsNames.MONOMER_CHEMICAL_DISTANCE,
|
|
123
123
|
seqEncodingFunc, {}, true)) as DG.ScatterPlotViewer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as grok from 'datagrok-api/grok';
|
|
2
2
|
import * as ui from 'datagrok-api/ui';
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
|
-
import {_package,
|
|
4
|
+
import {_package, PackageFunctions} from '../package';
|
|
5
5
|
import {handleError} from './utils';
|
|
6
6
|
import {DemoScript} from '@datagrok-libraries/tutorials/src/demo-script';
|
|
7
7
|
import {delay} from '@datagrok-libraries/utils/src/test';
|
|
@@ -14,7 +14,7 @@ export async function demoToAtomicLevel(): Promise<void> {
|
|
|
14
14
|
await grok.data.detectSemanticTypes(data);
|
|
15
15
|
const view = grok.shell.addTableView(data);
|
|
16
16
|
const seqCol = data.col('HELM')!;
|
|
17
|
-
await toAtomicLevel(data, seqCol, true, false);
|
|
17
|
+
await PackageFunctions.toAtomicLevel(data, seqCol, true, false);
|
|
18
18
|
adjustGridcolAfterRender(view.grid, 'molfile(HELM)', 500, 300, true);
|
|
19
19
|
adjustGridcolAfterRender(view.grid, 'HELM', 500, undefined, true);
|
|
20
20
|
grok.shell.info('Hover over monomers in HELM column to highlight them in molecular structure.', {timeout: 10});
|
|
@@ -47,7 +47,7 @@ export async function demoBio03UI(): Promise<void> {
|
|
|
47
47
|
})
|
|
48
48
|
.step('To atomic level', async () => {
|
|
49
49
|
const seqCol = df.getCol(seqColName);
|
|
50
|
-
await toAtomicLevel(df, seqCol, false, false);
|
|
50
|
+
await PackageFunctions.toAtomicLevel(df, seqCol, false, false);
|
|
51
51
|
}, {
|
|
52
52
|
description: 'Get atomic level structures of Macromolecules.',
|
|
53
53
|
delay: 2000,
|
|
@@ -8,7 +8,7 @@ import {DemoScript} from '@datagrok-libraries/tutorials/src/demo-script';
|
|
|
8
8
|
import {MmDistanceFunctionsNames} from '@datagrok-libraries/ml/src/macromolecule-distance-functions';
|
|
9
9
|
|
|
10
10
|
import {Pepsea, pepseaMethods, runPepsea} from '../utils/pepsea';
|
|
11
|
-
import {
|
|
11
|
+
import {PackageFunctions} from '../package';
|
|
12
12
|
import {handleError} from './utils';
|
|
13
13
|
|
|
14
14
|
import {_package} from '../package';
|
|
@@ -92,7 +92,7 @@ export async function demoBio05UI(): Promise<void> {
|
|
|
92
92
|
})
|
|
93
93
|
.step('Build sequence space', async () => {
|
|
94
94
|
const preprocessingFunc = DG.Func.find({package: 'Bio', name: 'macromoleculePreprocessingFunction'})[0];
|
|
95
|
-
ssViewer = (await sequenceSpaceTopMenu(df, msaHelmCol,
|
|
95
|
+
ssViewer = (await PackageFunctions.sequenceSpaceTopMenu(df, msaHelmCol,
|
|
96
96
|
dimRedMethod, MmDistanceFunctionsNames.LEVENSHTEIN, true, preprocessingFunc, undefined, undefined, true)) as DG.ScatterPlotViewer;
|
|
97
97
|
view.dockManager.dock(ssViewer, DG.DOCK_TYPE.RIGHT, null, 'Sequence Space', 0.35);
|
|
98
98
|
}, {
|
package/src/demo/utils.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as grok from 'datagrok-api/grok';
|
|
|
2
2
|
import * as DG from 'datagrok-api/dg';
|
|
3
3
|
import * as ui from 'datagrok-api/ui';
|
|
4
4
|
|
|
5
|
-
import {_package,
|
|
5
|
+
import {_package, PackageFunctions} from '../package';
|
|
6
6
|
import {StringMetricsNames} from '@datagrok-libraries/ml/src/typed-metrics';
|
|
7
7
|
import {MmDistanceFunctionsNames} from '@datagrok-libraries/ml/src/macromolecule-distance-functions';
|
|
8
8
|
import {getNormalizedEmbeddings} from
|
|
@@ -65,7 +65,7 @@ export async function demoSequenceSpace(
|
|
|
65
65
|
})) as DG.ScatterPlotViewer;
|
|
66
66
|
} else {
|
|
67
67
|
const preprocessingFunc = DG.Func.find({package: 'Bio', name: 'macromoleculePreprocessingFunction'})[0];
|
|
68
|
-
resSpaceViewer = (await sequenceSpaceTopMenu(df, df.getCol(colName),
|
|
68
|
+
resSpaceViewer = (await PackageFunctions.sequenceSpaceTopMenu(df, df.getCol(colName),
|
|
69
69
|
DimReductionMethods.UMAP, MmDistanceFunctionsNames.LEVENSHTEIN, true, preprocessingFunc)) as DG.ScatterPlotViewer;
|
|
70
70
|
}
|
|
71
71
|
view.dockManager.dock(resSpaceViewer!, DG.DOCK_TYPE.RIGHT, null, 'Sequence Space', 0.35);
|
package/src/package-api.ts
CHANGED
|
@@ -21,6 +21,10 @@ export namespace scripts {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export namespace funcs {
|
|
24
|
+
export async function test1(): Promise<any> {
|
|
25
|
+
return await grok.functions.call('Bio:Test1', {});
|
|
26
|
+
}
|
|
27
|
+
|
|
24
28
|
/**
|
|
25
29
|
Returns an instance of the monomer library helper
|
|
26
30
|
*/
|
|
@@ -51,9 +55,6 @@ export namespace funcs {
|
|
|
51
55
|
return await grok.functions.call('Bio:GetRegionPanel', { seqCol });
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
/**
|
|
55
|
-
//tags: panel, exclude-actions-panel
|
|
56
|
-
*/
|
|
57
58
|
export async function libraryPanel(seqColumn: DG.Column ): Promise<any> {
|
|
58
59
|
return await grok.functions.call('Bio:LibraryPanel', { seqColumn });
|
|
59
60
|
}
|
|
@@ -133,7 +134,7 @@ export namespace funcs {
|
|
|
133
134
|
/**
|
|
134
135
|
Detects pairs of molecules with similar structure and significant difference in any given property
|
|
135
136
|
*/
|
|
136
|
-
export async function activityCliffs(table: DG.DataFrame , molecules:
|
|
137
|
+
export async function activityCliffs(table: DG.DataFrame , molecules: string , activities: DG.Column , similarity: number , methodName: string , similarityMetric: string , preprocessingFunction: any , options?: any , demo?: boolean ): Promise<void> {
|
|
137
138
|
return await grok.functions.call('Bio:ActivityCliffs', { table, molecules, activities, similarity, methodName, similarityMetric, preprocessingFunction, options, demo });
|
|
138
139
|
}
|
|
139
140
|
|
|
@@ -410,8 +411,4 @@ export namespace funcs {
|
|
|
410
411
|
export async function getMolFromHelm(df: DG.DataFrame , helmCol: DG.Column , chiralityEngine: boolean ): Promise<DG.Column> {
|
|
411
412
|
return await grok.functions.call('Bio:GetMolFromHelm', { df, helmCol, chiralityEngine });
|
|
412
413
|
}
|
|
413
|
-
|
|
414
|
-
export async function test1(): Promise<any> {
|
|
415
|
-
return await grok.functions.call('Bio:Test1', {});
|
|
416
|
-
}
|
|
417
414
|
}
|