@datagrok/sequence-translator 1.10.13 → 1.10.14
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/CHANGELOG.md +6 -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/files/tests/chem_enum_cores.csv +5 -0
- package/files/tests/chem_enum_rgroups.csv +5 -0
- package/package.json +1 -1
- package/src/apps/structure/view/ui.ts +1 -1
- package/src/apps/translator/view/ui.ts +1 -1
- package/src/package-api.ts +8 -1
- package/src/package-test.ts +1 -0
- package/src/package.g.ts +11 -3
- package/src/package.ts +16 -5
- package/src/polytool/const.ts +1 -1
- package/src/polytool/pt-chem-enum-dialog.ts +940 -0
- package/src/polytool/pt-chem-enum.ts +553 -0
- package/src/polytool/pt-dialog.ts +2 -124
- package/src/polytool/pt-enumerate-seq-dialog.ts +3 -3
- package/src/tests/polytool-enumerate-chem-tests.ts +408 -0
- package/test-console-output-1.log +202 -89
- package/test-record-1.mp4 +0 -0
- package/src/polytool/pt-enumeration-chem.ts +0 -100
package/package.json
CHANGED
|
@@ -140,7 +140,7 @@ class StructureAppLayout {
|
|
|
140
140
|
const clearBlock = Object.fromEntries(
|
|
141
141
|
STRANDS.map(
|
|
142
142
|
(key) => {
|
|
143
|
-
const clearIcon = ui.icons.delete(() => { coloredInput[key].inputBase.value = ''; });
|
|
143
|
+
const clearIcon = ui.icons.delete(() => { coloredInput[key].inputBase.value = ''; }, 'Delete');
|
|
144
144
|
const clearButton = ui.button(clearIcon, () => {});
|
|
145
145
|
ui.tooltip.bind(clearButton, `Clear ${key.toUpperCase()}`);
|
|
146
146
|
return [key, clearIcon];
|
|
@@ -202,7 +202,7 @@ class TranslatorAppLayout {
|
|
|
202
202
|
const formatChoiceInput = ui.div([this.formatChoiceInput]);
|
|
203
203
|
|
|
204
204
|
const clearButton = ui.button(
|
|
205
|
-
ui.icons.delete(() => { sequenceColoredInput.inputBase.value = ''; }),
|
|
205
|
+
ui.icons.delete(() => { sequenceColoredInput.inputBase.value = ''; }, 'Delete'),
|
|
206
206
|
() => {}
|
|
207
207
|
);
|
|
208
208
|
ui.tooltip.bind(clearButton, 'Clear input');
|
package/src/package-api.ts
CHANGED
|
@@ -102,6 +102,13 @@ export namespace funcs {
|
|
|
102
102
|
return await grok.functions.call('SequenceTranslator:PolyToolEnumerateChemTopMenu', {});
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
Enumerate cores and R-group lists into a molecule table (Zip or Cartesian)
|
|
107
|
+
*/
|
|
108
|
+
export async function chemEnumerateReactionsTopMenu(): Promise<void> {
|
|
109
|
+
return await grok.functions.call('SequenceTranslator:ChemEnumerateReactionsTopMenu', {});
|
|
110
|
+
}
|
|
111
|
+
|
|
105
112
|
export async function polyToolColumnChoice(df: DG.DataFrame , macroMolecule: DG.Column ): Promise<void> {
|
|
106
113
|
return await grok.functions.call('SequenceTranslator:PolyToolColumnChoice', { df, macroMolecule });
|
|
107
114
|
}
|
|
@@ -114,7 +121,7 @@ export namespace funcs {
|
|
|
114
121
|
return await grok.functions.call('SequenceTranslator:PtEnumeratorHelmApp', {});
|
|
115
122
|
}
|
|
116
123
|
|
|
117
|
-
export async function ptEnumeratorChemApp(): Promise<
|
|
124
|
+
export async function ptEnumeratorChemApp(): Promise<DG.View> {
|
|
118
125
|
return await grok.functions.call('SequenceTranslator:PtEnumeratorChemApp', {});
|
|
119
126
|
}
|
|
120
127
|
|
package/src/package-test.ts
CHANGED
|
@@ -13,6 +13,7 @@ import './tests/polytool-convert-tests';
|
|
|
13
13
|
import './tests/polytool-unrule-tests';
|
|
14
14
|
import './tests/polytool-enumerate-tests';
|
|
15
15
|
import './tests/polytool-enumerate-breadth-tests';
|
|
16
|
+
import './tests/polytool-enumerate-chem-tests';
|
|
16
17
|
import './tests/polytool-chain-parse-notation-tests';
|
|
17
18
|
import './tests/polytool-chain-from-notation-tests';
|
|
18
19
|
import './tests/toAtomicLevel-tests';
|
package/src/package.g.ts
CHANGED
|
@@ -148,6 +148,13 @@ export async function polyToolEnumerateChemTopMenu() : Promise<void> {
|
|
|
148
148
|
await PackageFunctions.polyToolEnumerateChemTopMenu();
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
//name: chemEnumerateReactions
|
|
152
|
+
//description: Enumerate cores and R-group lists into a molecule table (Zip or Cartesian)
|
|
153
|
+
//top-menu: Chem | Transform | Reactions | Enumerate...
|
|
154
|
+
export async function chemEnumerateReactionsTopMenu() : Promise<void> {
|
|
155
|
+
await PackageFunctions.chemEnumerateReactionsTopMenu();
|
|
156
|
+
}
|
|
157
|
+
|
|
151
158
|
//input: dataframe df { description: Input data table }
|
|
152
159
|
//input: column macroMolecule
|
|
153
160
|
export async function polyToolColumnChoice(df: DG.DataFrame, macroMolecule: DG.Column) : Promise<void> {
|
|
@@ -170,11 +177,12 @@ export async function ptEnumeratorHelmApp() : Promise<void> {
|
|
|
170
177
|
|
|
171
178
|
//name: Chem Enumerator
|
|
172
179
|
//tags: app
|
|
180
|
+
//output: view result
|
|
173
181
|
//meta.icon: img/icons/structure.png
|
|
174
|
-
//meta.browsePath:
|
|
182
|
+
//meta.browsePath: Chem | PolyTool
|
|
175
183
|
//meta.role: app
|
|
176
|
-
export async function ptEnumeratorChemApp()
|
|
177
|
-
await PackageFunctions.ptEnumeratorChemApp();
|
|
184
|
+
export async function ptEnumeratorChemApp() {
|
|
185
|
+
return await PackageFunctions.ptEnumeratorChemApp();
|
|
178
186
|
}
|
|
179
187
|
|
|
180
188
|
//name: Polytool Helm Enumerator dialog
|
package/src/package.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {getExternalAppViewFactories} from './plugins/mermade';
|
|
|
17
17
|
import {defaultErrorHandler} from './utils/err-info';
|
|
18
18
|
|
|
19
19
|
import {polyToolConvert, polyToolConvertUI} from './polytool/pt-dialog';
|
|
20
|
-
import {polyToolEnumerateChemUI} from './polytool/pt-dialog';
|
|
20
|
+
import {polyToolEnumerateChemApp, polyToolEnumerateChemUI} from './polytool/pt-chem-enum-dialog';
|
|
21
21
|
import {polyToolEnumerateHelmUI, polyToolEnumerateSeq} from './polytool/pt-enumerate-seq-dialog';
|
|
22
22
|
import {_setPeptideColumn} from './polytool/utils';
|
|
23
23
|
import {PolyToolCsvLibHandler} from './polytool/csv-to-json-monomer-lib-converter';
|
|
@@ -276,6 +276,16 @@ export class PackageFunctions {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
|
|
279
|
+
@grok.decorators.func({
|
|
280
|
+
'top-menu': 'Chem | Transform | Reactions | Enumerate...',
|
|
281
|
+
'name': 'chemEnumerateReactions',
|
|
282
|
+
'description': 'Enumerate cores and R-group lists into a molecule table (Zip or Cartesian)'
|
|
283
|
+
})
|
|
284
|
+
static async chemEnumerateReactionsTopMenu(): Promise<void> {
|
|
285
|
+
polyToolEnumerateChemUI();
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
279
289
|
@grok.decorators.func()
|
|
280
290
|
static async polyToolColumnChoice(
|
|
281
291
|
@grok.decorators.param({options: {description: 'Input data table'}}) df: DG.DataFrame,
|
|
@@ -314,14 +324,15 @@ export class PackageFunctions {
|
|
|
314
324
|
@grok.decorators.func({
|
|
315
325
|
meta: {
|
|
316
326
|
icon: 'img/icons/structure.png',
|
|
317
|
-
browsePath: '
|
|
327
|
+
browsePath: 'Chem | PolyTool',
|
|
318
328
|
role: 'app'
|
|
319
329
|
},
|
|
320
330
|
name: 'Chem Enumerator',
|
|
321
|
-
tags: ['app']
|
|
331
|
+
tags: ['app'],
|
|
332
|
+
outputs: [{type: 'view', name: 'result'}]
|
|
322
333
|
})
|
|
323
|
-
static async ptEnumeratorChemApp()
|
|
324
|
-
|
|
334
|
+
static async ptEnumeratorChemApp() {
|
|
335
|
+
return await polyToolEnumerateChemApp();
|
|
325
336
|
}
|
|
326
337
|
|
|
327
338
|
|
package/src/polytool/const.ts
CHANGED
|
@@ -38,7 +38,7 @@ export const PT_UI_USE_CHIRALITY = 'Chirality engine';
|
|
|
38
38
|
export const PT_UI_HIGHLIGHT_MONOMERS = 'Highlight monomers';
|
|
39
39
|
export const PT_UI_DIALOG_CONVERSION = 'PolyTool Conversion';
|
|
40
40
|
export const PT_UI_DIALOG_UNRULE = 'PolyTool Unrule';
|
|
41
|
-
export const
|
|
41
|
+
export const PT_HELM_UI_DIALOG_ENUMERATION = 'PolyTool Helm Enumeration';
|
|
42
42
|
export const PT_UI_RULES_USED = 'Rules used';
|
|
43
43
|
|
|
44
44
|
export const PT_ENUM_TYPE_TOOLTIPS: Record<string, string> = {
|