@datagrok/bio 2.4.25 → 2.4.26
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 +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/scripts/sequence_generator.py +2 -2
- package/src/demo/bio03-atomic-level.ts +6 -5
- package/src/demo/bio05-helm-msa-sequence-space.ts +1 -0
- package/src/package.ts +11 -10
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Leonid Stolbov",
|
|
6
6
|
"email": "lstolbov@datagrok.ai"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.4.
|
|
8
|
+
"version": "2.4.26",
|
|
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",
|
|
@@ -151,8 +151,8 @@ def generate_sequences(
|
|
|
151
151
|
motif_length = mean_range(average_motif_length, dispersion)
|
|
152
152
|
|
|
153
153
|
# sys.stderr.write(f"Cluster {n_cluster:2} motif template: {motif_notation(motif_template)}\n")
|
|
154
|
-
total_length = mean_range(average_random_length * 2,
|
|
155
|
-
prefix_length = mean_range(average_random_length,
|
|
154
|
+
total_length = mean_range(average_random_length * 2, dispersion) + motif_length
|
|
155
|
+
prefix_length = mean_range(average_random_length, dispersion // 2)
|
|
156
156
|
suffix_length = total_length - motif_length - prefix_length
|
|
157
157
|
sys.stderr.write(f"Generating sequences for cluster {n_cluster}\n")
|
|
158
158
|
for n_seq, seq, activity, is_cliff in generate_cluster(
|
|
@@ -9,9 +9,10 @@ import {handleError} from './utils';
|
|
|
9
9
|
import {DemoScript} from '@datagrok-libraries/tutorials/src/demo-script';
|
|
10
10
|
import {delay} from '@datagrok-libraries/utils/src/test';
|
|
11
11
|
|
|
12
|
-
const dataFn: string = 'samples/sample_FASTA.csv';
|
|
13
|
-
|
|
14
12
|
export async function demoBio03UI(): Promise<void> {
|
|
13
|
+
const dataFn: string = 'samples/sample_HELM.csv';
|
|
14
|
+
const seqColName = 'HELM';
|
|
15
|
+
|
|
15
16
|
let df: DG.DataFrame;
|
|
16
17
|
let view: DG.TableView;
|
|
17
18
|
let dlg: DG.Dialog;
|
|
@@ -29,21 +30,21 @@ export async function demoBio03UI(): Promise<void> {
|
|
|
29
30
|
view = grok.shell.addTableView(df);
|
|
30
31
|
for (let colI: number = 0; colI < view.grid.columns.length; colI++) {
|
|
31
32
|
const gCol: DG.GridColumn = view.grid.columns.byIndex(colI)!;
|
|
32
|
-
if (!([
|
|
33
|
+
if (!([seqColName, 'Activity'].includes(gCol.name))) gCol.visible = false;
|
|
33
34
|
}
|
|
34
35
|
}, {
|
|
35
36
|
description: `Load dataset with macromolecules of 'fasta' notation, 'PT' alphabet (protein, aminoacids).`,
|
|
36
37
|
delay: 2000,
|
|
37
38
|
})
|
|
38
39
|
.step('To atomic level', async () => {
|
|
39
|
-
const seqCol = df.getCol(
|
|
40
|
+
const seqCol = df.getCol(seqColName);
|
|
40
41
|
await toAtomicLevel(df, seqCol);
|
|
41
42
|
}, {
|
|
42
43
|
description: 'Get atomic level structures of Macromolecules.',
|
|
43
44
|
delay: 2000,
|
|
44
45
|
})
|
|
45
46
|
.step('Sketcher', async () => {
|
|
46
|
-
const molColName: string =
|
|
47
|
+
const molColName: string = `molfile(${seqColName})`;
|
|
47
48
|
df.currentCell = df.cell(1, molColName);
|
|
48
49
|
const mol: string = df.currentCell.value;
|
|
49
50
|
|
|
@@ -61,6 +61,7 @@ export async function demoBio05UI(): Promise<void> {
|
|
|
61
61
|
.step('Analyse sequence composition', async () => {
|
|
62
62
|
wlViewer = await df.plot.fromType('WebLogo', {
|
|
63
63
|
sequenceColumnName: msaHelmColName,
|
|
64
|
+
positionWidth: 40,
|
|
64
65
|
maxHeight: 50,
|
|
65
66
|
}) as DG.Viewer & IWebLogoViewer;
|
|
66
67
|
view.dockManager.dock(wlViewer, DG.DOCK_TYPE.DOWN, null, 'Composition analysis', 0.2);
|
package/src/package.ts
CHANGED
|
@@ -506,16 +506,17 @@ export async function sdfToJsonLib(table: DG.DataFrame) {
|
|
|
506
506
|
const jsonMonomerLibrary = createJsonMonomerLibFromSdf(table);
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
-
//
|
|
510
|
-
//
|
|
511
|
-
//
|
|
512
|
-
//
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
509
|
+
// 2023-05-17 Representations does not work at BioIT
|
|
510
|
+
// //name: Representations
|
|
511
|
+
// //tags: panel, widgets
|
|
512
|
+
// //input: cell macroMolecule {semType: Macromolecule}
|
|
513
|
+
// //output: widget result
|
|
514
|
+
// export async function peptideMolecule(macroMolecule: DG.Cell): Promise<DG.Widget> {
|
|
515
|
+
// const monomersLibFile = await _package.files.readAsText(HELM_CORE_LIB_FILENAME);
|
|
516
|
+
// const monomersLibObject: any[] = JSON.parse(monomersLibFile);
|
|
517
|
+
//
|
|
518
|
+
// return representationsWidget(macroMolecule, monomersLibObject);
|
|
519
|
+
// }
|
|
519
520
|
|
|
520
521
|
//name: importFasta
|
|
521
522
|
//description: Opens FASTA file
|