@datagrok/bio 2.22.11 → 2.23.0
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/CHANGELOG.md +10 -0
- package/detectors.js +14 -0
- package/dist/455.js +1 -1
- package/dist/455.js.map +1 -1
- package/dist/package-test.js +3 -3
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dockerfiles/container.json +2 -2
- package/files/samples/BILN.csv +625 -0
- package/files/samples/BILN_W_HELM.csv +5114 -0
- package/package.json +6 -6
- package/src/package-api.ts +11 -0
- package/src/package.g.ts +54 -24
- package/src/package.ts +65 -13
- package/src/tests/biln-tests.ts +167 -0
- package/src/tests/converters-test.ts +14 -0
- package/src/tests/detectors-tests.ts +7 -0
- package/src/tests/renderers-test.ts +1 -1
- package/src/tests/viewers.ts +11 -16
- package/src/utils/biln.ts +69 -0
- package/src/utils/cell-renderer.ts +7 -11
- package/src/utils/convert.ts +3 -2
- package/src/utils/monomer-lib/monomer-manager/monomer-manager.ts +48 -1
- package/src/utils/save-as-fasta.ts +25 -22
- package/src/utils/seq-helper/seq-handler.ts +139 -33
- package/src/utils/seq-helper/seq-helper.ts +1 -1
- package/src/widgets/representations.ts +1 -1
- package/src/widgets/to-atomic-level-widget.ts +12 -4
- package/test-console-output-1.log +1071 -3014
- 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.
|
|
8
|
+
"version": "2.23.0",
|
|
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",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@biowasm/aioli": "^3.1.0",
|
|
47
|
-
"@datagrok-libraries/bio": "^5.
|
|
47
|
+
"@datagrok-libraries/bio": "^5.55.0",
|
|
48
48
|
"@datagrok-libraries/chem-meta": "^1.2.7",
|
|
49
|
-
"@datagrok-libraries/math": "^1.2.
|
|
50
|
-
"@datagrok-libraries/ml": "^6.10.
|
|
49
|
+
"@datagrok-libraries/math": "^1.2.6",
|
|
50
|
+
"@datagrok-libraries/ml": "^6.10.6",
|
|
51
51
|
"@datagrok-libraries/tutorials": "^1.6.1",
|
|
52
|
-
"@datagrok-libraries/utils": "^4.6.
|
|
52
|
+
"@datagrok-libraries/utils": "^4.6.5",
|
|
53
53
|
"@webgpu/types": "^0.1.40",
|
|
54
54
|
"ajv": "^8.12.0",
|
|
55
55
|
"ajv-errors": "^3.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/wu": "^2.1.44",
|
|
74
74
|
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
75
75
|
"@typescript-eslint/parser": "^8.8.1",
|
|
76
|
-
"datagrok-tools": "^4.14.
|
|
76
|
+
"datagrok-tools": "^4.14.57",
|
|
77
77
|
"eslint": "^8.57.1",
|
|
78
78
|
"eslint-config-google": "^0.14.0",
|
|
79
79
|
"eslint-plugin-rxjs": "^5.0.3",
|
package/src/package-api.ts
CHANGED
|
@@ -40,6 +40,17 @@ export namespace funcs {
|
|
|
40
40
|
return await grok.functions.call('Bio:SequenceTooltip', { col });
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
export async function standardiseMonomerLibrary(library: string ): Promise<string> {
|
|
44
|
+
return await grok.functions.call('Bio:StandardiseMonomerLibrary', { library });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
Matches molecules in a column with monomers from the selected library(s)
|
|
49
|
+
*/
|
|
50
|
+
export async function matchWithMonomerLibrary(table: DG.DataFrame , molecules: DG.Column , polymerType: string ): Promise<void> {
|
|
51
|
+
return await grok.functions.call('Bio:MatchWithMonomerLibrary', { table, molecules, polymerType });
|
|
52
|
+
}
|
|
53
|
+
|
|
43
54
|
export async function getBioLib(): Promise<any> {
|
|
44
55
|
return await grok.functions.call('Bio:GetBioLib', {});
|
|
45
56
|
}
|
package/src/package.g.ts
CHANGED
|
@@ -25,6 +25,15 @@ export async function standardiseMonomerLibrary(library: string) : Promise<strin
|
|
|
25
25
|
return await PackageFunctions.standardiseMonomerLibrary(library);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
//description: Matches molecules in a column with monomers from the selected library(s)
|
|
29
|
+
//input: dataframe table
|
|
30
|
+
//input: column molecules { semType: Molecule }
|
|
31
|
+
//input: string polymerType = 'PEPTIDE' { choices: ["PEPTIDE","RNA","CHEM"]; caption: Polymer Type }
|
|
32
|
+
//top-menu: Bio | Manage | Match with Monomer Library...
|
|
33
|
+
export async function matchWithMonomerLibrary(table: DG.DataFrame, molecules: DG.Column, polymerType: any) : Promise<void> {
|
|
34
|
+
await PackageFunctions.matchWithMonomerLibrary(table, molecules, polymerType);
|
|
35
|
+
}
|
|
36
|
+
|
|
28
37
|
//output: object monomerLib
|
|
29
38
|
export function getBioLib() : any {
|
|
30
39
|
return PackageFunctions.getBioLib();
|
|
@@ -101,6 +110,23 @@ export function separatorSequenceCellRenderer() : any {
|
|
|
101
110
|
return PackageFunctions.separatorSequenceCellRenderer();
|
|
102
111
|
}
|
|
103
112
|
|
|
113
|
+
//tags: cellRenderer
|
|
114
|
+
//output: grid_cell_renderer result
|
|
115
|
+
//meta.cellType: sequence
|
|
116
|
+
//meta.columnTags: quality=Macromolecule, units=biln
|
|
117
|
+
export function bilnSequenceCellRenderer() : any {
|
|
118
|
+
return PackageFunctions.bilnSequenceCellRenderer();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
//tags: notationRefiner
|
|
122
|
+
//input: column col
|
|
123
|
+
//input: object stats
|
|
124
|
+
//input: string separator { nullable: true; optional: true }
|
|
125
|
+
//output: bool result
|
|
126
|
+
export function refineNotationProviderForBiln(col: DG.Column<any>, stats: any, separator: any) : boolean {
|
|
127
|
+
return PackageFunctions.refineNotationProviderForBiln(col, stats, separator);
|
|
128
|
+
}
|
|
129
|
+
|
|
104
130
|
//name: Bioinformatics | Sequence Renderer
|
|
105
131
|
//tags: panel
|
|
106
132
|
//input: column molColumn { semType: Macromolecule }
|
|
@@ -126,8 +152,8 @@ export function macromoleculeDifferenceCellRenderer() : any {
|
|
|
126
152
|
return PackageFunctions.macromoleculeDifferenceCellRenderer();
|
|
127
153
|
}
|
|
128
154
|
|
|
129
|
-
//input: string alignType { choices: [
|
|
130
|
-
//input: string alignTable { choices: [
|
|
155
|
+
//input: string alignType { choices: ["Local alignment","Global alignment"] }
|
|
156
|
+
//input: string alignTable { choices: ["AUTO","NUCLEOTIDES","BLOSUM45","BLOSUM50","BLOSUM62","BLOSUM80","BLOSUM90","PAM30","PAM70","PAM250","SCHNEIDER","TRANS"] }
|
|
131
157
|
//input: double gap
|
|
132
158
|
//input: string seq1
|
|
133
159
|
//input: string seq2
|
|
@@ -182,9 +208,9 @@ export async function getRegionTopMenu(table: DG.DataFrame, sequence: DG.Column,
|
|
|
182
208
|
//input: dataframe table { description: Input data table }
|
|
183
209
|
//input: string molecules { semType: Macromolecule; description: Input data table }
|
|
184
210
|
//input: column activities
|
|
185
|
-
//input: double similarity
|
|
186
|
-
//input: string methodName { choices: [
|
|
187
|
-
//input: string similarityMetric { choices: [
|
|
211
|
+
//input: double similarity = 80 { description: Similarity cutoff }
|
|
212
|
+
//input: string methodName { choices: ["UMAP","t-SNE"] }
|
|
213
|
+
//input: string similarityMetric { choices: ["Hamming","Levenshtein","Monomer chemical distance"] }
|
|
188
214
|
//input: func preprocessingFunction
|
|
189
215
|
//input: object options { optional: true }
|
|
190
216
|
//input: bool demo { optional: true }
|
|
@@ -198,9 +224,9 @@ export async function activityCliffs(table: DG.DataFrame, molecules: DG.Column<a
|
|
|
198
224
|
//tags: dim-red-preprocessing-function
|
|
199
225
|
//input: column col { semType: Macromolecule }
|
|
200
226
|
//input: string metric
|
|
201
|
-
//input: double gapOpen
|
|
202
|
-
//input: double gapExtend
|
|
203
|
-
//input: string fingerprintType { caption: Fingerprint type;
|
|
227
|
+
//input: double gapOpen = 1 { caption: Gap open penalty; optional: true }
|
|
228
|
+
//input: double gapExtend = 0.6 { caption: Gap extension penalty; optional: true }
|
|
229
|
+
//input: string fingerprintType = 'Morgan' { caption: Fingerprint type; choices: ["Morgan","RDKit","Pattern","AtomPair","MACCS","TopologicalTorsion"]; optional: true }
|
|
204
230
|
//output: object result
|
|
205
231
|
//meta.supportedSemTypes: Macromolecule
|
|
206
232
|
//meta.supportedTypes: string
|
|
@@ -225,12 +251,12 @@ export async function helmPreprocessingFunction(col: DG.Column<any>, _metric: an
|
|
|
225
251
|
//description: Creates 2D sequence space with projected sequences by pairwise distance
|
|
226
252
|
//input: dataframe table
|
|
227
253
|
//input: column molecules { semType: Macromolecule }
|
|
228
|
-
//input: string methodName { choices: [
|
|
229
|
-
//input: string similarityMetric { choices: [
|
|
230
|
-
//input: bool plotEmbeddings
|
|
254
|
+
//input: string methodName { choices: ["UMAP","t-SNE"] }
|
|
255
|
+
//input: string similarityMetric { choices: ["Hamming","Levenshtein","Monomer chemical distance"] }
|
|
256
|
+
//input: bool plotEmbeddings = true
|
|
231
257
|
//input: func preprocessingFunction { optional: true }
|
|
232
258
|
//input: object options { optional: true }
|
|
233
|
-
//input: bool clusterEmbeddings { optional: true
|
|
259
|
+
//input: bool clusterEmbeddings = true { optional: true }
|
|
234
260
|
//input: bool isDemo { optional: true }
|
|
235
261
|
//top-menu: Bio | Analyze | Sequence Space...
|
|
236
262
|
//editor: Bio:SequenceSpaceEditor
|
|
@@ -242,8 +268,8 @@ export async function sequenceSpaceTopMenu(table: DG.DataFrame, molecules: DG.Co
|
|
|
242
268
|
//description: Converts sequences to molblocks
|
|
243
269
|
//input: dataframe table { description: Input data table }
|
|
244
270
|
//input: column seqCol { semType: Macromolecule; caption: Sequence }
|
|
245
|
-
//input: bool nonlinear
|
|
246
|
-
//input: bool highlight
|
|
271
|
+
//input: bool nonlinear = false { caption: Non-linear; description: Slower mode for cycling/branching HELM structures }
|
|
272
|
+
//input: bool highlight = false { caption: Highlight monomers; description: Highlight monomers' substructures of the molecule }
|
|
247
273
|
//top-menu: Bio | Transform | To Atomic Level...
|
|
248
274
|
export async function toAtomicLevel(table: DG.DataFrame, seqCol: DG.Column, nonlinear: boolean, highlight: boolean) : Promise<void> {
|
|
249
275
|
await PackageFunctions.toAtomicLevel(table, seqCol, nonlinear, highlight);
|
|
@@ -318,7 +344,7 @@ export function importBam(fileContent: string) : any {
|
|
|
318
344
|
return PackageFunctions.importBam(fileContent);
|
|
319
345
|
}
|
|
320
346
|
|
|
321
|
-
//top-menu: Bio | Transform | Convert Notation...
|
|
347
|
+
//top-menu: Bio | Transform | Convert Sequence Notation...
|
|
322
348
|
export function convertDialog() : void {
|
|
323
349
|
PackageFunctions.convertDialog();
|
|
324
350
|
}
|
|
@@ -338,7 +364,7 @@ export function monomerCellRenderer() : any {
|
|
|
338
364
|
return PackageFunctions.monomerCellRenderer();
|
|
339
365
|
}
|
|
340
366
|
|
|
341
|
-
//input: string path { choices: [
|
|
367
|
+
//input: string path { choices: ["Demo:Files/","System:AppData/"] }
|
|
342
368
|
//output: dataframe result
|
|
343
369
|
export async function testDetectMacromolecule(path: string) : Promise<any> {
|
|
344
370
|
return await PackageFunctions.testDetectMacromolecule(path);
|
|
@@ -408,7 +434,7 @@ export function SubsequenceSearchTopMenu(macromolecules: DG.Column) : void {
|
|
|
408
434
|
PackageFunctions.SubsequenceSearchTopMenu(macromolecules);
|
|
409
435
|
}
|
|
410
436
|
|
|
411
|
-
//name: Identity
|
|
437
|
+
//name: Identity
|
|
412
438
|
//description: Adds a column with fraction of matching monomers
|
|
413
439
|
//input: dataframe table { description: Table containing Macromolecule column }
|
|
414
440
|
//input: column macromolecule { semType: Macromolecule; description: Sequences to score }
|
|
@@ -419,7 +445,7 @@ export async function sequenceIdentityScoring(table: DG.DataFrame, macromolecule
|
|
|
419
445
|
return await PackageFunctions.sequenceIdentityScoring(table, macromolecule, reference);
|
|
420
446
|
}
|
|
421
447
|
|
|
422
|
-
//name: Similarity
|
|
448
|
+
//name: Similarity
|
|
423
449
|
//description: Adds a column with similarity scores, calculated as sum of monomer fingerprint similarities
|
|
424
450
|
//input: dataframe table { description: Table containing Macromolecule column }
|
|
425
451
|
//input: column macromolecule { semType: Macromolecule; description: Sequences to score }
|
|
@@ -486,30 +512,37 @@ export function bioSubstructureFilterTest() : any {
|
|
|
486
512
|
return PackageFunctions.bioSubstructureFilterTest();
|
|
487
513
|
}
|
|
488
514
|
|
|
515
|
+
//name: webLogoLargeApp
|
|
489
516
|
export async function webLogoLargeApp() : Promise<void> {
|
|
490
517
|
await PackageFunctions.webLogoLargeApp();
|
|
491
518
|
}
|
|
492
519
|
|
|
520
|
+
//name: webLogoAggApp
|
|
493
521
|
export async function webLogoAggApp() : Promise<void> {
|
|
494
522
|
await PackageFunctions.webLogoAggApp();
|
|
495
523
|
}
|
|
496
524
|
|
|
525
|
+
//name: getRegionApp
|
|
497
526
|
export async function getRegionApp() : Promise<void> {
|
|
498
527
|
await PackageFunctions.getRegionApp();
|
|
499
528
|
}
|
|
500
529
|
|
|
530
|
+
//name: getRegionHelmApp
|
|
501
531
|
export async function getRegionHelmApp() : Promise<void> {
|
|
502
532
|
await PackageFunctions.getRegionHelmApp();
|
|
503
533
|
}
|
|
504
534
|
|
|
535
|
+
//name: longSeqTableSeparator
|
|
505
536
|
export function longSeqTableSeparator() : void {
|
|
506
537
|
PackageFunctions.longSeqTableSeparator();
|
|
507
538
|
}
|
|
508
539
|
|
|
540
|
+
//name: longSeqTableFasta
|
|
509
541
|
export function longSeqTableFasta() : void {
|
|
510
542
|
PackageFunctions.longSeqTableFasta();
|
|
511
543
|
}
|
|
512
544
|
|
|
545
|
+
//name: longSeqTableHelm
|
|
513
546
|
export function longSeqTableHelm() : void {
|
|
514
547
|
PackageFunctions.longSeqTableHelm();
|
|
515
548
|
}
|
|
@@ -523,15 +556,14 @@ export function addCopyMenu(cell: any, menu: any) : void {
|
|
|
523
556
|
//description: Sequence similarity tracking and evaluation dataset diversity
|
|
524
557
|
//meta.demoPath: Bioinformatics | Similarity, Diversity
|
|
525
558
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Similarity,%20Diversity
|
|
526
|
-
//meta.demoSkip: GROK-14320
|
|
527
559
|
export async function demoBioSimilarityDiversity() : Promise<void> {
|
|
528
560
|
await PackageFunctions.demoBioSimilarityDiversity();
|
|
529
561
|
}
|
|
530
562
|
|
|
531
563
|
//description: Exploring sequence space of Macromolecules, comparison with hierarchical clustering results
|
|
564
|
+
//meta.isDemoDashboard: true
|
|
532
565
|
//meta.demoPath: Bioinformatics | Sequence Space
|
|
533
566
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Sequence%20Space
|
|
534
|
-
//meta.demoSkip: GROK-14320
|
|
535
567
|
export async function demoBioSequenceSpace() : Promise<void> {
|
|
536
568
|
await PackageFunctions.demoBioSequenceSpace();
|
|
537
569
|
}
|
|
@@ -539,7 +571,6 @@ export async function demoBioSequenceSpace() : Promise<void> {
|
|
|
539
571
|
//description: Activity Cliffs analysis on Macromolecules data
|
|
540
572
|
//meta.demoPath: Bioinformatics | Activity Cliffs
|
|
541
573
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Activity%20Cliffs
|
|
542
|
-
//meta.demoSkip: GROK-14320
|
|
543
574
|
export async function demoBioActivityCliffs() : Promise<void> {
|
|
544
575
|
await PackageFunctions.demoBioActivityCliffs();
|
|
545
576
|
}
|
|
@@ -547,7 +578,6 @@ export async function demoBioActivityCliffs() : Promise<void> {
|
|
|
547
578
|
//description: Atomic level structure of Macromolecules
|
|
548
579
|
//meta.demoPath: Bioinformatics | Atomic Level
|
|
549
580
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Atomic%20Level
|
|
550
|
-
//meta.demoSkip: GROK-14320
|
|
551
581
|
export async function demoBioAtomicLevel() : Promise<void> {
|
|
552
582
|
await PackageFunctions.demoBioAtomicLevel();
|
|
553
583
|
}
|
|
@@ -578,7 +608,7 @@ export async function seqIdentity(seq: string, ref: string) : Promise<any> {
|
|
|
578
608
|
|
|
579
609
|
//input: file file
|
|
580
610
|
//input: string colName
|
|
581
|
-
//input: double probeCount
|
|
611
|
+
//input: double probeCount = 100
|
|
582
612
|
export async function detectMacromoleculeProbe(file: DG.FileInfo, colName: string, probeCount: number) : Promise<void> {
|
|
583
613
|
await PackageFunctions.detectMacromoleculeProbe(file, colName, probeCount);
|
|
584
614
|
}
|
|
@@ -590,7 +620,7 @@ export async function getSeqHelper() : Promise<any> {
|
|
|
590
620
|
|
|
591
621
|
//input: dataframe df
|
|
592
622
|
//input: column helmCol
|
|
593
|
-
//input: bool chiralityEngine
|
|
623
|
+
//input: bool chiralityEngine = true
|
|
594
624
|
//output: column result
|
|
595
625
|
export async function getMolFromHelm(df: DG.DataFrame, helmCol: DG.Column<any>, chiralityEngine: boolean) : Promise<any> {
|
|
596
626
|
return await PackageFunctions.getMolFromHelm(df, helmCol, chiralityEngine);
|
package/src/package.ts
CHANGED
|
@@ -30,7 +30,7 @@ import {getUserLibSettings, setUserLibSettings} from '@datagrok-libraries/bio/sr
|
|
|
30
30
|
import {ISeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
|
|
31
31
|
import {RDModule as _RDMoule} from '@datagrok-libraries/chem-meta/src/rdkit-api';
|
|
32
32
|
import {getRdKitModule} from '@datagrok-libraries/bio/src/chem/rdkit-module';
|
|
33
|
-
import {ISeqHandler} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
|
|
33
|
+
import {ISeqHandler, SeqTemps} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
|
|
34
34
|
import {MmcrTemps} from '@datagrok-libraries/bio/src/utils/cell-renderer-consts';
|
|
35
35
|
|
|
36
36
|
import {getMacromoleculeColumns} from './utils/ui-utils';
|
|
@@ -70,12 +70,14 @@ import {GetRegionFuncEditor} from './utils/get-region-func-editor';
|
|
|
70
70
|
import {sequenceToMolfile} from './utils/sequence-to-mol';
|
|
71
71
|
import {detectMacromoleculeProbeDo} from './utils/detect-macromolecule-probe';
|
|
72
72
|
import {getMolColumnFromHelm} from './utils/helm-to-molfile/utils';
|
|
73
|
-
import {MonomerManager, standardizeMonomerLibrary} from './utils/monomer-lib/monomer-manager/monomer-manager';
|
|
73
|
+
import {matchMoleculesWithMonomers, MonomerManager, standardizeMonomerLibrary} from './utils/monomer-lib/monomer-manager/monomer-manager';
|
|
74
74
|
import {calculateScoresWithEmptyValues} from './utils/calculate-scores';
|
|
75
75
|
import {SeqHelper} from './utils/seq-helper/seq-helper';
|
|
76
76
|
import {_toAtomicLevel} from '@datagrok-libraries/bio/src/monomer-works/to-atomic-level';
|
|
77
77
|
import {molecular3DStructureWidget, toAtomicLevelWidget} from './widgets/to-atomic-level-widget';
|
|
78
78
|
import {handleSequenceHeaderRendering} from './widgets/sequence-scrolling-widget';
|
|
79
|
+
import {PolymerType} from '@datagrok-libraries/js-draw-lite/src/types/org';
|
|
80
|
+
import {BilnNotationProvider} from './utils/biln';
|
|
79
81
|
export const _package = new BioPackage(/*{debug: true}/**/);
|
|
80
82
|
export * from './package.g';
|
|
81
83
|
|
|
@@ -143,6 +145,14 @@ export class PackageFunctions {
|
|
|
143
145
|
return await standardizeMonomerLibrary(library);
|
|
144
146
|
}
|
|
145
147
|
|
|
148
|
+
@grok.decorators.func({'top-menu': 'Bio | Manage | Match with Monomer Library...', description: 'Matches molecules in a column with monomers from the selected library(s)',})
|
|
149
|
+
static async matchWithMonomerLibrary(table: DG.DataFrame,
|
|
150
|
+
@grok.decorators.param({type: 'column', options: {semType: 'Molecule'}})molecules: DG.Column,
|
|
151
|
+
@grok.decorators.param({type: 'string', options: {choices: ['PEPTIDE', 'RNA', 'CHEM'], initialValue: 'PEPTIDE', caption: 'Polymer Type'}})polymerType: PolymerType = 'PEPTIDE') {
|
|
152
|
+
const matchDF = await matchMoleculesWithMonomers(table, molecules.name, _package.monomerLib, polymerType);
|
|
153
|
+
grok.shell.addTableView(matchDF);
|
|
154
|
+
}
|
|
155
|
+
|
|
146
156
|
// Keep for backward compatibility
|
|
147
157
|
@grok.decorators.func({outputs: [{type: 'object', name: 'monomerLib'}]})
|
|
148
158
|
static getBioLib(): IMonomerLib {
|
|
@@ -288,6 +298,49 @@ export class PackageFunctions {
|
|
|
288
298
|
return new MacromoleculeSequenceCellRenderer();
|
|
289
299
|
}
|
|
290
300
|
|
|
301
|
+
@grok.decorators.func({
|
|
302
|
+
name: 'bilnSequenceCellRenderer',
|
|
303
|
+
tags: ['cellRenderer'],
|
|
304
|
+
meta: {
|
|
305
|
+
cellType: 'sequence',
|
|
306
|
+
columnTags: 'quality=Macromolecule, units=biln'
|
|
307
|
+
},
|
|
308
|
+
outputs: [{type: 'grid_cell_renderer', name: 'result'}]
|
|
309
|
+
})
|
|
310
|
+
static bilnSequenceCellRenderer(): MacromoleculeSequenceCellRenderer {
|
|
311
|
+
return new MacromoleculeSequenceCellRenderer();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@grok.decorators.func({
|
|
315
|
+
name: 'refineNotationProviderForBiln',
|
|
316
|
+
tags: ['notationRefiner'],
|
|
317
|
+
outputs: [{type: 'bool', name: 'result'}]
|
|
318
|
+
})
|
|
319
|
+
static refineNotationProviderForBiln(
|
|
320
|
+
@grok.decorators.param({type: 'column'}) col: DG.Column<string>,
|
|
321
|
+
@grok.decorators.param({type: 'object'}) stats: {freq: { [key: string]: number; }, sameLength: boolean},
|
|
322
|
+
@grok.decorators.param({type: 'string', options: {nullable: true, optional: true}}) separator: string | null
|
|
323
|
+
): boolean {
|
|
324
|
+
if (separator !== '-')
|
|
325
|
+
return false;// biln uses '-' as a separator
|
|
326
|
+
const reCons = Object.keys(stats.freq).some((om) => om.match(/^.+\(\d{1,2},\d{1,2}\)$/));
|
|
327
|
+
if (!reCons) {
|
|
328
|
+
// biln might also encode monomers with hyphens in names encoded by []
|
|
329
|
+
// here we know that there are no monomers with connections like (1,2) in names, so we can check for []
|
|
330
|
+
const reBrackets = Object.keys(stats.freq).some((om) => om.includes('[') || om.includes(']'));
|
|
331
|
+
if (!reBrackets)
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
// refine the notation provider
|
|
335
|
+
col.setTag('aligned', 'SEQ');
|
|
336
|
+
col.setTag('alphabet', 'UN');
|
|
337
|
+
col.setTag('.alphabetIsMultichar', 'true');
|
|
338
|
+
col.meta.units = NOTATION.BILN;
|
|
339
|
+
col.temp[SeqTemps.notationProvider] = new BilnNotationProvider(separator, _package.seqHelper, col);
|
|
340
|
+
|
|
341
|
+
return true;
|
|
342
|
+
}
|
|
343
|
+
|
|
291
344
|
// // -- Property panels --
|
|
292
345
|
|
|
293
346
|
@grok.decorators.panel({name: 'Bioinformatics | Sequence Renderer'})
|
|
@@ -748,7 +801,7 @@ export class PackageFunctions {
|
|
|
748
801
|
|
|
749
802
|
@grok.decorators.func({
|
|
750
803
|
name: 'convertDialog',
|
|
751
|
-
'top-menu': 'Bio | Transform | Convert Notation...'
|
|
804
|
+
'top-menu': 'Bio | Transform | Convert Sequence Notation...'
|
|
752
805
|
})
|
|
753
806
|
static convertDialog() {
|
|
754
807
|
const col: DG.Column<string> | undefined = getMacromoleculeColumns()[0];
|
|
@@ -939,14 +992,14 @@ export class PackageFunctions {
|
|
|
939
992
|
}
|
|
940
993
|
|
|
941
994
|
@grok.decorators.func({
|
|
942
|
-
name: 'Identity
|
|
995
|
+
name: 'Identity',
|
|
943
996
|
description: 'Adds a column with fraction of matching monomers',
|
|
944
997
|
'top-menu': 'Bio | Calculate | Identity...',
|
|
945
998
|
})
|
|
946
999
|
static async sequenceIdentityScoring(
|
|
947
|
-
@grok.decorators.param({options: {description: 'Table containing Macromolecule column'}})table: DG.DataFrame,
|
|
1000
|
+
@grok.decorators.param({options: {description: 'Table containing Macromolecule column'}}) table: DG.DataFrame,
|
|
948
1001
|
@grok.decorators.param({options: {semType: 'Macromolecule', description: 'Sequences to score'}}) macromolecule: DG.Column,
|
|
949
|
-
@grok.decorators.param({options: {description: 'Sequence,matching column format'}})reference: string
|
|
1002
|
+
@grok.decorators.param({options: {description: 'Sequence,matching column format'}}) reference: string
|
|
950
1003
|
): Promise<DG.Column<number>> {
|
|
951
1004
|
const seqHelper = _package.seqHelper;
|
|
952
1005
|
const scores = calculateScoresWithEmptyValues(table, macromolecule, reference, SCORE.IDENTITY, seqHelper);
|
|
@@ -954,14 +1007,14 @@ export class PackageFunctions {
|
|
|
954
1007
|
}
|
|
955
1008
|
|
|
956
1009
|
@grok.decorators.func({
|
|
957
|
-
name: 'Similarity
|
|
1010
|
+
name: 'Similarity',
|
|
958
1011
|
description: 'Adds a column with similarity scores, calculated as sum of monomer fingerprint similarities',
|
|
959
1012
|
'top-menu': 'Bio | Calculate | Similarity...',
|
|
960
1013
|
})
|
|
961
1014
|
static async sequenceSimilarityScoring(
|
|
962
|
-
@grok.decorators.param({options: {description: 'Table containing Macromolecule column'}})table: DG.DataFrame,
|
|
1015
|
+
@grok.decorators.param({options: {description: 'Table containing Macromolecule column'}}) table: DG.DataFrame,
|
|
963
1016
|
@grok.decorators.param({options: {semType: 'Macromolecule', description: 'Sequences to score'}}) macromolecule: DG.Column,
|
|
964
|
-
@grok.decorators.param({options: {description: 'Sequence,matching column format'}})reference: string
|
|
1017
|
+
@grok.decorators.param({options: {description: 'Sequence,matching column format'}}) reference: string
|
|
965
1018
|
): Promise<DG.Column<number>> {
|
|
966
1019
|
const seqHelper = _package.seqHelper;
|
|
967
1020
|
const scores = calculateScoresWithEmptyValues(table, macromolecule, reference, SCORE.SIMILARITY, seqHelper);
|
|
@@ -1137,7 +1190,6 @@ export class PackageFunctions {
|
|
|
1137
1190
|
description: 'Sequence similarity tracking and evaluation dataset diversity',
|
|
1138
1191
|
demoPath: 'Bioinformatics | Similarity, Diversity',
|
|
1139
1192
|
path: '/apps/Tutorials/Demo/Bioinformatics/Similarity,%20Diversity',
|
|
1140
|
-
demoSkip: 'GROK-14320'
|
|
1141
1193
|
})
|
|
1142
1194
|
static async demoBioSimilarityDiversity(): Promise<void> {
|
|
1143
1195
|
await demoBioSimDiv();
|
|
@@ -1147,7 +1199,9 @@ export class PackageFunctions {
|
|
|
1147
1199
|
description: 'Exploring sequence space of Macromolecules, comparison with hierarchical clustering results',
|
|
1148
1200
|
demoPath: 'Bioinformatics | Sequence Space',
|
|
1149
1201
|
path: '/apps/Tutorials/Demo/Bioinformatics/Sequence%20Space',
|
|
1150
|
-
|
|
1202
|
+
meta: {
|
|
1203
|
+
isDemoDashboard: 'true'
|
|
1204
|
+
}
|
|
1151
1205
|
})
|
|
1152
1206
|
static async demoBioSequenceSpace(): Promise<void> {
|
|
1153
1207
|
await demoSeqSpace();
|
|
@@ -1157,7 +1211,6 @@ export class PackageFunctions {
|
|
|
1157
1211
|
description: 'Activity Cliffs analysis on Macromolecules data',
|
|
1158
1212
|
demoPath: 'Bioinformatics | Activity Cliffs',
|
|
1159
1213
|
path: '/apps/Tutorials/Demo/Bioinformatics/Activity%20Cliffs',
|
|
1160
|
-
demoSkip: 'GROK-14320'
|
|
1161
1214
|
})
|
|
1162
1215
|
static async demoBioActivityCliffs(): Promise<void> {
|
|
1163
1216
|
await demoActivityCliffsCyclic();
|
|
@@ -1167,7 +1220,6 @@ export class PackageFunctions {
|
|
|
1167
1220
|
description: 'Atomic level structure of Macromolecules',
|
|
1168
1221
|
demoPath: 'Bioinformatics | Atomic Level',
|
|
1169
1222
|
path: '/apps/Tutorials/Demo/Bioinformatics/Atomic%20Level',
|
|
1170
|
-
demoSkip: 'GROK-14320'
|
|
1171
1223
|
})
|
|
1172
1224
|
static async demoBioAtomicLevel(): Promise<void> {
|
|
1173
1225
|
await demoToAtomicLevel();
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable max-lines */
|
|
3
|
+
/* eslint-disable max-lines-per-function */
|
|
4
|
+
import * as grok from 'datagrok-api/grok';
|
|
5
|
+
import * as ui from 'datagrok-api/ui';
|
|
6
|
+
import * as DG from 'datagrok-api/dg';
|
|
7
|
+
|
|
8
|
+
import {category, test, expect, before} from '@datagrok-libraries/utils/src/test';
|
|
9
|
+
|
|
10
|
+
import {ALIGNMENT, ALPHABET, NOTATION, TAGS as bioTAGS} from '@datagrok-libraries/bio/src/utils/macromolecule';
|
|
11
|
+
import {ISeqHelper, getSeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
|
|
12
|
+
|
|
13
|
+
import {_testNeg, _testPos, DetectorTestData, DfReaderFunc, PosCol} from './utils/detectors-utils';
|
|
14
|
+
import {SeqTemps} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
|
|
15
|
+
|
|
16
|
+
export async function prepareBiln(list: string[], seqHelper: ISeqHelper): Promise<DG.Column> {
|
|
17
|
+
const col: DG.Column = DG.Column.fromList(DG.TYPE.STRING, 'seq', list);
|
|
18
|
+
const semType: string = await grok.functions.call('Bio:detectMacromolecule', {col: col});
|
|
19
|
+
if (semType)
|
|
20
|
+
col.semType = semType;
|
|
21
|
+
expect(col.semType, DG.SEMTYPE.MACROMOLECULE);
|
|
22
|
+
const sh = seqHelper.getSeqHandler(col);
|
|
23
|
+
await sh.refinerPromise; // wait for refiner to finish
|
|
24
|
+
const _newSh = seqHelper.getSeqHandler(col);
|
|
25
|
+
return col;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export async function _testBilnDetection(list: string[], seqHelper: ISeqHelper, negativeTest = false): Promise<void> {
|
|
30
|
+
const col = await prepareBiln(list, seqHelper);
|
|
31
|
+
expect(col.meta.units === NOTATION.BILN, !negativeTest, `Incorrectly detected as ${col.meta.units}`);
|
|
32
|
+
expect(col.temp[SeqTemps.notationProvider] != null, !negativeTest, `No notation provider for BILN`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export async function _testBilnToHelm(list: string[], expectedHelm: string[], seqHelper: ISeqHelper): Promise<void> {
|
|
36
|
+
const col = await prepareBiln(list, seqHelper);
|
|
37
|
+
const sh = seqHelper.getSeqHandler(col);
|
|
38
|
+
for (let i = 0; i < list.length; i++) {
|
|
39
|
+
const helm = sh.getHelm(i);
|
|
40
|
+
expect(helm === expectedHelm[i], true, `Incorrect HELM conversion for ${list[i]}: Expected ${expectedHelm[i]} \n Got ${helm}`);
|
|
41
|
+
}
|
|
42
|
+
// also test through converter
|
|
43
|
+
const converter = sh.getConverter(NOTATION.HELM);
|
|
44
|
+
for (let i = 0; i < list.length; i++) {
|
|
45
|
+
const helm = converter(list[i]);
|
|
46
|
+
expect(helm === expectedHelm[i], true, `Incorrect HELM conversion for ${list[i]}: Expected ${expectedHelm[i]} \n Got ${helm}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export async function _testHelmToBiln(helmList: string[], expectedBiln: string[], seqHelper: ISeqHelper): Promise<void> {
|
|
51
|
+
const col: DG.Column = DG.Column.fromList(DG.TYPE.STRING, 'helm', helmList);
|
|
52
|
+
const df = DG.DataFrame.fromColumns([col]);
|
|
53
|
+
await df.meta.detectSemanticTypes();
|
|
54
|
+
await grok.data.detectSemanticTypes(df);
|
|
55
|
+
expect(col.semType === DG.SEMTYPE.MACROMOLECULE, true, `Incorrectly detected as ${col.semType}`);
|
|
56
|
+
expect(col.meta.units === NOTATION.HELM, true, `Incorrectly detected as ${col.meta.units}`);
|
|
57
|
+
const sh = seqHelper.getSeqHandler(col);
|
|
58
|
+
const converter = sh.getConverter(NOTATION.BILN);
|
|
59
|
+
for (let i = 0; i < helmList.length; i++) {
|
|
60
|
+
const biln = converter(helmList[i]);
|
|
61
|
+
expect(biln === expectedBiln[i], true, `Incorrect BILN conversion for ${helmList[i]}: Expected ${expectedBiln[i]} \n Got ${biln}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const detectorTestsDataForBiln: {name: string, seqs: string[], negative: boolean}[] = [
|
|
66
|
+
{
|
|
67
|
+
name: 'Valid Biln',
|
|
68
|
+
seqs: [
|
|
69
|
+
'A-C(1,3)-G-G-H-A-V-E-A-K-Y-L-V-C(3,3)-S.G-I-V-E-A-C(2,3)-C(1,3)-T-S-I-C(2,3)-S-L-Y-Q-L-E-N-Y-C(3,3)-Y',
|
|
70
|
+
'A-C(1,3)-G-G-H-A-V-E-A-K-Y-L-V-C(3,3)-S.G-I-V-E-A-C(2,3)-C(1,3)-T-S-I-C(2,3)-S-L-Y-Q-L-E-N-Y-C(3,3)-Y',
|
|
71
|
+
'C-C(1,3)-S-W-P-A-R-C(2,3)-L-H-Q-D-L-C(3,3)-NH2.C(1,1)(2,2)(3,3)',
|
|
72
|
+
'C-C(1,3)-S-W-P-A-R-C(2,3)-L-H-Q-D-L-C(3,3)-NH2.[C](1,1)(2,2)(3,3)',
|
|
73
|
+
'D-T-H-F-P-I-C(1,3)-I-F-C(2,3)-C(3,3)-G-C(2,3)-C(4,3)-H-R-S-K-C(3,3)-G-M-C(4,3)-C(1,3)-K-T'
|
|
74
|
+
], negative: false
|
|
75
|
+
}, {
|
|
76
|
+
name: 'Simple Separator Neg',
|
|
77
|
+
seqs: [
|
|
78
|
+
'meI/hHis/Aca/N/T/dE/Thr_PO3H2/Aca/D-Tyr_Et/Tyr_ab-dehydroMe/dV/E/N/D-Orn/D-aThr//Phe_4Me',
|
|
79
|
+
'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',
|
|
80
|
+
'Lys_Boc/hHis/Aca/Cys_SEt/T/dK/Thr_PO3H2/Aca/Tyr_PO3H2/D-Chg/dV/Thr_PO3H2/N/D-Orn/D-aThr//Phe_4Me',
|
|
81
|
+
'meI/hHis/Aca/Cys_SEt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'
|
|
95
|
+
], negative: false
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
export const bilnToHelmTestsData: {name: string, biln: string[], helm: string[]}[] = [
|
|
100
|
+
{
|
|
101
|
+
name: 'Linear',
|
|
102
|
+
biln: ['meI-hHis-Aca-N-T-dE-Thr_PO3H2-Aca-[D-Tyr_Et]-[Tyr_ab-dehydroMe]-dV-E-N-[D-Orn]-[D-aThr]--Phe_4Me',
|
|
103
|
+
'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',
|
|
104
|
+
'Lys_Boc-hHis-Aca-Cys_SEt-T-dK-Thr_PO3H2-Aca-Tyr_PO3H2-[D-Chg]-dV-Thr_PO3H2-N-[D-Orn]-[D-aThr]--Phe_4Me',
|
|
105
|
+
'meI-hHis-Aca-Cys_SEt-T-dK-Thr_PO3H2-Aca-Tyr_PO3H2-[D-Chg]-dV-Thr_PO3H2-N-[D-Orn]-[D-aThr]--Phe_4Me',
|
|
106
|
+
'meI-hHis-Aca-N-T-dK-Thr_PO3H2-Aca-[D-Tyr_Et]-[Tyr_ab-dehydroMe]-dV-Chg-N-[D-Orn]-[D-aThr]--Phe_4Me'],
|
|
107
|
+
helm: [
|
|
108
|
+
'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]}$$$$',
|
|
109
|
+
'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]}$$$$',
|
|
110
|
+
'PEPTIDE1{[Lys_Boc].[hHis].[Aca].[Cys_SEt].T.[dK].[Thr_PO3H2].[Aca].[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PEPTIDE2,1:R1-16:R2|PEPTIDE2,PEPTIDE3,1:R3-11:R3|PEPTIDE3,PEPTIDE3,1:R1-17:R2$$$V2.0'
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
export const helmToBilnTestsData: {name: string, helm: string[], biln: string[]}[] = [
|
|
134
|
+
{
|
|
135
|
+
name: 'Linear',
|
|
136
|
+
biln: [
|
|
137
|
+
'meI-hHis-Aca-N-T-dE-Thr_PO3H2-Aca-[D-Tyr_Et]-[Tyr_ab-dehydroMe]-dV-E-N-[D-Orn]-[D-aThr]--Phe_4Me',
|
|
138
|
+
'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',
|
|
139
|
+
'Lys_Boc-hHis-Aca-Cys_SEt-T-dK-Thr_PO3H2-Aca-Tyr_PO3H2-[D-Chg]-dV-Thr_PO3H2-N-[D-Orn]-[D-aThr]--Phe_4Me',
|
|
140
|
+
'meI-hHis-Aca-Cys_SEt-T-dK-Thr_PO3H2-Aca-Tyr_PO3H2-[D-Chg]-dV-Thr_PO3H2-N-[D-Orn]-[D-aThr]--Phe_4Me',
|
|
141
|
+
'meI-hHis-Aca-N-T-dK-Thr_PO3H2-Aca-[D-Tyr_Et]-[Tyr_ab-dehydroMe]-dV-Chg-N-[D-Orn]-[D-aThr]--Phe_4Me'
|
|
142
|
+
],
|
|
143
|
+
helm: [
|
|
144
|
+
'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]}$$$$',
|
|
145
|
+
'PEPTIDE1{[meI].[hHis].[Aca].[Cys_SEt].T.[dK].[Thr_PO3H2].[Aca].[Tyr_PO3H2].[D-Chg].[dV].[Phe_ab-dehydro].N.[D-Or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].[Ala_tBu].[dI].[Trp_Ome].[Asp_OMe].N.[meG].[Phe_34diCl].[Phe_34diCl]}$PEPTIDE1,PEPTIDE2,1:R2-9:R3|PEPTIDE2,PEPTIDE2,1:R1-16:R2|PEPTIDE2,PEPTIDE3,1:R3-11:R3|PEPTIDE3,PEPTIDE3,1:R1-17:R2$$$V2.0'
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
/* eslint-disable max-lines-per-function */
|
|
1
3
|
import * as DG from 'datagrok-api/dg';
|
|
2
4
|
import * as grok from 'datagrok-api/grok';
|
|
3
5
|
|
|
@@ -7,6 +9,7 @@ import {ISeqHelper, getSeqHelper} from '@datagrok-libraries/bio/src/utils/seq-he
|
|
|
7
9
|
import {ISeqHandler} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
|
|
8
10
|
|
|
9
11
|
import {ConverterFunc} from './types';
|
|
12
|
+
import {_testBilnToHelm, _testHelmToBiln, bilnToHelmTestsData, helmToBilnTestsData} from './biln-tests';
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
category('converters', () => {
|
|
@@ -287,4 +290,15 @@ RNA1{p.r(U)p.r(U)p.r(C)p.r(A)p.r(A)p.r(C)p.r(U)p.r(U)p.r(C)p.r(A)p.r(A)p.r(C)p.p
|
|
|
287
290
|
test('testHelmLonePhosphorus', async () => {
|
|
288
291
|
await _testConvert(Samples.helmLonePhosphorus, converter(NOTATION.FASTA), Samples.fastaRna);
|
|
289
292
|
});
|
|
293
|
+
|
|
294
|
+
for (const sample of bilnToHelmTestsData) {
|
|
295
|
+
test(`testBilnToHelm_${sample.name}`, async () => {
|
|
296
|
+
await _testBilnToHelm(sample.biln, sample.helm, seqHelper);
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
for (const sample of helmToBilnTestsData) {
|
|
300
|
+
test(`testHelmToBiln_${sample.name}`, async () => {
|
|
301
|
+
await _testHelmToBiln(sample.helm, sample.biln, seqHelper);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
290
304
|
});
|