@datagrok/bio 1.7.7 → 1.7.11
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/detectors.js +22 -7
- package/dist/package-test.js +378 -82
- package/dist/package.js +276 -62
- package/files/tests/testActivityCliffs.csv +311 -0
- package/files/tests/testSpgi100.csv +8437 -0
- package/files/tests/testUnichemSources.csv +36 -0
- package/package.json +2 -2
- package/src/package.ts +74 -0
- package/src/tests/convert-test.ts +55 -22
- package/src/tests/detectors-test.ts +45 -6
- package/src/tests/splitters-test.ts +19 -0
- package/src/utils/cell-renderer.ts +114 -1
- package/src/utils/constants.ts +2 -1
- package/src/utils/convert.ts +17 -3
- package/src/utils/multiple-sequence-alignment.ts +2 -1
- package/src/utils/utils.ts +10 -8
- package/{test-Bio-34f75e5127b8-7c42ea4b.html → test-Bio-34f75e5127b8-f542cbde.html} +22 -10
package/src/utils/utils.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as DG from 'datagrok-api/dg';
|
|
2
2
|
import {WebLogo, SplitterFunc} from '@datagrok-libraries/bio/src/viewers/web-logo';
|
|
3
3
|
import * as grok from 'datagrok-api/grok';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
CAP_GROUP_NAME, CAP_GROUP_SMILES, jsonSdfMonomerLibDict, MONOMER_SYMBOL,
|
|
6
|
+
RGROUP_ALTER_ID, RGROUP_FIELD, RGROUP_LABEL, SDF_MONOMER_NAME
|
|
7
|
+
} from '../const';
|
|
5
8
|
|
|
6
9
|
export const HELM_CORE_LIB_FILENAME = '/samples/HELMCoreLibrary.json';
|
|
7
10
|
export const HELM_CORE_LIB_MONOMER_SYMBOL = 'symbol';
|
|
@@ -50,7 +53,7 @@ export function createJsonMonomerLibFromSdf(table: DG.DataFrame): any {
|
|
|
50
53
|
const resultLib = [];
|
|
51
54
|
for (let i = 0; i < table.rowCount; i++) {
|
|
52
55
|
const monomer: { [key: string]: string | any } = {};
|
|
53
|
-
Object.keys(jsonSdfMonomerLibDict).forEach(key => {
|
|
56
|
+
Object.keys(jsonSdfMonomerLibDict).forEach((key) => {
|
|
54
57
|
if (key === MONOMER_SYMBOL) {
|
|
55
58
|
const monomerSymbol = table.get(jsonSdfMonomerLibDict[key], i);
|
|
56
59
|
monomer[key] = monomerSymbol === '.' ? table.get(SDF_MONOMER_NAME, i) : monomerSymbol;
|
|
@@ -59,21 +62,20 @@ export function createJsonMonomerLibFromSdf(table: DG.DataFrame): any {
|
|
|
59
62
|
const jsonRgroups: any[] = [];
|
|
60
63
|
rgroups.forEach((g: string) => {
|
|
61
64
|
const rgroup: { [key: string]: string | any } = {};
|
|
62
|
-
const altAtom = g.substring(g.lastIndexOf(
|
|
63
|
-
|
|
65
|
+
const altAtom = g.substring(g.lastIndexOf(']') + 1);
|
|
66
|
+
const radicalNum = g.match(/\[R(\d+)\]/)![1];
|
|
64
67
|
rgroup[CAP_GROUP_SMILES] = altAtom === 'H' ? `[*:${radicalNum}][H]` : `O[*:${radicalNum}]`;
|
|
65
68
|
rgroup[RGROUP_ALTER_ID] = altAtom === 'H' ? `R${radicalNum}-H` : `R${radicalNum}-OH`;
|
|
66
69
|
rgroup[CAP_GROUP_NAME] = altAtom === 'H' ? `H` : `OH`;
|
|
67
70
|
rgroup[RGROUP_LABEL] = `R${radicalNum}`;
|
|
68
71
|
jsonRgroups.push(rgroup);
|
|
69
|
-
})
|
|
72
|
+
});
|
|
70
73
|
monomer[key] = jsonRgroups;
|
|
71
74
|
} else {
|
|
72
|
-
if((jsonSdfMonomerLibDict as { [key: string]: string | any })[key])
|
|
75
|
+
if ((jsonSdfMonomerLibDict as { [key: string]: string | any })[key])
|
|
73
76
|
monomer[key] = table.get((jsonSdfMonomerLibDict as { [key: string]: string | any })[key], i);
|
|
74
|
-
}
|
|
75
77
|
}
|
|
76
|
-
})
|
|
78
|
+
});
|
|
77
79
|
resultLib.push(monomer);
|
|
78
80
|
}
|
|
79
81
|
return resultLib;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit f542cbde.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,11 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit
|
|
233
|
-
Test result : Bio.converters.testFastaGapsToSeparator : Error: Units are not specified in column
|
|
234
|
-
Test result : Bio.converters.testFastaGapsToHelm : Error: Units are not specified in column
|
|
235
|
-
Test result : Bio.converters.HelmDnaToFasta : Error: Units are not specified in column
|
|
236
|
-
Test result : Bio.converters.HelmDnaToSeparator : Error: Units are not specified in column
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Bio Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit f542cbde.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-07-20 17:49:40</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/Bio/src/__jest__/remote.test.ts</div><div class="suite-time warn">209.758s</div></div><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">failed</div><div class="test-duration">199.086s</div></div><div class="failureMessages"> <pre class="failureMsg">Error: Test result : Bio.MSA.is_correct : TypeError: Cannot read properties of undefined (reading 'split')
|
|
237
233
|
|
|
238
234
|
at /home/runner/work/public/public/packages/Bio/src/__jest__/remote.test.ts:67:20
|
|
239
235
|
at Generator.next (<anonymous>)
|
|
@@ -304,22 +300,33 @@ Test result : Bio.detectors.samplesTestHelmNegativeMolFormula : OK
|
|
|
304
300
|
Test result : Bio.detectors.samplesTestHelmNegativeSmiles : OK
|
|
305
301
|
Test result : Bio.detectors.samplesTestDemogNegativeAll : OK
|
|
306
302
|
Test result : Bio.detectors.samplesTestSmiles2NegativeSmiles : OK
|
|
303
|
+
Test result : Bio.detectors.samplesTestActivityCliffsNegativeSmiles : OK
|
|
307
304
|
Test result : Bio.detectors.samplesFastaPtPosSequence : OK
|
|
308
305
|
Test result : Bio.detectors.samplesTestCerealNegativeCerealName : OK
|
|
306
|
+
Test result : Bio.detectors.samplesTestSpgi100NegativeStereoCategory : OK
|
|
307
|
+
Test result : Bio.detectors.samplesTestSpgi100NegativeScaffoldNames : OK
|
|
308
|
+
Test result : Bio.detectors.samplesTestSpgi100NegativePrimaryScaffoldName : OK
|
|
309
|
+
Test result : Bio.detectors.samplesTestUnichemSourcesNegativeSrcUrl : OK
|
|
310
|
+
Test result : Bio.detectors.samplesTestUnichemSourcesNegativeBaseIdUrl : OK
|
|
309
311
|
Test result : Bio.MSA.test_table.is_not_empty : OK
|
|
310
312
|
Test result : Bio.sequenceSpace.sequenceSpaceOpens : OK
|
|
311
313
|
Test result : Bio.activityCliffs.activityCliffsOpen : OK
|
|
312
314
|
Test result : Bio.splitters.helm1 : OK
|
|
313
315
|
Test result : Bio.splitters.helm2 : OK
|
|
314
316
|
Test result : Bio.splitters.helm3-multichar : OK
|
|
317
|
+
Test result : Bio.splitters.testHelm1 : OK
|
|
318
|
+
Test result : Bio.splitters.testHelm2 : OK
|
|
319
|
+
Test result : Bio.splitters.testHelm3 : OK
|
|
315
320
|
Test result : Bio.renderers.afterMsa : OK
|
|
316
321
|
Test result : Bio.renderers.afterConvert : OK
|
|
317
322
|
Test result : Bio.converters.testFastaPtToSeparator : OK
|
|
318
323
|
Test result : Bio.converters.testFastaDnaToSeparator : OK
|
|
319
324
|
Test result : Bio.converters.testFastaRnaToSeparator : OK
|
|
325
|
+
Test result : Bio.converters.testFastaGapsToSeparator : OK
|
|
320
326
|
Test result : Bio.converters.testFastaPtToHelm : OK
|
|
321
327
|
Test result : Bio.converters.testFastaDnaToHelm : OK
|
|
322
328
|
Test result : Bio.converters.testFastaRnaToHelm : OK
|
|
329
|
+
Test result : Bio.converters.testFastaGapsToHelm : OK
|
|
323
330
|
Test result : Bio.converters.testSeparatorPtToFasta : OK
|
|
324
331
|
Test result : Bio.converters.testSeparatorDnaToFasta : OK
|
|
325
332
|
Test result : Bio.converters.testSeparatorRnaToFasta : OK
|
|
@@ -328,8 +335,13 @@ Test result : Bio.converters.testSeparatorPtToHelm : OK
|
|
|
328
335
|
Test result : Bio.converters.testSeparatorDnaToHelm : OK
|
|
329
336
|
Test result : Bio.converters.testSeparatorRnaToHelm : OK
|
|
330
337
|
Test result : Bio.converters.testSeparatorGapsToHelm : OK
|
|
331
|
-
Test result : Bio.converters.
|
|
332
|
-
Test result : Bio.converters.
|
|
333
|
-
Test result : Bio.converters.
|
|
334
|
-
Test result : Bio.converters.
|
|
338
|
+
Test result : Bio.converters.testHelmDnaToFasta : OK
|
|
339
|
+
Test result : Bio.converters.testHelmRnaToFasta : OK
|
|
340
|
+
Test result : Bio.converters.testHelmPtToFasta : OK
|
|
341
|
+
Test result : Bio.converters.testHelmDnaToSeparator : OK
|
|
342
|
+
Test result : Bio.converters.testHelmRnaToSeparator : OK
|
|
343
|
+
Test result : Bio.converters.testHelmPtToSeparator : OK
|
|
344
|
+
Test result : Bio.converters.testHelmLoneRibose : OK
|
|
345
|
+
Test result : Bio.converters.testHelmLoneDeoxyribose : OK
|
|
346
|
+
Test result : Bio.converters.testHelmLonePhosphorus : OK
|
|
335
347
|
</pre></div></div></div></div></body></html>
|