@datagrok/bio 2.4.40 → 2.4.42
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 +3 -3
- package/src/utils/convert.ts +6 -5
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Leonid Stolbov",
|
|
6
6
|
"email": "lstolbov@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.4.
|
|
8
|
+
"version": "2.4.42",
|
|
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",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@biowasm/aioli": "^3.1.0",
|
|
17
|
-
"@datagrok-libraries/bio": "^5.32.
|
|
17
|
+
"@datagrok-libraries/bio": "^5.32.2",
|
|
18
18
|
"@datagrok-libraries/chem-meta": "^1.0.1",
|
|
19
|
-
"@datagrok-libraries/ml": "^6.3.
|
|
19
|
+
"@datagrok-libraries/ml": "^6.3.39",
|
|
20
20
|
"@datagrok-libraries/tutorials": "^1.3.2",
|
|
21
21
|
"@datagrok-libraries/utils": "^4.0.11",
|
|
22
22
|
"cash-dom": "^8.0.0",
|
package/src/utils/convert.ts
CHANGED
|
@@ -17,13 +17,12 @@ let convertDialogSubs: Subscription[] = [];
|
|
|
17
17
|
* @param {DG.column} col Column with 'Macromolecule' semantic type
|
|
18
18
|
*/
|
|
19
19
|
export function convert(col?: DG.Column): void {
|
|
20
|
-
|
|
21
20
|
let tgtCol = col ?? grok.shell.t.columns.bySemType('Macromolecule')!;
|
|
22
21
|
if (!tgtCol)
|
|
23
22
|
throw new Error('No column with Macromolecule semantic type found');
|
|
24
23
|
let converter = new NotationConverter(tgtCol);
|
|
25
24
|
let currentNotation: NOTATION = converter.notation;
|
|
26
|
-
const dialogHeader =
|
|
25
|
+
const dialogHeader = ui.divText(
|
|
27
26
|
'Current notation: ' + currentNotation,
|
|
28
27
|
{
|
|
29
28
|
style: {
|
|
@@ -48,9 +47,11 @@ export function convert(col?: DG.Column): void {
|
|
|
48
47
|
tgtCol = newCol;
|
|
49
48
|
converter = new NotationConverter(tgtCol);
|
|
50
49
|
currentNotation = converter.notation;
|
|
50
|
+
if (currentNotation === NOTATION.HELM)
|
|
51
|
+
separatorInput.value = '/'; // helm monomers can have - in the name like D-aThr;
|
|
51
52
|
dialogHeader.textContent = 'Current notation: ' + currentNotation;
|
|
52
53
|
filteredNotations = notations.filter((e) => e !== currentNotation);
|
|
53
|
-
targetNotationInput = ui.choiceInput('Convert to', filteredNotations[0], filteredNotations);
|
|
54
|
+
targetNotationInput = ui.choiceInput('Convert to', filteredNotations[0], filteredNotations, toggleSeparator);
|
|
54
55
|
toggleSeparator();
|
|
55
56
|
convertDialog?.clear();
|
|
56
57
|
convertDialog?.add(ui.div([
|
|
@@ -58,14 +59,13 @@ export function convert(col?: DG.Column): void {
|
|
|
58
59
|
targetColumnInput.root,
|
|
59
60
|
targetNotationInput.root,
|
|
60
61
|
separatorInput.root
|
|
61
|
-
]))
|
|
62
|
+
]));
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
const targetColumnInput = ui.columnInput('Column', grok.shell.t, tgtCol, toggleColumn);
|
|
65
66
|
|
|
66
67
|
const separatorArray = ['-', '.', '/'];
|
|
67
68
|
let filteredNotations = notations.filter((e) => e !== currentNotation);
|
|
68
|
-
let targetNotationInput = ui.choiceInput('Convert to', filteredNotations[0], filteredNotations);
|
|
69
69
|
|
|
70
70
|
const separatorInput = ui.choiceInput('Separator', separatorArray[0], separatorArray);
|
|
71
71
|
|
|
@@ -76,6 +76,7 @@ export function convert(col?: DG.Column): void {
|
|
|
76
76
|
else
|
|
77
77
|
$(separatorInput.root).show();
|
|
78
78
|
};
|
|
79
|
+
let targetNotationInput = ui.choiceInput('Convert to', filteredNotations[0], filteredNotations, toggleSeparator);
|
|
79
80
|
|
|
80
81
|
// set correct visibility on init
|
|
81
82
|
toggleSeparator();
|