@datagrok/bio 2.4.44 → 2.4.46
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/dist/79.js +2 -0
- package/dist/79.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/package.json +10 -2
- package/src/function-edtiors/split-to-monomers-editor.ts +42 -0
- package/src/package-test.ts +3 -1
- package/src/package-types.ts +40 -0
- package/src/package.ts +64 -26
- package/src/tests/msa-tests.ts +0 -3
- package/src/tests/splitters-test.ts +9 -7
- package/src/utils/cell-renderer-consts.ts +27 -0
- package/src/utils/cell-renderer.ts +11 -59
- package/src/utils/monomer-cell-renderer.ts +100 -0
- package/src/utils/split-to-monomers.ts +29 -0
- package/src/widgets/package-settings-editor-widget.ts +28 -0
- package/src/widgets/representations.ts +18 -3
- /package/files/{libraries → tests/libraries}/broken-lib.sdf +0 -0
- /package/files/{libraries → tests/libraries}/group1/mock-lib-3.json +0 -0
- /package/files/{libraries → tests/libraries}/mock-lib-2.json +0 -0
|
@@ -2,13 +2,16 @@ 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
|
import {getMolfilesFromSingleSeq} from '@datagrok-libraries/bio/src/monomer-works/monomer-utils';
|
|
5
|
+
import {Tags as mmcrTags, Temps as mmcrTemps, MonomerWidthMode} from '../utils/cell-renderer-consts';
|
|
6
|
+
import {_package} from '../package';
|
|
7
|
+
|
|
5
8
|
|
|
6
9
|
/**
|
|
7
10
|
* @export
|
|
8
11
|
* @param {DG.Column} col macromolecule cell.
|
|
9
12
|
* @return {Promise<DG.Widget>} Widget.
|
|
10
13
|
*/
|
|
11
|
-
export function
|
|
14
|
+
export function getMacromoleculeColumnPropertyPanel(col: DG.Column): DG.Widget {
|
|
12
15
|
// TODO: replace with an efficient version, bySemTypesExact won't help; GROK-8094
|
|
13
16
|
const columnsList = Array.from(col.dataFrame.columns as any).filter(
|
|
14
17
|
(c: any) => c.semType === DG.SEMTYPE.MOLECULE).map((c: any) => c.name);
|
|
@@ -20,11 +23,22 @@ export function getMacroMolColumnPropertyPanel(col: DG.Column): DG.Widget {
|
|
|
20
23
|
['short', 'long'],
|
|
21
24
|
(s: string) => {
|
|
22
25
|
col.temp['monomer-width'] = s;
|
|
23
|
-
col.setTag(
|
|
26
|
+
col.setTag(mmcrTags.calculated, '0');
|
|
24
27
|
col.dataFrame.fireValuesChanged();
|
|
25
28
|
});
|
|
26
29
|
monomerWidth.setTooltip(
|
|
27
|
-
|
|
30
|
+
`In short mode, only the 'Max monomer length' characters are displayed, followed by .. if there are more`,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const maxMonomerLength: DG.InputBase = ui.intInput('Max monomer length',
|
|
34
|
+
col.temp[mmcrTemps.maxMonomerLength] ?? _package.properties.maxMonomerLength,
|
|
35
|
+
(value: number) => {
|
|
36
|
+
col.temp[mmcrTemps.maxMonomerLength] = value;
|
|
37
|
+
col.setTag(mmcrTags.calculated, '0');
|
|
38
|
+
col.dataFrame.fireValuesChanged();
|
|
39
|
+
});
|
|
40
|
+
maxMonomerLength.setTooltip(
|
|
41
|
+
`The max length of monomer name displayed without shortening in '${MonomerWidthMode.short}' monomer width mode.`
|
|
28
42
|
);
|
|
29
43
|
|
|
30
44
|
const colorCode = ui.boolInput('Color code',
|
|
@@ -53,6 +67,7 @@ export function getMacroMolColumnPropertyPanel(col: DG.Column): DG.Widget {
|
|
|
53
67
|
|
|
54
68
|
const rdKitInputs = ui.inputs([
|
|
55
69
|
monomerWidth,
|
|
70
|
+
maxMonomerLength,
|
|
56
71
|
colorCode,
|
|
57
72
|
referenceSequence,
|
|
58
73
|
compareWithCurrent,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|