@datagrok/bio 2.0.7 → 2.0.9
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 +3 -7
- package/dist/package-test.js +68 -45
- package/dist/package.js +42 -35
- package/files/{samples → data}/HELMCoreLibrary.json +0 -0
- package/files/{samples → data}/sample_FASTA.fasta +0 -0
- package/files/{samples → data}/sample_FASTA_DNA.csv +0 -0
- package/files/{samples → data}/sample_FASTA_PT.csv +0 -0
- package/files/{samples → data}/sample_FASTA_RNA.csv +0 -0
- package/files/{samples → data}/sample_HELM_empty_vals.csv +0 -0
- package/files/{samples → data}/sample_SEPARATOR_PT.csv +0 -0
- package/package.json +2 -2
- package/src/calculations/monomerLevelMols.ts +0 -1
- package/src/package.ts +4 -2
- package/src/tests/Palettes-test.ts +22 -3
- package/src/tests/WebLogo-positions-test.ts +3 -4
- package/src/tests/detectors-test.ts +2 -2
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Leonid Stolbov",
|
|
6
6
|
"email": "lstolbov@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.0.
|
|
8
|
+
"version": "2.0.9",
|
|
9
9
|
"description": "Bio is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@biowasm/aioli": ">=2.4.0",
|
|
17
|
-
"@datagrok-libraries/bio": "^4.
|
|
17
|
+
"@datagrok-libraries/bio": "^4.4.0",
|
|
18
18
|
"@datagrok-libraries/chem-meta": "1.0.0",
|
|
19
19
|
"@datagrok-libraries/ml": "^6.2.0",
|
|
20
20
|
"@datagrok-libraries/utils": "^1.6.2",
|
package/src/package.ts
CHANGED
|
@@ -315,9 +315,11 @@ export async function compositionAnalysis(): Promise<void> {
|
|
|
315
315
|
return;
|
|
316
316
|
} else if (colList.length > 1) {
|
|
317
317
|
const colListNames: string [] = colList.map((col) => col.name);
|
|
318
|
-
const
|
|
318
|
+
const selectedCol = colList.find((c) => { return (new UnitsHandler(c)).isMsa(); });
|
|
319
|
+
const colInput: DG.InputBase = ui.choiceInput(
|
|
320
|
+
'Column', selectedCol ? selectedCol.name : colListNames[0], colListNames);
|
|
319
321
|
ui.dialog({
|
|
320
|
-
title: '
|
|
322
|
+
title: 'Composition Analysis',
|
|
321
323
|
helpUrl: '/help/domains/bio/macromolecules.md#composition-analysis'
|
|
322
324
|
})
|
|
323
325
|
.add(ui.div([
|
|
@@ -1,12 +1,31 @@
|
|
|
1
|
-
import {after, before, category, test, expect, expectObject} from '@datagrok-libraries/utils/src/test';
|
|
2
|
-
|
|
3
1
|
import * as grok from 'datagrok-api/grok';
|
|
4
2
|
import * as ui from 'datagrok-api/ui';
|
|
5
3
|
import * as DG from 'datagrok-api/dg';
|
|
6
4
|
|
|
7
|
-
import {
|
|
5
|
+
import {after, before, category, test, expect, expectObject} from '@datagrok-libraries/utils/src/test';
|
|
6
|
+
|
|
7
|
+
import {_testPaletteN, _testPaletteAA} from '@datagrok-libraries/bio/src/tests/palettes-tests';
|
|
8
|
+
import {ALPHABET, UnitsHandler} from '@datagrok-libraries/bio/src/utils/units-handler';
|
|
9
|
+
import {AminoacidsPalettes} from '@datagrok-libraries/bio/src/aminoacids';
|
|
8
10
|
|
|
9
11
|
category('Palettes', () => {
|
|
10
12
|
test('testPaletteN', async () => { await _testPaletteN(); });
|
|
11
13
|
test('testPaletteAA', async () => { await _testPaletteAA(); });
|
|
14
|
+
|
|
15
|
+
test('testPalettePtMe', async () => {
|
|
16
|
+
const colorMeNle = AminoacidsPalettes.GrokGroups.get('MeNle');
|
|
17
|
+
const colorMeA = AminoacidsPalettes.GrokGroups.get('MeA');
|
|
18
|
+
const colorMeG = AminoacidsPalettes.GrokGroups.get('MeG');
|
|
19
|
+
const colorMeF = AminoacidsPalettes.GrokGroups.get('MeF');
|
|
20
|
+
|
|
21
|
+
const colorL = AminoacidsPalettes.GrokGroups.get('L');
|
|
22
|
+
const colorA = AminoacidsPalettes.GrokGroups.get('A');
|
|
23
|
+
const colorG = AminoacidsPalettes.GrokGroups.get('G');
|
|
24
|
+
const colorF = AminoacidsPalettes.GrokGroups.get('F');
|
|
25
|
+
|
|
26
|
+
expect(colorMeNle, colorL);
|
|
27
|
+
expect(colorMeA, colorA);
|
|
28
|
+
expect(colorMeG, colorG);
|
|
29
|
+
expect(colorMeF, colorF);
|
|
30
|
+
});
|
|
12
31
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {after, before, category, test, expect, expectObject} from '@datagrok-libraries/utils/src/test';
|
|
1
|
+
import {after, before, category, test, expect, expectObject, delay} from '@datagrok-libraries/utils/src/test';
|
|
2
2
|
|
|
3
3
|
import * as grok from 'datagrok-api/grok';
|
|
4
4
|
import * as ui from 'datagrok-api/ui';
|
|
@@ -31,6 +31,7 @@ ATC-G-TTGC--
|
|
|
31
31
|
tvList.forEach((tv: DG.TableView) => tv.close());
|
|
32
32
|
currentView = grok.shell.tv;
|
|
33
33
|
});
|
|
34
|
+
|
|
34
35
|
test('allPositions', async () => {
|
|
35
36
|
const df: DG.DataFrame = DG.DataFrame.fromCsv(csvDf1);
|
|
36
37
|
const tv: DG.TableView = grok.shell.addTableView(df);
|
|
@@ -71,8 +72,8 @@ ATC-G-TTGC--
|
|
|
71
72
|
expect(positions[i].freq[key].count, resAllDf1[i].freq[key].count);
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
|
|
75
75
|
});
|
|
76
|
+
|
|
76
77
|
test('positions with shrinkEmptyTail option true (filterd)', async () => {
|
|
77
78
|
let csvDf2 = `seq
|
|
78
79
|
-TC-G-TTGC--
|
|
@@ -122,7 +123,6 @@ ATC-G-TTGC--
|
|
|
122
123
|
expect(positions[i].freq[key].count, resAllDf1[i].freq[key].count);
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
test('positions with skipEmptyPositions option', async () => {
|
|
@@ -163,5 +163,4 @@ ATC-G-TTGC--
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
|
-
|
|
167
166
|
});
|
|
@@ -131,8 +131,8 @@ MWRSWY-CKHP
|
|
|
131
131
|
|
|
132
132
|
const samples: { [key: string]: string } = {
|
|
133
133
|
'fastaCsv': 'System:AppData/Bio/samples/sample_FASTA.csv',
|
|
134
|
-
'fastaFasta': 'System:AppData/Bio/
|
|
135
|
-
'fastaPtCsv': 'System:AppData/Bio/
|
|
134
|
+
'fastaFasta': 'System:AppData/Bio/data/sample_FASTA.fasta',
|
|
135
|
+
'fastaPtCsv': 'System:AppData/Bio/data/sample_FASTA_PT.csv',
|
|
136
136
|
'msaComplex': 'System:AppData/Bio/samples/sample_MSA.csv',
|
|
137
137
|
'helmCsv': 'System:AppData/Bio/samples/sample_HELM.csv',
|
|
138
138
|
'peptidesComplex': 'System:AppData/Bio/tests/peptides_complex_msa.csv',
|