@datagrok/bio 2.4.39 → 2.4.40
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.40",
|
|
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",
|
|
@@ -11,7 +11,7 @@ import {_package} from '../package';
|
|
|
11
11
|
import {multipleSequenceAlginmentUIOptions} from './types';
|
|
12
12
|
import {kalignVersion, msaDefaultOptions} from './constants';
|
|
13
13
|
import '../../css/msa.css';
|
|
14
|
-
import {
|
|
14
|
+
import {ColumnInputOptions} from '@datagrok-libraries/utils/src/type-declarations';
|
|
15
15
|
export class MsaWarning extends Error {
|
|
16
16
|
constructor(message: string, options?: ErrorOptions) {
|
|
17
17
|
super(message, options);
|
|
@@ -41,7 +41,7 @@ export async function multipleSequenceAlignmentUI(
|
|
|
41
41
|
methodInput.setTooltip('Alignment method');
|
|
42
42
|
|
|
43
43
|
// UI for Kalign alignment
|
|
44
|
-
const terminalGapInput = ui.floatInput('Terminal gap', options?.kalign?.terminalGap ??
|
|
44
|
+
const terminalGapInput = ui.floatInput('Terminal gap', options?.kalign?.terminalGap ?? null);
|
|
45
45
|
terminalGapInput.setTooltip('Penalty for opening a gap at the beginning or end of the sequence');
|
|
46
46
|
const kalignVersionDiv = ui.p(`Kalign version: ${kalignVersion}`, 'kalign-version');
|
|
47
47
|
|
|
@@ -51,6 +51,13 @@ export async function multipleSequenceAlignmentUI(
|
|
|
51
51
|
const gapExtendInput = ui.floatInput('Gap extend', options.pepsea.gapExtend);
|
|
52
52
|
gapExtendInput.setTooltip('Gap extension penalty to skip the alignment');
|
|
53
53
|
|
|
54
|
+
const msaParamsDiv = ui.inputs([gapOpenInput, gapExtendInput, terminalGapInput]);
|
|
55
|
+
const msaParamsButton = ui.button('Alignment parameters', () => {
|
|
56
|
+
msaParamsDiv.hidden = !msaParamsDiv.hidden;
|
|
57
|
+
}, 'Adjust alignment parameters such as penalties for opening and extending gaps');
|
|
58
|
+
msaParamsButton.classList.add('msa-params-button');
|
|
59
|
+
msaParamsDiv.hidden = true;
|
|
60
|
+
msaParamsButton.prepend(ui.icons.settings(() => null));
|
|
54
61
|
const pepseaInputRootStyles: CSSStyleDeclaration[] = [methodInput.root.style];
|
|
55
62
|
const kalignInputRootStyles: CSSStyleDeclaration[] = [terminalGapInput.root.style, kalignVersionDiv.style];
|
|
56
63
|
|
|
@@ -84,9 +91,8 @@ export async function multipleSequenceAlignmentUI(
|
|
|
84
91
|
.add(colInput)
|
|
85
92
|
.add(clustersColInput)
|
|
86
93
|
.add(methodInput)
|
|
87
|
-
.add(
|
|
88
|
-
.add(
|
|
89
|
-
.add(terminalGapInput)
|
|
94
|
+
.add(msaParamsDiv)
|
|
95
|
+
.add(msaParamsButton)
|
|
90
96
|
.add(kalignVersionDiv)
|
|
91
97
|
.onOK(async () => { await onDialogOk(colInput, table, performAlignment, resolve, reject); })
|
|
92
98
|
.show();
|
|
@@ -142,9 +148,9 @@ async function onColInputChange(
|
|
|
142
148
|
[NOTATION.FASTA, NOTATION.SEPARATOR], [ALPHABET.DNA, ALPHABET.RNA, ALPHABET.PT], false)
|
|
143
149
|
) { // Kalign - natural alphabets. if the notation is separator, convert to fasta and then run kalign
|
|
144
150
|
switchDialog(pepseaInputRootStyles, kalignInputRootStyles, 'kalign');
|
|
145
|
-
gapOpenInput.value
|
|
146
|
-
gapExtendInput.value
|
|
147
|
-
terminalGapInput.value
|
|
151
|
+
gapOpenInput.value = null;
|
|
152
|
+
gapExtendInput.value = null;
|
|
153
|
+
terminalGapInput.value = null;
|
|
148
154
|
const potentialColNC = new NotationConverter(col);
|
|
149
155
|
const performCol: DG.Column<string> = potentialColNC.isFasta() ? col :
|
|
150
156
|
potentialColNC.convert(NOTATION.FASTA);
|
|
@@ -161,8 +167,10 @@ async function onColInputChange(
|
|
|
161
167
|
} else if (checkInputColumnUI(col, col.name, [NOTATION.SEPARATOR], [ALPHABET.UN], false)) {
|
|
162
168
|
//if the column is separator with unknown alphabet, it might be helm. check if it can be converted to helm
|
|
163
169
|
const potentialColNC = new NotationConverter(col);
|
|
164
|
-
if (!await potentialColNC.checkHelmCompatibility())
|
|
170
|
+
if (!await potentialColNC.checkHelmCompatibility()) {
|
|
171
|
+
switchDialog(pepseaInputRootStyles, kalignInputRootStyles, 'pepsea');
|
|
165
172
|
return;
|
|
173
|
+
}
|
|
166
174
|
const helmCol = potentialColNC.convert(NOTATION.HELM);
|
|
167
175
|
switchDialog(pepseaInputRootStyles, kalignInputRootStyles, 'pepsea');
|
|
168
176
|
gapOpenInput.value ??= msaDefaultOptions.pepsea.gapOpen;
|
|
@@ -172,6 +180,9 @@ async function onColInputChange(
|
|
|
172
180
|
return async () => await runPepsea(helmCol, unusedName, methodInput.value!,
|
|
173
181
|
gapOpenInput.value!, gapExtendInput.value!, clustersColInput.value);
|
|
174
182
|
} else {
|
|
183
|
+
gapOpenInput.value = null;
|
|
184
|
+
gapExtendInput.value = null;
|
|
185
|
+
terminalGapInput.value = null;
|
|
175
186
|
switchDialog(pepseaInputRootStyles, kalignInputRootStyles, 'kalign');
|
|
176
187
|
return;
|
|
177
188
|
}
|