@datagrok/bio 2.4.23 → 2.4.24
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/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.24",
|
|
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",
|
package/src/package.ts
CHANGED
|
@@ -683,6 +683,7 @@ export function bioSubstructureFilter(): BioSubstructureFilter {
|
|
|
683
683
|
//meta.demoPath: Bioinformatics | Similarity, Diversity
|
|
684
684
|
//description: Sequence similarity tracking and evaluation dataset diversity
|
|
685
685
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Similarity,%20Diversity
|
|
686
|
+
//meta.isDemoScript: True
|
|
686
687
|
export async function demoBioSimilarityDiversity(): Promise<void> {
|
|
687
688
|
await demoBio01UI();
|
|
688
689
|
}
|
|
@@ -692,6 +693,7 @@ export async function demoBioSimilarityDiversity(): Promise<void> {
|
|
|
692
693
|
//meta.demoPath: Bioinformatics | Sequence Space
|
|
693
694
|
//description: Exploring sequence space of Macromolecules, comparison with hierarchical clustering results
|
|
694
695
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Sequence%20Space
|
|
696
|
+
//meta.isDemoScript: True
|
|
695
697
|
export async function demoBioSequenceSpace(): Promise<void> {
|
|
696
698
|
await demoBio01aUI();
|
|
697
699
|
}
|
|
@@ -701,6 +703,7 @@ export async function demoBioSequenceSpace(): Promise<void> {
|
|
|
701
703
|
//meta.demoPath: Bioinformatics | Activity Cliffs
|
|
702
704
|
//description: Activity Cliffs analysis on Macromolecules data
|
|
703
705
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Activity%20Cliffs
|
|
706
|
+
//meta.isDemoScript: True
|
|
704
707
|
export async function demoBioActivityCliffs(): Promise<void> {
|
|
705
708
|
await demoBio01bUI();
|
|
706
709
|
}
|
|
@@ -710,6 +713,7 @@ export async function demoBioActivityCliffs(): Promise<void> {
|
|
|
710
713
|
//meta.demoPath: Bioinformatics | Atomic Level
|
|
711
714
|
//description: Atomic level structure of Macromolecules
|
|
712
715
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Atomic%20Level
|
|
716
|
+
//meta.isDemoScript: True
|
|
713
717
|
export async function demoBioAtomicLevel(): Promise<void> {
|
|
714
718
|
await demoBio03UI();
|
|
715
719
|
}
|
|
@@ -719,6 +723,7 @@ export async function demoBioAtomicLevel(): Promise<void> {
|
|
|
719
723
|
//meta.demoPath: Bioinformatics | Helm, MSA, Sequence Space
|
|
720
724
|
//description: MSA and composition analysis on Helm data
|
|
721
725
|
//meta.path: /apps/Tutorials/Demo/Bioinformatics/Helm,%20MSA,%20Sequence%20Space
|
|
726
|
+
//meta.isDemoScript: True
|
|
722
727
|
export async function demoBioHelmMsaSequenceSpace(): Promise<void> {
|
|
723
728
|
await demoBio05UI();
|
|
724
729
|
}
|
|
@@ -44,8 +44,8 @@ export async function multipleSequenceAlignmentUI(options: multipleSequenceAlgin
|
|
|
44
44
|
let performAlignment: (() => Promise<DG.Column<string>>) | undefined;
|
|
45
45
|
|
|
46
46
|
// TODO: allow only macromolecule colums to be chosen
|
|
47
|
-
const colInput = ui.columnInput('Sequence', table, seqCol, () => {
|
|
48
|
-
performAlignment = onColInputChange(
|
|
47
|
+
const colInput = ui.columnInput('Sequence', table, seqCol, async () => {
|
|
48
|
+
performAlignment = await onColInputChange(
|
|
49
49
|
colInput.value, table, inputRootStyles, methodInput, clustersColInput, gapOpenInput, gapExtendInput);
|
|
50
50
|
}
|
|
51
51
|
) as DG.InputBase<DG.Column<string>>;
|
|
@@ -55,7 +55,7 @@ export async function multipleSequenceAlignmentUI(options: multipleSequenceAlgin
|
|
|
55
55
|
colInput.fireChanged();
|
|
56
56
|
//if column is specified (from tests), run alignment and resolve with the result
|
|
57
57
|
if (options.col) {
|
|
58
|
-
performAlignment = onColInputChange(
|
|
58
|
+
performAlignment = await onColInputChange(
|
|
59
59
|
options.col, table, inputRootStyles, methodInput, clustersColInput, gapOpenInput, gapExtendInput);
|
|
60
60
|
|
|
61
61
|
await onDialogOk(colInput, table, performAlignment, resolve, reject);
|
|
@@ -105,7 +105,7 @@ async function onDialogOk(
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
function onColInputChange(
|
|
108
|
+
async function onColInputChange(
|
|
109
109
|
col: DG.Column<string>,
|
|
110
110
|
table: DG.DataFrame,
|
|
111
111
|
inputRootStyles: CSSStyleDeclaration[],
|
|
@@ -113,7 +113,7 @@ function onColInputChange(
|
|
|
113
113
|
clustersColInput: DG.InputBase<DG.Column<any> | null>,
|
|
114
114
|
gapOpenInput: DG.InputBase<number | null>,
|
|
115
115
|
gapExtendInput: DG.InputBase<number | null>
|
|
116
|
-
): (() => Promise<DG.Column<string>>) | undefined {
|
|
116
|
+
): Promise<(() => Promise<DG.Column<string>>) | undefined> {
|
|
117
117
|
try {
|
|
118
118
|
if (col.semType !== DG.SEMTYPE.MACROMOLECULE)
|
|
119
119
|
return;
|
|
@@ -136,6 +136,19 @@ function onColInputChange(
|
|
|
136
136
|
|
|
137
137
|
return async () => await runPepsea(col, unusedName, methodInput.value!,
|
|
138
138
|
gapOpenInput.value!, gapExtendInput.value!, clustersColInput.value);
|
|
139
|
+
} else if (checkInputColumnUI(col, col.name, [NOTATION.SEPARATOR], [ALPHABET.UN], false)) {
|
|
140
|
+
//if the column is separator with unknown alphabet, it might be helm. check if it can be converted to helm
|
|
141
|
+
const potentialColNC = new NotationConverter(col);
|
|
142
|
+
if (!await potentialColNC.checkHelmCompatibility())
|
|
143
|
+
return;
|
|
144
|
+
const helmCol = potentialColNC.convert(NOTATION.HELM);
|
|
145
|
+
for (const inputRootStyle of inputRootStyles)
|
|
146
|
+
inputRootStyle.removeProperty('display');
|
|
147
|
+
console.log(helmCol.toList());
|
|
148
|
+
// convert to helm and assign alignment function to PepSea
|
|
149
|
+
|
|
150
|
+
return async () => await runPepsea(helmCol, unusedName, methodInput.value!,
|
|
151
|
+
gapOpenInput.value!, gapExtendInput.value!, clustersColInput.value);
|
|
139
152
|
} else {
|
|
140
153
|
for (const inputRootStyle of inputRootStyles)
|
|
141
154
|
inputRootStyle.display = 'none';
|