@datagrok/bio 2.25.13 → 2.25.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/dist/package-test.js +3 -3
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/demo/bio03-atomic-level.ts +1 -2
- package/src/substructure-search/substructure-search.ts +1 -2
- package/src/utils/detect-macromolecule-probe.ts +1 -2
- package/src/utils/monomer-lib/lib-manager.ts +1 -2
- package/src/utils/multiple-sequence-alignment-ui.ts +1 -2
- package/src/utils/seq-helper/seq-handler.ts +14 -4
- package/src/utils/split-to-monomers.ts +1 -2
- package/src/viewers/vd-regions-viewer.ts +1 -1
- package/src/viewers/web-logo-viewer.ts +1 -1
- package/src/widgets/bio-substructure-filter-helm.ts +2 -3
- package/src/widgets/bio-substructure-filter.ts +2 -2
- package/test-console-output-1.log +489 -543
- package/test-record-1.mp4 +0 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Davit Rizhinashvili",
|
|
6
6
|
"email": "drizhinashvili@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.25.
|
|
8
|
+
"version": "2.25.14",
|
|
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",
|
|
@@ -4,7 +4,6 @@ import * as DG from 'datagrok-api/dg';
|
|
|
4
4
|
import {_package, PackageFunctions} from '../package';
|
|
5
5
|
import {handleError} from './utils';
|
|
6
6
|
import {DemoScript} from '@datagrok-libraries/tutorials/src/demo-script';
|
|
7
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
8
7
|
import {adjustGridcolAfterRender} from '../utils/ui-utils';
|
|
9
8
|
|
|
10
9
|
export async function demoToAtomicLevel(): Promise<void> {
|
|
@@ -63,7 +62,7 @@ export async function demoBio03UI(): Promise<void> {
|
|
|
63
62
|
dlg = ui.dialog()
|
|
64
63
|
.add(sketcher)
|
|
65
64
|
.show();
|
|
66
|
-
await delay(3000);
|
|
65
|
+
await DG.delay(3000);
|
|
67
66
|
dlg.close();
|
|
68
67
|
}, {
|
|
69
68
|
description: 'Display atomic level structure within a sketcher.',
|
|
@@ -2,7 +2,6 @@ import * as grok from 'datagrok-api/grok';
|
|
|
2
2
|
import * as ui from 'datagrok-api/ui';
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
6
5
|
import {TAGS as bioTAGS, NOTATION} from '@datagrok-libraries/bio/src/utils/macromolecule';
|
|
7
6
|
import {ISeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
|
|
8
7
|
|
|
@@ -154,7 +153,7 @@ export async function helmSubstructureSearch(
|
|
|
154
153
|
export async function invalidateMols(col: DG.Column<string>, seqHelper: ISeqHelper, pattern: boolean): Promise<void> {
|
|
155
154
|
const progressBar = DG.TaskBarProgressIndicator.create(`Invalidating molfiles for ${col.name}`);
|
|
156
155
|
try {
|
|
157
|
-
await delay(10);
|
|
156
|
+
await DG.delay(10);
|
|
158
157
|
const monomersDict = new Map();
|
|
159
158
|
const monomericMolsCol = await getMonomericMols(col, seqHelper, pattern, monomersDict);
|
|
160
159
|
col.temp[MONOMERIC_COL_TAGS.MONOMERIC_MOLS] = monomericMolsCol;
|
|
@@ -4,7 +4,6 @@ import * as DG from 'datagrok-api/dg';
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import {_package} from '../package';
|
|
7
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
8
7
|
|
|
9
8
|
type IDetectorReport = { categoriesSample: any[], rejectReason: string };
|
|
10
9
|
|
|
@@ -31,7 +30,7 @@ export async function detectMacromoleculeProbeDo(
|
|
|
31
30
|
if ((progress - progressLast) >= 0.1) {
|
|
32
31
|
progressLast = progress;
|
|
33
32
|
pi.update(100 * progress, `detectMacromolecule probe ${failCount}/${i}/${probeCount} ...`);
|
|
34
|
-
await delay(0);
|
|
33
|
+
await DG.delay(0);
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
if (failCount > 0)
|
|
@@ -4,7 +4,6 @@ import * as grok from 'datagrok-api/grok';
|
|
|
4
4
|
import * as ui from 'datagrok-api/ui';
|
|
5
5
|
import * as DG from 'datagrok-api/dg';
|
|
6
6
|
|
|
7
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
8
7
|
import {ILogger} from '@datagrok-libraries/bio/src/utils/logger';
|
|
9
8
|
import {DEFAULT_FILES_LIB_PROVIDER_NAME, findProviderWithLibraryName, IMonomerLib, IMonomerSet} from '@datagrok-libraries/bio/src/types/monomer-library';
|
|
10
9
|
import {
|
|
@@ -91,7 +90,7 @@ export class MonomerLibManager implements IMonomerLibHelper {
|
|
|
91
90
|
return true;
|
|
92
91
|
})(),
|
|
93
92
|
(async () => {
|
|
94
|
-
await delay(timeout);
|
|
93
|
+
await DG.delay(timeout);
|
|
95
94
|
return false;
|
|
96
95
|
})(),
|
|
97
96
|
]).then((res) => {
|
|
@@ -6,7 +6,6 @@ import * as DG from 'datagrok-api/dg';
|
|
|
6
6
|
import * as ui from 'datagrok-api/ui';
|
|
7
7
|
|
|
8
8
|
import {ColumnInputOptions} from '@datagrok-libraries/utils/src/type-declarations';
|
|
9
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
10
9
|
import {ALPHABET, NOTATION} from '@datagrok-libraries/bio/src/utils/macromolecule';
|
|
11
10
|
import {ISeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
|
|
12
11
|
|
|
@@ -82,7 +81,7 @@ export async function multipleSequenceAlignmentUI(
|
|
|
82
81
|
table: table, value: seqCol, onValueChanged: async (value: DG.Column<any>) => {
|
|
83
82
|
if (!value || value.semType !== DG.SEMTYPE.MACROMOLECULE) {
|
|
84
83
|
okBtn.disabled = true;
|
|
85
|
-
await delay(0); // to
|
|
84
|
+
await DG.delay(0); // to
|
|
86
85
|
colInput.value = prevSeqCol as DG.Column<string>;
|
|
87
86
|
return;
|
|
88
87
|
}
|
|
@@ -50,9 +50,19 @@ export class SeqHandler implements ISeqHandler {
|
|
|
50
50
|
if (col.type !== DG.TYPE.STRING)
|
|
51
51
|
throw new Error(`Unexpected column type '${col.type}', must be '${DG.TYPE.STRING}'.`);
|
|
52
52
|
this._column = col;
|
|
53
|
-
|
|
54
|
-
if (!units)
|
|
55
|
-
|
|
53
|
+
let units: string | null = this._column.meta.units;
|
|
54
|
+
if (!units) {
|
|
55
|
+
// it may be from layout that the macromolecule semtype is set but every other tag is missing, so we manually run detectors
|
|
56
|
+
if (!this._column.temp['seqHandlerDetectorRun']) {
|
|
57
|
+
this._column.temp['seqHandlerDetectorRun'] = true;
|
|
58
|
+
const detectorFunc = DG.Func.find({name: 'detectMacromolecule', meta: {role: 'semTypeDetector'}})[0];
|
|
59
|
+
if (detectorFunc)
|
|
60
|
+
detectorFunc.applySync({col: this._column});
|
|
61
|
+
units = this._column.meta.units;
|
|
62
|
+
}
|
|
63
|
+
if (!units)
|
|
64
|
+
throw new Error('Units are not specified in column');
|
|
65
|
+
}
|
|
56
66
|
this._units = units!;
|
|
57
67
|
|
|
58
68
|
this._notation = this.getNotation();
|
|
@@ -182,7 +192,7 @@ export class SeqHandler implements ISeqHandler {
|
|
|
182
192
|
|
|
183
193
|
let aligned = uh.column.getTag(TAGS.aligned);
|
|
184
194
|
if (aligned == null) {
|
|
185
|
-
aligned = uh.stats.sameLength ? ALIGNMENT.SEQ_MSA : ALIGNMENT.SEQ;
|
|
195
|
+
aligned = uh.stats.sameLength || uh.column.categories.slice(0, 5).filter((a) => !!a).every((a) => a.length > 100) ? ALIGNMENT.SEQ_MSA : ALIGNMENT.SEQ;
|
|
186
196
|
uh.column.setTag(TAGS.aligned, aligned);
|
|
187
197
|
}
|
|
188
198
|
|
|
@@ -2,7 +2,6 @@ import * as grok from 'datagrok-api/grok';
|
|
|
2
2
|
import * as ui from 'datagrok-api/ui';
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
6
5
|
import {checkInputColumnUI} from './check-input-column';
|
|
7
6
|
import {splitAlignedSequences} from '@datagrok-libraries/bio/src/utils/splitter';
|
|
8
7
|
import * as C from './constants';
|
|
@@ -17,7 +16,7 @@ export async function splitToMonomersUI(
|
|
|
17
16
|
): Promise<DG.DataFrame> {
|
|
18
17
|
// Delay is required for initial function dialog to close before starting invalidating of molfiles.
|
|
19
18
|
// Otherwise, dialog is freezing
|
|
20
|
-
await delay(10);
|
|
19
|
+
await DG.delay(10);
|
|
21
20
|
if (!checkInputColumnUI(seqCol, 'Sequence space')) return table;
|
|
22
21
|
|
|
23
22
|
const seqHelper = _package.seqHelper;
|
|
@@ -4,7 +4,7 @@ import * as DG from 'datagrok-api/dg';
|
|
|
4
4
|
|
|
5
5
|
import {fromEvent, Observable, Subject, Unsubscribable} from 'rxjs';
|
|
6
6
|
|
|
7
|
-
import {testEvent} from '@datagrok-libraries/
|
|
7
|
+
import {testEvent} from '@datagrok-libraries/utils/src/test';
|
|
8
8
|
import {
|
|
9
9
|
IVdRegionsViewer,
|
|
10
10
|
VdRegion, VdRegionType,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {errorToConsole} from '@datagrok-libraries/utils/src/to-console';
|
|
23
23
|
import {intToHtmlA} from '@datagrok-libraries/utils/src/color';
|
|
24
24
|
import {ISeqSplitted} from '@datagrok-libraries/bio/src/utils/macromolecule/types';
|
|
25
|
-
import {testEvent} from '@datagrok-libraries/
|
|
25
|
+
import {testEvent} from '@datagrok-libraries/utils/src/test';
|
|
26
26
|
import {PromiseSyncer} from '@datagrok-libraries/bio/src/utils/syncer';
|
|
27
27
|
import {GAP_SYMBOL} from '@datagrok-libraries/bio/src/utils/macromolecule/consts';
|
|
28
28
|
import {IMonomerLibBase} from '@datagrok-libraries/bio/src/types/monomer-library';
|
|
@@ -9,7 +9,6 @@ import {App, IHelmWebEditor} from '@datagrok-libraries/bio/src/helm/types';
|
|
|
9
9
|
import {getHelmHelper} from '@datagrok-libraries/bio/src/helm/helm-helper';
|
|
10
10
|
import {ILogger} from '@datagrok-libraries/bio/src/utils/logger';
|
|
11
11
|
import {errInfo} from '@datagrok-libraries/bio/src/utils/err-info';
|
|
12
|
-
import {delay} from '@datagrok-libraries/test/src/test';
|
|
13
12
|
import {ISeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
|
|
14
13
|
|
|
15
14
|
import {updateDivInnerHTML} from '../utils/ui-utils';
|
|
@@ -141,7 +140,7 @@ export class HelmBioFilter extends BioFilterBase<BioFilterProps> /* implements I
|
|
|
141
140
|
const logPrefix = `${this.viewerToLog()}.substructureSearch( column = <${column.name}> )`;
|
|
142
141
|
_package.logger.debug(`${logPrefix}, start`);
|
|
143
142
|
try {
|
|
144
|
-
await delay(10);
|
|
143
|
+
await DG.delay(10);
|
|
145
144
|
const res = await helmSubstructureSearch(this.props.substructure, column, this.seqHelper);
|
|
146
145
|
return res;
|
|
147
146
|
} finally {
|
|
@@ -163,7 +162,7 @@ export class HelmBioFilter extends BioFilterBase<BioFilterProps> /* implements I
|
|
|
163
162
|
// async awaitRendered(timeout: number = 10000): Promise<void> {
|
|
164
163
|
// const callLog = `awaitRendered( ${timeout} )`;
|
|
165
164
|
// const logPrefix = `${this.viewerToLog()}.${callLog}`;
|
|
166
|
-
// await delay(0);
|
|
165
|
+
// await DG.delay(0);
|
|
167
166
|
// await testEvent(this.onRendered, () => {
|
|
168
167
|
// this.logger.debug(`${logPrefix}, ` + '_onRendered event caught');
|
|
169
168
|
// }, () => {
|
|
@@ -14,7 +14,7 @@ import wu from 'wu';
|
|
|
14
14
|
import {Observable, Subject, Unsubscribable} from 'rxjs';
|
|
15
15
|
|
|
16
16
|
import {TAGS as bioTAGS, NOTATION} from '@datagrok-libraries/bio/src/utils/macromolecule';
|
|
17
|
-
import {
|
|
17
|
+
import {testEvent} from '@datagrok-libraries/utils/src/test';
|
|
18
18
|
import {IRenderer} from '@datagrok-libraries/bio/src/types/renderer';
|
|
19
19
|
import {ILogger} from '@datagrok-libraries/bio/src/utils/logger';
|
|
20
20
|
import {PromiseSyncer} from '@datagrok-libraries/bio/src/utils/syncer';
|
|
@@ -269,7 +269,7 @@ export class BioSubstructureFilter extends DG.Filter implements IRenderer {
|
|
|
269
269
|
async awaitRendered(timeout: number = 10000): Promise<void> {
|
|
270
270
|
const callLog = `awaitRendered( ${timeout} )`;
|
|
271
271
|
const logPrefix = `${this.filterToLog()}.${callLog}`;
|
|
272
|
-
await delay(10);
|
|
272
|
+
await DG.delay(10);
|
|
273
273
|
await testEvent(this.onRendered, () => {
|
|
274
274
|
this.logger.debug(`${logPrefix}, ` + '_onRendered event caught');
|
|
275
275
|
}, () => {
|