@datagrok/bio 2.10.23 → 2.10.24

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.
@@ -0,0 +1,8 @@
1
+ HELM
2
+ "PEPTIDE1{[meI].[hHis].[Aca].N.T.[dE].[Thr_PO3H2].[Aca].[D-Tyr_Et].[Tyr_ab-dehydroMe].[dV].E.N.[D-Orn].[D-aThr].[Phe_4Me]}$PEPTIDE1,PEPTIDE1,16:R2-1:R1$$$V2.0"
3
+ PEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2.D-Chg.dV.Phe_ab-dehydro.N.D-Orn.D-aThr.Phe_4Me}$$$$
4
+ "PEPTIDE1{C.A.C.A.C.A.C.A}|PEPTIDE2{C.A.C.A.C.A.C.A}|PEPTIDE3{C.A.C.A.C.A.C.A}|PEPTIDE4{C.A.C.A.C.A.C.A}$PEPTIDE1,PEPTIDE2,3:R3-8:R2|PEPTIDE3,PEPTIDE4,3:R3-8:R2|PEPTIDE1,PEPTIDE3,5:R3-5:R3$$$V2.0"
5
+ "PEPTIDE1{C.A.C.A.C.A.C.A.C.A.C.A}|PEPTIDE2{C.A.C.A.C.A.C.A.C.A.C.A}$PEPTIDE2,PEPTIDE1,1:R1-3:R3|PEPTIDE2,PEPTIDE2,1:R3-12:R2$$$V2.0"
6
+ RNA1{d(A)p.d(G)p.d(C)p.d(T)p.d(A)p.d(G)p.d(C)p.d(T)p}$$$$V2.0
7
+ RNA1{d(A)p.d(G)p.d(C)p.d(T)p.d(A)p.d(G)p.d(C)p.d(T)p}|RNA2{d(G)p.d(G)p.d(G)p.d(G)p.d(A)p.d(G)p.d(C)p.d(T)p}$$$$V2.0
8
+ "RNA1{d(A)p.d(G)p.d(C)p.d(T)p.d(A)p.d(G)p.d(C)p.d(T)p}$RNA1,RNA1,24:R2-1:R1$$$V2.0"
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "Leonid Stolbov",
6
6
  "email": "lstolbov@datagrok.ai"
7
7
  },
8
- "version": "2.10.23",
8
+ "version": "2.10.24",
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",
@@ -35,7 +35,7 @@ export async function demoBio03UI(): Promise<void> {
35
35
  })
36
36
  .step('To atomic level', async () => {
37
37
  const seqCol = df.getCol(seqColName);
38
- await toAtomicLevel(df, seqCol);
38
+ await toAtomicLevel(df, seqCol, false);
39
39
  }, {
40
40
  description: 'Get atomic level structures of Macromolecules.',
41
41
  delay: 2000,
package/src/package.ts CHANGED
@@ -60,7 +60,7 @@ import {SplitToMonomersFunctionEditor} from './function-edtiors/split-to-monomer
60
60
  import {splitToMonomersUI} from './utils/split-to-monomers';
61
61
  import {MonomerCellRenderer} from './utils/monomer-cell-renderer';
62
62
  import {BioPackage, BioPackageProperties} from './package-types';
63
- import {RDModule} from '@datagrok-libraries/chem-meta/src/rdkit-api';
63
+ import {RDMol} from '@datagrok-libraries/chem-meta/src/rdkit-api';
64
64
  import {PackageSettingsEditorWidget} from './widgets/package-settings-editor-widget';
65
65
  import {getCompositionAnalysisWidget} from './widgets/composition-analysis-widget';
66
66
  import {MacromoleculeColumnWidget} from './utils/macromolecule-column-widget';
@@ -69,9 +69,11 @@ import {_getEnumeratorWidget, _setPeptideColumn} from './utils/enumerator-tools'
69
69
  import {getRegionDo} from './utils/get-region';
70
70
  import {GetRegionApp} from './apps/get-region-app';
71
71
  import {GetRegionFuncEditor} from './utils/get-region-func-editor';
72
+ import {HelmToMolfileConverter} from './utils/helm-to-molfile';
72
73
  import {DIMENSIONALITY_REDUCER_TERMINATE_EVENT}
73
74
  from '@datagrok-libraries/ml/src/workers/dimensionality-reducing-worker-creator';
74
75
  import {Options} from '@datagrok-libraries/utils/src/type-declarations';
76
+ import { sequenceToMolfile } from './utils/sequence-to-mol';
75
77
 
76
78
  export const _package = new BioPackage();
77
79
 
@@ -620,22 +622,11 @@ export async function sequenceSpaceTopMenu(
620
622
  //description: Converts sequences to molblocks
621
623
  //input: dataframe df [Input data table]
622
624
  //input: column macroMolecule {semType: Macromolecule}
623
- export async function toAtomicLevel(df: DG.DataFrame, macroMolecule: DG.Column): Promise<void> {
624
- if (DG.Func.find({package: 'Chem', name: 'getRdKitModule'}).length === 0) {
625
- grok.shell.warning('Transformation to atomic level requires package "Chem" installed.');
626
- return;
627
- }
628
- if (!checkInputColumnUI(macroMolecule, 'To Atomic Level'))
629
- return;
630
- const monomerLib: IMonomerLib = (await getMonomerLibHelper()).getBioLib();
631
- const atomicLevelRes = await _toAtomicLevel(df, macroMolecule, monomerLib);
632
- if (atomicLevelRes.col !== null) {
633
- df.columns.add(atomicLevelRes.col, true);
634
- await grok.data.detectSemanticTypes(df);
635
- }
636
-
637
- if (atomicLevelRes.warnings && atomicLevelRes.warnings.length > 0)
638
- grok.shell.warning(ui.list(atomicLevelRes.warnings));
625
+ //input: bool nonlinear=false { description: Slower mode for cycling/branching HELM structures }
626
+ export async function toAtomicLevel(df: DG.DataFrame, macroMolecule: DG.Column, nonlinear: boolean): Promise<void> {
627
+ const pi = DG.TaskBarProgressIndicator.create('Converting to atomic level ...');
628
+ sequenceToMolfile(df, macroMolecule, nonlinear);
629
+ pi.close();
639
630
  }
640
631
 
641
632
  //top-menu: Bio | Analyze | MSA...
@@ -1059,6 +1050,7 @@ export function getEnumeratorWidget(molColumn: DG.Column): DG.Widget {
1059
1050
  return _getEnumeratorWidget(molColumn);
1060
1051
  }
1061
1052
 
1053
+
1062
1054
  //top-menu: Bio | Convert | SDF to JSON Library...
1063
1055
  //name: SDF to JSON Library
1064
1056
  //input: dataframe table
@@ -64,7 +64,7 @@ category('toAtomicLevel', async () => {
64
64
 
65
65
  async function getTestResult(source: DG.DataFrame, target: DG.DataFrame): Promise<void> {
66
66
  const inputCol = source.getCol(inputColName);
67
- await toAtomicLevel(source, inputCol);
67
+ await toAtomicLevel(source, inputCol, false);
68
68
  const obtainedCol = source.getCol(outputColName);
69
69
  const expectedCol = target.getCol(outputColName);
70
70
  const obtainedArray = [...obtainedCol.values()];