@datagrok/helm 2.7.2 → 2.7.3

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/helm",
3
3
  "friendlyName": "Helm",
4
- "version": "2.7.2",
4
+ "version": "2.7.3",
5
5
  "author": {
6
6
  "name": "Maria Dolotova",
7
7
  "email": "mdolotova@datagrok.ai"
@@ -16,7 +16,7 @@
16
16
  "css/helm.css"
17
17
  ],
18
18
  "dependencies": {
19
- "@datagrok-libraries/bio": "^5.48.2",
19
+ "@datagrok-libraries/bio": "^5.49.0",
20
20
  "@datagrok-libraries/chem-meta": "^1.2.7",
21
21
  "cash-dom": "^8.1.1",
22
22
  "@datagrok-libraries/utils": "^4.4.0",
@@ -50,7 +50,13 @@ export function getHoveredMonomerFromEditorMol(
50
50
 
51
51
  export function getSeqMonomerFromHelmAtom(seqValue: SeqValueBase, atom: HelmAtom): ISeqMonomer {
52
52
  const pos: number = atom.bio!.continuousId - 1;
53
- const canonicalSymbol = seqValue.getSplitted().getCanonical(pos);
53
+ let canonicalSymbol = atom.elem;
54
+ try { // for DNA/RNA, we might add phosphates and sugars
55
+ if (!seqValue.isDna() && !seqValue.isRna())
56
+ canonicalSymbol = seqValue.getSplitted().getCanonical(pos);
57
+ else
58
+ canonicalSymbol = seqValue.getSplittedWithSugarsAndPhosphates().getCanonical(pos);
59
+ } catch (_) {}
54
60
  // const canonicalSymbol = atom.elem === GapOriginals[NOTATION.HELM] ? GAP_SYMBOL : atom.elem;
55
61
  return {position: atom.bio!.continuousId - 1, symbol: canonicalSymbol, biotype: atom.bio!.type};
56
62
  }