@datagrok/bio 2.23.1 → 2.23.2

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
@@ -5,7 +5,7 @@
5
5
  "name": "Davit Rizhinashvili",
6
6
  "email": "drizhinashvili@datagrok.ai"
7
7
  },
8
- "version": "2.23.1",
8
+ "version": "2.23.2",
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",
@@ -65,7 +65,7 @@
65
65
  "wu": "^2.1.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@datagrok-libraries/helm-web-editor": "^1.1.14",
68
+ "@datagrok-libraries/helm-web-editor": "^1.1.16",
69
69
  "@datagrok-libraries/js-draw-lite": "^0.0.10",
70
70
  "@datagrok/chem": "^1.15.0",
71
71
  "@datagrok/dendrogram": "^1.2.33",
@@ -98,6 +98,14 @@ export namespace funcs {
98
98
  return await grok.functions.call('Bio:SeparatorSequenceCellRenderer', {});
99
99
  }
100
100
 
101
+ export async function bilnSequenceCellRenderer(): Promise<any> {
102
+ return await grok.functions.call('Bio:BilnSequenceCellRenderer', {});
103
+ }
104
+
105
+ export async function refineNotationProviderForBiln(col: DG.Column , stats: any , separator?: string | null): Promise<boolean> {
106
+ return await grok.functions.call('Bio:RefineNotationProviderForBiln', { col, stats, separator });
107
+ }
108
+
101
109
  export async function macroMolColumnPropertyPanel(molColumn: DG.Column ): Promise<any> {
102
110
  return await grok.functions.call('Bio:MacroMolColumnPropertyPanel', { molColumn });
103
111
  }
@@ -48,7 +48,7 @@ export function convert(col: DG.Column<string> | undefined, seqHelper: ISeqHelpe
48
48
  if (currentNotation === NOTATION.HELM)
49
49
  separatorInput.value = '/'; // helm monomers can have - in the name like D-aThr;
50
50
  dialogHeader.textContent = 'Current notation: ' + currentNotation;
51
- filteredNotations = notations;//.filter((e) => e !== currentNotation); TEMPORARY DO NOT FORGET TO UNCOMMENT
51
+ filteredNotations = notations.filter((e) => e !== currentNotation);
52
52
  targetNotationInput = ui.input.choice('Convert to', {
53
53
  value: filteredNotations[0], items: filteredNotations,
54
54
  onValueChanged: toggleSeparator
@@ -71,7 +71,7 @@ export function convert(col: DG.Column<string> | undefined, seqHelper: ISeqHelpe
71
71
  });
72
72
 
73
73
  const separatorArray = ['-', '.', '/'];
74
- let filteredNotations = notations;//.filter((e) => e !== currentNotation); // TEMPORARY DO NOT FORGET TO UNCOMMENT
74
+ let filteredNotations = notations.filter((e) => e !== currentNotation);
75
75
 
76
76
  const separatorInput = ui.input.choice('Separator', {value: separatorArray[0], items: separatorArray});
77
77
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-len */
1
2
  import {HELM_POLYMER_TYPE} from '@datagrok-libraries/bio/src/utils/const';
2
3
  import {HELM_ITEM_SEPARATOR} from './const';
3
4
  import {Bond} from './types';
@@ -12,7 +13,7 @@ export class ConnectionList {
12
13
  public connectionItems: string[];
13
14
 
14
15
  private validateConnectionItem(connectionItem: string): void {
15
- const allowedType = `(${HELM_POLYMER_TYPE.PEPTIDE}|${HELM_POLYMER_TYPE.RNA})`;
16
+ const allowedType = `(${HELM_POLYMER_TYPE.PEPTIDE}|${HELM_POLYMER_TYPE.RNA}|${HELM_POLYMER_TYPE.CHEM}|${HELM_POLYMER_TYPE.BLOB})`;
16
17
  const regex = new RegExp(`${allowedType}[0-9]+,${allowedType}[0-9]+,[0-9]+:R[0-9]+-[0-9]+:R[0-9]+`, 'g');
17
18
  if (!connectionItem.match(regex))
18
19
  throw new Error(`Cannot parse connection item from ${connectionItem}`);
@@ -28,7 +28,7 @@ export class SimplePolymer {
28
28
 
29
29
  private getPolymerType(): string {
30
30
  const regex = new RegExp(
31
- `(${HELM_POLYMER_TYPE.PEPTIDE}|${HELM_POLYMER_TYPE.RNA})[0-9]+{`
31
+ `(${HELM_POLYMER_TYPE.PEPTIDE}|${HELM_POLYMER_TYPE.RNA}|${HELM_POLYMER_TYPE.CHEM}|${HELM_POLYMER_TYPE.BLOB})[0-9]+{`
32
32
  );
33
33
  const match = this.simplePolymer.match(regex);
34
34
  if (!match)