@datagrok/sequence-translator 1.10.12 → 1.10.13

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/sequence-translator",
3
3
  "friendlyName": "Sequence Translator",
4
- "version": "1.10.12",
4
+ "version": "1.10.13",
5
5
  "author": {
6
6
  "name": "Davit Rizhinashvili",
7
7
  "email": "drizhinashvili@datagrok.ai"
package/src/package.ts CHANGED
@@ -3,7 +3,7 @@ import * as grok from 'datagrok-api/grok';
3
3
  import * as ui from 'datagrok-api/ui';
4
4
  import * as DG from 'datagrok-api/dg';
5
5
 
6
- import {NOTATION, NOTATION_PROVIDER_CONSTRUCTOR_ROLE} from '@datagrok-libraries/bio/src/utils/macromolecule/consts';
6
+ import {BioTags, NOTATION, NOTATION_PROVIDER_CONSTRUCTOR_ROLE} from '@datagrok-libraries/bio/src/utils/macromolecule/consts';
7
7
  import {SeqTemps} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
8
8
 
9
9
  import {OligoToolkitPackage} from './apps/common/model/oligo-toolkit-package';
@@ -397,6 +397,8 @@ export class PackageFunctions {
397
397
  col.setTag('alphabet', 'UN');
398
398
  col.setTag('.alphabetIsMultichar', 'true');
399
399
  col.meta.units = NOTATION.CUSTOM;
400
+ if (separator && !col.tags[BioTags.separator])
401
+ col.tags[BioTags.separator] = separator;
400
402
  col.tags[PolyToolTags.dataRole] = 'template';
401
403
  col.temp[SeqTemps.notationProvider] = new CyclizedNotationProvider(separator, _package.helmHelper);
402
404
  }
@@ -36,9 +36,9 @@ export const PT_UI_LINEARIZE = 'Linearize';
36
36
  export const PT_UI_LINEARIZE_TT = 'Make representation linear if possible';
37
37
  export const PT_UI_USE_CHIRALITY = 'Chirality engine';
38
38
  export const PT_UI_HIGHLIGHT_MONOMERS = 'Highlight monomers';
39
- export const PT_UI_DIALOG_CONVERSION = 'Poly Tool Conversion';
40
- export const PT_UI_DIALOG_UNRULE = 'Poly Tool Unrule';
41
- export const PT_UI_DIALOG_ENUMERATION = 'Poly Tool Enumeration';
39
+ export const PT_UI_DIALOG_CONVERSION = 'PolyTool Conversion';
40
+ export const PT_UI_DIALOG_UNRULE = 'PolyTool Unrule';
41
+ export const PT_UI_DIALOG_ENUMERATION = 'PolyTool Enumeration';
42
42
  export const PT_UI_RULES_USED = 'Rules used';
43
43
 
44
44
  export const PT_ENUM_TYPE_TOOLTIPS: Record<string, string> = {
@@ -208,7 +208,14 @@ async function getPolyToolEnumerationChemDialog(cell?: DG.Cell): Promise<DG.Dial
208
208
  molInput.setMolFile(molfileValue);
209
209
 
210
210
  //const helmInput = helmHelper.createHelmInput('Macromolecule', {value: helmValue});
211
- const screenLibraryInput = ui.input.choice('Library to use', {value: null, items: libList});
211
+ const screenLibraryInput = ui.input.choice('Library to use', {
212
+ value: libList.length ? libList[0] : null,
213
+ items: libList,
214
+ nullable: false,
215
+ onValueChanged: () => {
216
+ dialog.getButton('OK').disabled = screenLibraryInput.value === null;
217
+ }
218
+ });
212
219
 
213
220
  molInput.root.setAttribute('style', `min-width:250px!important;`);
214
221
  molInput.root.setAttribute('style', `max-width:250px!important;`);
@@ -268,6 +275,7 @@ async function getPolyToolEnumerationChemDialog(cell?: DG.Cell): Promise<DG.Dial
268
275
  molInput.setMolFile(x.mol);
269
276
  screenLibraryInput.value = x.screenLibrary;
270
277
  });
278
+ dialog.getButton('OK').disabled = screenLibraryInput.value === null;
271
279
  return dialog;
272
280
  } catch (err: any) {
273
281
  destroy();