@datagrok/bio 2.4.49 → 2.4.51
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/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 +2 -2
- package/scripts/sequence_generator.py +0 -0
- package/src/package.ts +10 -0
- package/src/tests/renderers-monomer-placer.ts +20 -19
- package/src/utils/cell-renderer-consts.ts +14 -1
- package/src/utils/cell-renderer.ts +22 -29
- package/src/viewers/vd-regions-viewer.ts +67 -46
- package/src/viewers/web-logo-viewer.ts +40 -26
- package/src/widgets/representations.ts +17 -7
|
@@ -2,7 +2,8 @@ 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
|
|
5
|
+
import {Tags as mmcrTags, Temps as mmcrTemps, MonomerWidthMode,
|
|
6
|
+
tempTAGS, rendererSettingsChangedState} from '../utils/cell-renderer-consts';
|
|
6
7
|
import {_package} from '../package';
|
|
7
8
|
|
|
8
9
|
|
|
@@ -19,11 +20,11 @@ export function getMacromoleculeColumnPropertyPanel(col: DG.Column): DG.Widget {
|
|
|
19
20
|
columnsSet.delete(col.name);
|
|
20
21
|
|
|
21
22
|
const monomerWidth = ui.choiceInput('Monomer width',
|
|
22
|
-
(col?.temp[
|
|
23
|
-
[
|
|
23
|
+
(col?.temp[tempTAGS.monomerWidth] != null) ? col.temp[tempTAGS.monomerWidth] : MonomerWidthMode.short,
|
|
24
|
+
[MonomerWidthMode.short, MonomerWidthMode.long],
|
|
24
25
|
(s: string) => {
|
|
25
|
-
col.temp[
|
|
26
|
-
col.setTag(mmcrTags.
|
|
26
|
+
col.temp[tempTAGS.monomerWidth] = s;
|
|
27
|
+
col.setTag(mmcrTags.RendererSettingsChanged, rendererSettingsChangedState.true);
|
|
27
28
|
col.dataFrame.fireValuesChanged();
|
|
28
29
|
});
|
|
29
30
|
monomerWidth.setTooltip(
|
|
@@ -34,13 +35,21 @@ export function getMacromoleculeColumnPropertyPanel(col: DG.Column): DG.Widget {
|
|
|
34
35
|
col.temp[mmcrTemps.maxMonomerLength] ?? _package.properties.maxMonomerLength,
|
|
35
36
|
(value: number) => {
|
|
36
37
|
col.temp[mmcrTemps.maxMonomerLength] = value;
|
|
37
|
-
col.setTag(mmcrTags.
|
|
38
|
+
col.setTag(mmcrTags.RendererSettingsChanged, rendererSettingsChangedState.true);
|
|
38
39
|
col.dataFrame.fireValuesChanged();
|
|
39
40
|
});
|
|
40
41
|
maxMonomerLength.setTooltip(
|
|
41
42
|
`The max length of monomer name displayed without shortening in '${MonomerWidthMode.short}' monomer width mode.`
|
|
42
43
|
);
|
|
43
44
|
|
|
45
|
+
const gapLengthInput = ui.intInput('Monomer gap size', col.temp[mmcrTemps.gapLength] ?? 0,
|
|
46
|
+
(value: number) => {
|
|
47
|
+
col.temp[mmcrTemps.gapLength] = value;
|
|
48
|
+
col.setTag(mmcrTags.RendererSettingsChanged, rendererSettingsChangedState.true);
|
|
49
|
+
col.dataFrame.fireValuesChanged();
|
|
50
|
+
});
|
|
51
|
+
gapLengthInput.setTooltip('The size of Gap between monomers (in pixels)');
|
|
52
|
+
|
|
44
53
|
const colorCode = ui.boolInput('Color code',
|
|
45
54
|
(col?.temp['color-code'] != null) ? col.temp['color-code'] : true,
|
|
46
55
|
(v: boolean) => {
|
|
@@ -68,8 +77,9 @@ export function getMacromoleculeColumnPropertyPanel(col: DG.Column): DG.Widget {
|
|
|
68
77
|
const rdKitInputs = ui.inputs([
|
|
69
78
|
monomerWidth,
|
|
70
79
|
maxMonomerLength,
|
|
71
|
-
|
|
80
|
+
gapLengthInput,
|
|
72
81
|
referenceSequence,
|
|
82
|
+
colorCode,
|
|
73
83
|
compareWithCurrent,
|
|
74
84
|
]);
|
|
75
85
|
|