@platforma-sdk/ui-vue 1.45.34 → 1.45.36
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/.turbo/turbo-build.log +216 -222
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/AgGridVue/useAgGridOptions.js +2 -3
- package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
- package/dist/components/{PlMultiSequenceAlignment/Legend.vue.d.ts → PlAdvancedFilter/OperandButton.vue.d.ts} +4 -2
- package/dist/components/{PlMultiSequenceAlignment/Toolbar.vue.js → PlAdvancedFilter/OperandButton.vue.js} +3 -3
- package/dist/components/PlAdvancedFilter/OperandButton.vue.js.map +1 -0
- package/dist/components/PlAdvancedFilter/OperandButton.vue2.js +25 -0
- package/dist/components/PlAdvancedFilter/OperandButton.vue2.js.map +1 -0
- package/dist/components/PlAdvancedFilter/OperandButton.vue3.js +13 -0
- package/dist/components/PlAdvancedFilter/OperandButton.vue3.js.map +1 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue.d.ts +39 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue.js +10 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue.js.map +1 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js +199 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js.map +1 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue3.js +17 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue3.js.map +1 -0
- package/dist/components/PlAdvancedFilter/SingleFilter.vue.d.ts +37 -0
- package/dist/components/{PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.js → PlAdvancedFilter/SingleFilter.vue.js} +3 -3
- package/dist/components/PlAdvancedFilter/SingleFilter.vue.js.map +1 -0
- package/dist/components/PlAdvancedFilter/SingleFilter.vue2.js +306 -0
- package/dist/components/PlAdvancedFilter/SingleFilter.vue2.js.map +1 -0
- package/dist/components/PlAdvancedFilter/SingleFilter.vue3.js +35 -0
- package/dist/components/PlAdvancedFilter/SingleFilter.vue3.js.map +1 -0
- package/dist/components/PlAdvancedFilter/constants.d.ts +4 -0
- package/dist/components/PlAdvancedFilter/constants.js +41 -0
- package/dist/components/PlAdvancedFilter/constants.js.map +1 -0
- package/dist/components/PlAdvancedFilter/index.d.ts +1 -0
- package/dist/components/PlAdvancedFilter/types.d.ts +57 -0
- package/dist/components/PlAdvancedFilter/types.js +8 -0
- package/dist/components/PlAdvancedFilter/types.js.map +1 -0
- package/dist/components/PlAdvancedFilter/utils.js +150 -0
- package/dist/components/PlAdvancedFilter/utils.js.map +1 -0
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +7 -8
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +9 -10
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
- package/dist/components/PlAgRowNumHeader.vue.js +2 -3
- package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
- package/dist/index.js +32 -32
- package/dist/lib.d.ts +1 -1
- package/package.json +6 -7
- package/src/components/PlAdvancedFilter/OperandButton.vue +53 -0
- package/src/components/PlAdvancedFilter/PlAdvancedFilter.vue +209 -0
- package/src/components/PlAdvancedFilter/SingleFilter.vue +425 -0
- package/src/components/PlAdvancedFilter/constants.ts +42 -0
- package/src/components/PlAdvancedFilter/index.ts +1 -0
- package/src/components/PlAdvancedFilter/types.ts +77 -0
- package/src/components/PlAdvancedFilter/utils.ts +215 -0
- package/src/lib.ts +2 -2
- package/dist/assets/multi-sequence-alignment.worker-Cm0gZp19.js +0 -6
- package/dist/assets/multi-sequence-alignment.worker-Cm0gZp19.js.map +0 -1
- package/dist/assets/phylogenetic-tree.worker-4CrExYEo.js +0 -5
- package/dist/assets/phylogenetic-tree.worker-4CrExYEo.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue.d.ts +0 -9
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue.js +0 -10
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue2.js +0 -122
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue3.js +0 -9
- package/dist/components/PlMultiSequenceAlignment/Consensus.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Legend.vue.js +0 -10
- package/dist/components/PlMultiSequenceAlignment/Legend.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Legend.vue2.js +0 -28
- package/dist/components/PlMultiSequenceAlignment/Legend.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Legend.vue3.js +0 -13
- package/dist/components/PlMultiSequenceAlignment/Legend.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue.d.ts +0 -25
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue.js +0 -10
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue2.js +0 -138
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue3.js +0 -31
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue.d.ts +0 -8
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue.js +0 -10
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue2.js +0 -77
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue3.js +0 -9
- package/dist/components/PlMultiSequenceAlignment/PhylogeneticTree.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.d.ts +0 -71
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue2.js +0 -224
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue3.js +0 -9
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue.d.ts +0 -8
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue.js +0 -10
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue2.js +0 -127
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue3.js +0 -9
- package/dist/components/PlMultiSequenceAlignment/SeqLogo.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Toolbar.vue.d.ts +0 -16
- package/dist/components/PlMultiSequenceAlignment/Toolbar.vue.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Toolbar.vue2.js +0 -228
- package/dist/components/PlMultiSequenceAlignment/Toolbar.vue2.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/Toolbar.vue3.js +0 -19
- package/dist/components/PlMultiSequenceAlignment/Toolbar.vue3.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/cell-size.d.ts +0 -4
- package/dist/components/PlMultiSequenceAlignment/cell-size.js +0 -8
- package/dist/components/PlMultiSequenceAlignment/cell-size.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/chemical-properties.d.ts +0 -44
- package/dist/components/PlMultiSequenceAlignment/chemical-properties.js +0 -132
- package/dist/components/PlMultiSequenceAlignment/chemical-properties.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/data.d.ts +0 -61
- package/dist/components/PlMultiSequenceAlignment/data.js +0 -370
- package/dist/components/PlMultiSequenceAlignment/data.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/index.d.ts +0 -1
- package/dist/components/PlMultiSequenceAlignment/markup.d.ts +0 -16
- package/dist/components/PlMultiSequenceAlignment/markup.js +0 -84
- package/dist/components/PlMultiSequenceAlignment/markup.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/migrations.d.ts +0 -3
- package/dist/components/PlMultiSequenceAlignment/migrations.js +0 -24
- package/dist/components/PlMultiSequenceAlignment/migrations.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/multi-sequence-alignment.worker.d.ts +0 -6
- package/dist/components/PlMultiSequenceAlignment/phylogenetic-tree.worker.d.ts +0 -7
- package/dist/components/PlMultiSequenceAlignment/residue-counts.d.ts +0 -2
- package/dist/components/PlMultiSequenceAlignment/residue-counts.js +0 -13
- package/dist/components/PlMultiSequenceAlignment/residue-counts.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/settings.d.ts +0 -2
- package/dist/components/PlMultiSequenceAlignment/settings.js +0 -9
- package/dist/components/PlMultiSequenceAlignment/settings.js.map +0 -1
- package/dist/components/PlMultiSequenceAlignment/types.d.ts +0 -5
- package/dist/components/PlMultiSequenceAlignment/useMiPlots.d.ts +0 -4
- package/dist/components/PlMultiSequenceAlignment/useMiPlots.js +0 -19
- package/dist/components/PlMultiSequenceAlignment/useMiPlots.js.map +0 -1
- package/src/components/PlMultiSequenceAlignment/Consensus.vue +0 -165
- package/src/components/PlMultiSequenceAlignment/Legend.vue +0 -44
- package/src/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue +0 -299
- package/src/components/PlMultiSequenceAlignment/PhylogeneticTree.vue +0 -110
- package/src/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue +0 -314
- package/src/components/PlMultiSequenceAlignment/README.md +0 -216
- package/src/components/PlMultiSequenceAlignment/SeqLogo.vue +0 -166
- package/src/components/PlMultiSequenceAlignment/Toolbar.vue +0 -228
- package/src/components/PlMultiSequenceAlignment/cell-size.ts +0 -4
- package/src/components/PlMultiSequenceAlignment/chemical-properties.ts +0 -199
- package/src/components/PlMultiSequenceAlignment/data.ts +0 -661
- package/src/components/PlMultiSequenceAlignment/index.ts +0 -1
- package/src/components/PlMultiSequenceAlignment/markup.ts +0 -141
- package/src/components/PlMultiSequenceAlignment/migrations.ts +0 -46
- package/src/components/PlMultiSequenceAlignment/multi-sequence-alignment.worker.ts +0 -54
- package/src/components/PlMultiSequenceAlignment/phylogenetic-tree.worker.ts +0 -89
- package/src/components/PlMultiSequenceAlignment/residue-counts.ts +0 -124
- package/src/components/PlMultiSequenceAlignment/settings.ts +0 -7
- package/src/components/PlMultiSequenceAlignment/types.ts +0 -3
- package/src/components/PlMultiSequenceAlignment/useMiPlots.ts +0 -23
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, useCssModule as K, ref as S, watchEffect as L, computed as x, createElementBlock as w, openBlock as P, Fragment as M, createElementVNode as r, createVNode as o, normalizeClass as m, unref as t, withModifiers as k, withCtx as s, createTextVNode as a, createCommentVNode as U, createBlock as T, withKeys as C } from "vue";
|
|
2
|
-
import { isJsonEqual as q } from "../../lib/util/helpers/dist/objects.js";
|
|
3
|
-
import { PlDropdownMulti as $, PlDropdown as D, PlBtnGhost as V, PlCheckbox as g, PlSlideModal as G, PlNumberField as b, PlBtnPrimary as A, PlBtnSecondary as F } from "@milaboratories/uikit";
|
|
4
|
-
import { defaultSettings as R } from "./settings.js";
|
|
5
|
-
const H = /* @__PURE__ */ I({
|
|
6
|
-
__name: "Toolbar",
|
|
7
|
-
props: {
|
|
8
|
-
settings: {},
|
|
9
|
-
sequenceColumnOptions: {},
|
|
10
|
-
labelColumnOptions: {},
|
|
11
|
-
colorSchemeOptions: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["updateSettings", "export"],
|
|
14
|
-
setup(B, { emit: O }) {
|
|
15
|
-
const n = B, y = O, u = K(), f = S(!1);
|
|
16
|
-
function d(p, e) {
|
|
17
|
-
y("updateSettings", { [p]: e });
|
|
18
|
-
}
|
|
19
|
-
function v(p, e) {
|
|
20
|
-
d(
|
|
21
|
-
"widgets",
|
|
22
|
-
e ? [...n.settings.widgets, p] : n.settings.widgets.filter((l) => p !== l)
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
const i = S({ ...n.settings.alignmentParams });
|
|
26
|
-
L(() => {
|
|
27
|
-
i.value = { ...n.settings.alignmentParams };
|
|
28
|
-
});
|
|
29
|
-
const N = x(
|
|
30
|
-
() => !q(n.settings.alignmentParams, i.value)
|
|
31
|
-
), E = x(
|
|
32
|
-
() => !q(n.settings.alignmentParams, R.alignmentParams)
|
|
33
|
-
);
|
|
34
|
-
return (p, e) => (P(), w(M, null, [
|
|
35
|
-
r("div", {
|
|
36
|
-
class: m(t(u).container)
|
|
37
|
-
}, [
|
|
38
|
-
r("div", {
|
|
39
|
-
class: m(t(u).line)
|
|
40
|
-
}, [
|
|
41
|
-
r("div", {
|
|
42
|
-
class: m(t(u).section)
|
|
43
|
-
}, [
|
|
44
|
-
o(t($), {
|
|
45
|
-
label: "Sequence Columns",
|
|
46
|
-
"model-value": n.settings.sequenceColumnIds ?? [],
|
|
47
|
-
options: n.sequenceColumnOptions,
|
|
48
|
-
clearable: "",
|
|
49
|
-
"onUpdate:modelValue": e[0] || (e[0] = (l) => d("sequenceColumnIds", l))
|
|
50
|
-
}, null, 8, ["model-value", "options"]),
|
|
51
|
-
o(t($), {
|
|
52
|
-
"model-value": n.settings.labelColumnIds ?? [],
|
|
53
|
-
label: "Label Columns",
|
|
54
|
-
options: n.labelColumnOptions,
|
|
55
|
-
clearable: "",
|
|
56
|
-
"onUpdate:modelValue": e[1] || (e[1] = (l) => d("labelColumnIds", l))
|
|
57
|
-
}, null, 8, ["model-value", "options"]),
|
|
58
|
-
o(t(D), {
|
|
59
|
-
"model-value": n.settings.colorScheme,
|
|
60
|
-
label: "Color Scheme",
|
|
61
|
-
options: n.colorSchemeOptions,
|
|
62
|
-
"onUpdate:modelValue": e[2] || (e[2] = (l) => d("colorScheme", l))
|
|
63
|
-
}, null, 8, ["model-value", "options"])
|
|
64
|
-
], 2),
|
|
65
|
-
r("div", {
|
|
66
|
-
class: m(t(u).buttons)
|
|
67
|
-
}, [
|
|
68
|
-
o(t(V), {
|
|
69
|
-
icon: "settings",
|
|
70
|
-
onClick: e[3] || (e[3] = k((l) => f.value = !0, ["stop"]))
|
|
71
|
-
}, {
|
|
72
|
-
default: s(() => e[19] || (e[19] = [
|
|
73
|
-
a(" Settings ")
|
|
74
|
-
])),
|
|
75
|
-
_: 1
|
|
76
|
-
}),
|
|
77
|
-
o(t(V), {
|
|
78
|
-
icon: "export",
|
|
79
|
-
onClick: e[4] || (e[4] = k((l) => y("export"), ["stop"]))
|
|
80
|
-
}, {
|
|
81
|
-
default: s(() => e[20] || (e[20] = [
|
|
82
|
-
a(" Export ")
|
|
83
|
-
])),
|
|
84
|
-
_: 1
|
|
85
|
-
})
|
|
86
|
-
], 2)
|
|
87
|
-
], 2),
|
|
88
|
-
r("div", {
|
|
89
|
-
class: m(t(u).line)
|
|
90
|
-
}, [
|
|
91
|
-
r("div", {
|
|
92
|
-
class: m(t(u).section)
|
|
93
|
-
}, [
|
|
94
|
-
o(t(g), {
|
|
95
|
-
"model-value": n.settings.widgets.includes("seqLogo"),
|
|
96
|
-
"onUpdate:modelValue": e[5] || (e[5] = (l) => v("seqLogo", l))
|
|
97
|
-
}, {
|
|
98
|
-
default: s(() => e[21] || (e[21] = [
|
|
99
|
-
a(" Seq logo ")
|
|
100
|
-
])),
|
|
101
|
-
_: 1
|
|
102
|
-
}, 8, ["model-value"]),
|
|
103
|
-
o(t(g), {
|
|
104
|
-
"model-value": n.settings.widgets.includes("consensus"),
|
|
105
|
-
"onUpdate:modelValue": e[6] || (e[6] = (l) => v("consensus", l))
|
|
106
|
-
}, {
|
|
107
|
-
default: s(() => e[22] || (e[22] = [
|
|
108
|
-
a(" Consensus ")
|
|
109
|
-
])),
|
|
110
|
-
_: 1
|
|
111
|
-
}, 8, ["model-value"]),
|
|
112
|
-
o(t(g), {
|
|
113
|
-
"model-value": !1,
|
|
114
|
-
disabled: ""
|
|
115
|
-
}, {
|
|
116
|
-
default: s(() => e[23] || (e[23] = [
|
|
117
|
-
a("Navigator")
|
|
118
|
-
])),
|
|
119
|
-
_: 1
|
|
120
|
-
}),
|
|
121
|
-
o(t(g), {
|
|
122
|
-
"model-value": n.settings.widgets.includes("tree"),
|
|
123
|
-
"onUpdate:modelValue": e[7] || (e[7] = (l) => v("tree", l))
|
|
124
|
-
}, {
|
|
125
|
-
default: s(() => e[24] || (e[24] = [
|
|
126
|
-
a(" Tree ")
|
|
127
|
-
])),
|
|
128
|
-
_: 1
|
|
129
|
-
}, 8, ["model-value"]),
|
|
130
|
-
o(t(g), {
|
|
131
|
-
"model-value": n.settings.widgets.includes("legend"),
|
|
132
|
-
disabled: n.settings.colorScheme.type === "no-color",
|
|
133
|
-
"onUpdate:modelValue": e[8] || (e[8] = (l) => v("legend", l))
|
|
134
|
-
}, {
|
|
135
|
-
default: s(() => e[25] || (e[25] = [
|
|
136
|
-
a(" Legend ")
|
|
137
|
-
])),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["model-value", "disabled"])
|
|
140
|
-
], 2)
|
|
141
|
-
], 2)
|
|
142
|
-
], 2),
|
|
143
|
-
o(t(G), {
|
|
144
|
-
modelValue: f.value,
|
|
145
|
-
"onUpdate:modelValue": e[18] || (e[18] = (l) => f.value = l)
|
|
146
|
-
}, {
|
|
147
|
-
title: s(() => e[26] || (e[26] = [
|
|
148
|
-
a("Settings")
|
|
149
|
-
])),
|
|
150
|
-
default: s(() => [
|
|
151
|
-
o(t(b), {
|
|
152
|
-
modelValue: i.value.gpo,
|
|
153
|
-
"onUpdate:modelValue": e[9] || (e[9] = (l) => i.value.gpo = l),
|
|
154
|
-
label: "Gap open penalty",
|
|
155
|
-
step: 0.1,
|
|
156
|
-
onKeyup: e[10] || (e[10] = C((l) => d("alignmentParams", i.value), ["enter"]))
|
|
157
|
-
}, {
|
|
158
|
-
tooltip: s(() => e[27] || (e[27] = [
|
|
159
|
-
a(" Penalty score assigned to the introduction of a gap in the alignment ")
|
|
160
|
-
])),
|
|
161
|
-
_: 1
|
|
162
|
-
}, 8, ["modelValue"]),
|
|
163
|
-
o(t(b), {
|
|
164
|
-
modelValue: i.value.gpe,
|
|
165
|
-
"onUpdate:modelValue": e[11] || (e[11] = (l) => i.value.gpe = l),
|
|
166
|
-
label: "Gap extension penalty",
|
|
167
|
-
step: 0.1,
|
|
168
|
-
onKeyup: e[12] || (e[12] = C((l) => d("alignmentParams", i.value), ["enter"]))
|
|
169
|
-
}, {
|
|
170
|
-
tooltip: s(() => e[28] || (e[28] = [
|
|
171
|
-
a(" Penalty score assigned to each additional residue added to an existing gap ")
|
|
172
|
-
])),
|
|
173
|
-
_: 1
|
|
174
|
-
}, 8, ["modelValue"]),
|
|
175
|
-
o(t(b), {
|
|
176
|
-
modelValue: i.value.tgpe,
|
|
177
|
-
"onUpdate:modelValue": e[13] || (e[13] = (l) => i.value.tgpe = l),
|
|
178
|
-
label: "Terminal gap extension penalty",
|
|
179
|
-
step: 0.1,
|
|
180
|
-
onKeyup: e[14] || (e[14] = C((l) => d("alignmentParams", i.value), ["enter"]))
|
|
181
|
-
}, {
|
|
182
|
-
tooltip: s(() => e[29] || (e[29] = [
|
|
183
|
-
a(" Penalty score assigned to extending gaps at the ends of sequences ")
|
|
184
|
-
])),
|
|
185
|
-
_: 1
|
|
186
|
-
}, 8, ["modelValue"]),
|
|
187
|
-
N.value ? (P(), w("div", {
|
|
188
|
-
key: 0,
|
|
189
|
-
class: m(t(u).pendingChanges)
|
|
190
|
-
}, [
|
|
191
|
-
o(t(A), {
|
|
192
|
-
onClick: e[15] || (e[15] = (l) => d("alignmentParams", i.value))
|
|
193
|
-
}, {
|
|
194
|
-
default: s(() => e[30] || (e[30] = [
|
|
195
|
-
a(" Apply ")
|
|
196
|
-
])),
|
|
197
|
-
_: 1
|
|
198
|
-
}),
|
|
199
|
-
o(t(V), {
|
|
200
|
-
onClick: e[16] || (e[16] = (l) => i.value = n.settings.alignmentParams)
|
|
201
|
-
}, {
|
|
202
|
-
default: s(() => e[31] || (e[31] = [
|
|
203
|
-
a(" Cancel ")
|
|
204
|
-
])),
|
|
205
|
-
_: 1
|
|
206
|
-
})
|
|
207
|
-
], 2)) : U("", !0),
|
|
208
|
-
E.value ? (P(), T(t(F), {
|
|
209
|
-
key: 1,
|
|
210
|
-
class: m(t(u).resetButton),
|
|
211
|
-
icon: "reverse",
|
|
212
|
-
onClick: e[17] || (e[17] = (l) => d("alignmentParams", void 0))
|
|
213
|
-
}, {
|
|
214
|
-
default: s(() => e[32] || (e[32] = [
|
|
215
|
-
a(" Reset to Default ")
|
|
216
|
-
])),
|
|
217
|
-
_: 1
|
|
218
|
-
}, 8, ["class"])) : U("", !0)
|
|
219
|
-
]),
|
|
220
|
-
_: 1
|
|
221
|
-
}, 8, ["modelValue"])
|
|
222
|
-
], 64));
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
export {
|
|
226
|
-
H as default
|
|
227
|
-
};
|
|
228
|
-
//# sourceMappingURL=Toolbar.vue2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.vue2.js","sources":["../../../src/components/PlMultiSequenceAlignment/Toolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { isJsonEqual } from '@milaboratories/helpers';\nimport {\n type ListOptionNormalized,\n PlBtnGhost,\n PlBtnPrimary,\n PlBtnSecondary,\n PlCheckbox,\n PlDropdown,\n PlDropdownMulti,\n PlNumberField,\n PlSlideModal,\n} from '@milaboratories/uikit';\nimport type {\n PlMultiSequenceAlignmentColorSchemeOption as ColorSchemeOption,\n PlMultiSequenceAlignmentSettings as Settings,\n PlMultiSequenceAlignmentWidget,\n PObjectId,\n PTableColumnId,\n} from '@platforma-sdk/model';\nimport { computed, ref, useCssModule, watchEffect } from 'vue';\nimport { defaultSettings } from './settings';\n\nconst props = defineProps<{\n settings: Settings;\n sequenceColumnOptions: ListOptionNormalized<PObjectId>[] | undefined;\n labelColumnOptions: ListOptionNormalized<PTableColumnId>[] | undefined;\n colorSchemeOptions: ListOptionNormalized<ColorSchemeOption>[];\n}>();\n\nconst emit = defineEmits<{\n updateSettings: [Partial<Settings>];\n export: [];\n}>();\n\nconst classes = useCssModule();\n\nconst settingsOpen = ref(false);\n\nfunction updateSetting<K extends keyof Settings>(\n key: K,\n value: Settings[K] | undefined,\n) {\n emit('updateSettings', { [key]: value });\n}\n\nfunction toggleWidget(\n widget: PlMultiSequenceAlignmentWidget,\n checked: boolean,\n) {\n updateSetting(\n 'widgets',\n checked\n ? [...props.settings.widgets, widget]\n : props.settings.widgets.filter((w) => widget !== w),\n );\n}\n\nconst alignmentParams = ref({ ...props.settings.alignmentParams });\nwatchEffect(() => {\n alignmentParams.value = { ...props.settings.alignmentParams };\n});\n\nconst alignmentParamsChangesPending = computed(() =>\n !isJsonEqual(props.settings.alignmentParams, alignmentParams.value),\n);\n\nconst canResetAlignmentParams = computed(() =>\n !isJsonEqual(props.settings.alignmentParams, defaultSettings.alignmentParams),\n);\n</script>\n\n<template>\n <div :class=\"classes.container\">\n <div :class=\"classes.line\">\n <div :class=\"classes.section\">\n <PlDropdownMulti\n label=\"Sequence Columns\"\n :model-value=\"props.settings.sequenceColumnIds ?? []\"\n :options=\"props.sequenceColumnOptions\"\n clearable\n @update:model-value=\"event => updateSetting('sequenceColumnIds', event)\"\n />\n <PlDropdownMulti\n :model-value=\"props.settings.labelColumnIds ?? []\"\n label=\"Label Columns\"\n :options=\"props.labelColumnOptions\"\n clearable\n @update:model-value=\"event => updateSetting('labelColumnIds', event)\"\n />\n <PlDropdown\n :model-value=\"props.settings.colorScheme\"\n label=\"Color Scheme\"\n :options=\"props.colorSchemeOptions\"\n @update:model-value=\"event => updateSetting('colorScheme', event)\"\n />\n </div>\n <div :class=\"classes.buttons\">\n <PlBtnGhost icon=\"settings\" @click.stop=\"settingsOpen = true\">\n Settings\n </PlBtnGhost>\n <PlBtnGhost icon=\"export\" @click.stop=\"emit('export')\">\n Export\n </PlBtnGhost>\n </div>\n </div>\n <div :class=\"classes.line\">\n <div :class=\"classes.section\">\n <PlCheckbox\n :model-value=\"props.settings.widgets.includes('seqLogo')\"\n @update:model-value=\"event => toggleWidget('seqLogo', event)\"\n >\n Seq logo\n </PlCheckbox>\n <PlCheckbox\n :model-value=\"props.settings.widgets.includes('consensus')\"\n @update:model-value=\"event => toggleWidget('consensus', event)\"\n >\n Consensus\n </PlCheckbox>\n <PlCheckbox :model-value=\"false\" disabled>Navigator</PlCheckbox>\n <PlCheckbox\n :model-value=\"props.settings.widgets.includes('tree')\"\n @update:model-value=\"event => toggleWidget('tree', event)\"\n >\n Tree\n </PlCheckbox>\n <PlCheckbox\n :model-value=\"props.settings.widgets.includes('legend')\"\n :disabled=\"props.settings.colorScheme.type === 'no-color'\"\n @update:model-value=\"event => toggleWidget('legend', event)\"\n >\n Legend\n </PlCheckbox>\n </div>\n </div>\n </div>\n <PlSlideModal v-model=\"settingsOpen\">\n <template #title>Settings</template>\n <PlNumberField\n v-model=\"alignmentParams.gpo\"\n label=\"Gap open penalty\"\n :step=\"0.1\"\n @keyup.enter=\"updateSetting('alignmentParams', alignmentParams)\"\n >\n <template #tooltip>\n Penalty score assigned to the introduction of a gap in the alignment\n </template>\n </PlNumberField>\n <PlNumberField\n v-model=\"alignmentParams.gpe\"\n label=\"Gap extension penalty\"\n :step=\"0.1\"\n @keyup.enter=\"updateSetting('alignmentParams', alignmentParams)\"\n >\n <template #tooltip>\n Penalty score assigned to each additional residue added to an existing\n gap\n </template>\n </PlNumberField>\n <PlNumberField\n v-model=\"alignmentParams.tgpe\"\n label=\"Terminal gap extension penalty\"\n :step=\"0.1\"\n @keyup.enter=\"updateSetting('alignmentParams', alignmentParams)\"\n >\n <template #tooltip>\n Penalty score assigned to extending gaps at the ends of sequences\n </template>\n </PlNumberField>\n <div\n v-if=\"alignmentParamsChangesPending\"\n :class=\"classes.pendingChanges\"\n >\n <PlBtnPrimary @click=\"updateSetting('alignmentParams', alignmentParams)\">\n Apply\n </PlBtnPrimary>\n <PlBtnGhost @click=\"alignmentParams = props.settings.alignmentParams\">\n Cancel\n </PlBtnGhost>\n </div>\n <PlBtnSecondary\n v-if=\"canResetAlignmentParams\"\n :class=\"classes.resetButton\"\n icon=\"reverse\"\n @click=\"updateSetting('alignmentParams', undefined)\"\n >\n Reset to Default\n </PlBtnSecondary>\n </PlSlideModal>\n</template>\n\n<style module>\n.container {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n\n.line {\n display: flex;\n justify-content: space-between;\n}\n\n.section {\n display: flex;\n flex-wrap: wrap;\n gap: 24px;\n}\n\n.buttons {\n display: flex;\n}\n\n.pendingChanges {\n display: flex;\n button {\n min-width: 160px;\n }\n}\n\n.resetButton {\n margin-block-start: auto;\n span {\n text-transform: none;\n }\n}\n</style>\n"],"names":["props","__props","emit","__emit","classes","useCssModule","settingsOpen","ref","updateSetting","key","value","toggleWidget","widget","checked","w","alignmentParams","watchEffect","alignmentParamsChangesPending","computed","isJsonEqual","canResetAlignmentParams","defaultSettings"],"mappings":";;;;;;;;;;;;;;AAuBA,UAAMA,IAAQC,GAORC,IAAOC,GAKPC,IAAUC,EAAA,GAEVC,IAAeC,EAAI,EAAK;AAE9B,aAASC,EACPC,GACAC,GACA;AACA,MAAAR,EAAK,kBAAkB,EAAE,CAACO,CAAG,GAAGC,GAAO;AAAA,IACzC;AAEA,aAASC,EACPC,GACAC,GACA;AACA,MAAAL;AAAA,QACE;AAAA,QACAK,IACI,CAAC,GAAGb,EAAM,SAAS,SAASY,CAAM,IAClCZ,EAAM,SAAS,QAAQ,OAAO,CAACc,MAAMF,MAAWE,CAAC;AAAA,MAAA;AAAA,IAEzD;AAEA,UAAMC,IAAkBR,EAAI,EAAE,GAAGP,EAAM,SAAS,iBAAiB;AACjE,IAAAgB,EAAY,MAAM;AAChB,MAAAD,EAAgB,QAAQ,EAAE,GAAGf,EAAM,SAAS,gBAAA;AAAA,IAC9C,CAAC;AAED,UAAMiB,IAAgCC;AAAA,MAAS,MAC7C,CAACC,EAAYnB,EAAM,SAAS,iBAAiBe,EAAgB,KAAK;AAAA,IAAA,GAG9DK,IAA0BF;AAAA,MAAS,MACvC,CAACC,EAAYnB,EAAM,SAAS,iBAAiBqB,EAAgB,eAAe;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._container_ypn45_2{display:flex;flex-direction:column;gap:24px}._line_ypn45_8{display:flex;justify-content:space-between}._section_ypn45_13{display:flex;flex-wrap:wrap;gap:24px}._buttons_ypn45_19,._pendingChanges_ypn45_23{display:flex}._pendingChanges_ypn45_23 button{min-width:160px}._resetButton_ypn45_30{margin-block-start:auto}._resetButton_ypn45_30 span{text-transform:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
|
|
2
|
-
const n = "_container_ypn45_2", t = "_line_ypn45_8", e = "_section_ypn45_13", s = "_buttons_ypn45_19", o = "_pendingChanges_ypn45_23", _ = "_resetButton_ypn45_30", c = {
|
|
3
|
-
container: n,
|
|
4
|
-
line: t,
|
|
5
|
-
section: e,
|
|
6
|
-
buttons: s,
|
|
7
|
-
pendingChanges: o,
|
|
8
|
-
resetButton: _
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
s as buttons,
|
|
12
|
-
n as container,
|
|
13
|
-
c as default,
|
|
14
|
-
t as line,
|
|
15
|
-
o as pendingChanges,
|
|
16
|
-
_ as resetButton,
|
|
17
|
-
e as section
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=Toolbar.vue3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell-size.js","sources":["../../../src/components/PlMultiSequenceAlignment/cell-size.ts"],"sourcesContent":["export const cellSize = {\n inline: 20,\n block: 24,\n};\n"],"names":["cellSize"],"mappings":"AAAO,MAAMA,IAAW;AAAA,EACtB,QAAQ;AAAA,EACR,OAAO;AACT;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { HighlightLegend, ResidueCounts } from './types';
|
|
2
|
-
export declare function highlightByChemicalProperties({ sequences, residueCounts }: {
|
|
3
|
-
sequences: string[];
|
|
4
|
-
residueCounts: ResidueCounts;
|
|
5
|
-
}): {
|
|
6
|
-
blob: Blob;
|
|
7
|
-
legend: HighlightLegend;
|
|
8
|
-
};
|
|
9
|
-
declare const chemicalPropertiesColorScheme: {
|
|
10
|
-
hydrophobic: {
|
|
11
|
-
label: string;
|
|
12
|
-
color: string;
|
|
13
|
-
};
|
|
14
|
-
positiveCharge: {
|
|
15
|
-
label: string;
|
|
16
|
-
color: string;
|
|
17
|
-
};
|
|
18
|
-
negativeCharge: {
|
|
19
|
-
label: string;
|
|
20
|
-
color: string;
|
|
21
|
-
};
|
|
22
|
-
polar: {
|
|
23
|
-
label: string;
|
|
24
|
-
color: string;
|
|
25
|
-
};
|
|
26
|
-
cysteine: {
|
|
27
|
-
label: string;
|
|
28
|
-
color: string;
|
|
29
|
-
};
|
|
30
|
-
glycine: {
|
|
31
|
-
label: string;
|
|
32
|
-
color: string;
|
|
33
|
-
};
|
|
34
|
-
proline: {
|
|
35
|
-
label: string;
|
|
36
|
-
color: string;
|
|
37
|
-
};
|
|
38
|
-
aromatic: {
|
|
39
|
-
label: string;
|
|
40
|
-
color: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export type ChemicalCategory = keyof typeof chemicalPropertiesColorScheme;
|
|
44
|
-
export {};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
function E({ sequences: t, residueCounts: g }) {
|
|
2
|
-
var C, h, u;
|
|
3
|
-
const i = [], c = v({
|
|
4
|
-
residueCounts: g,
|
|
5
|
-
rowCount: t.length
|
|
6
|
-
}), n = ((C = t.at(0)) == null ? void 0 : C.length) ?? 0, l = t.length;
|
|
7
|
-
for (let e = 0; e < n; e += 1)
|
|
8
|
-
for (let o = 0; o < l; o += 1) {
|
|
9
|
-
const F = t[o][e], d = (u = (h = c.at(e)) == null ? void 0 : h.find(({ residues: a }) => a.includes(F))) == null ? void 0 : u.category;
|
|
10
|
-
if (!d) continue;
|
|
11
|
-
const r = i.at(-1);
|
|
12
|
-
r && r.category === d && r.column === e && r.start + r.length === o ? r.length += 1 : i.push({ category: d, column: e, start: o, length: 1 });
|
|
13
|
-
}
|
|
14
|
-
const s = Map.groupBy(i, ({ category: e }) => e), y = new Blob(
|
|
15
|
-
function* () {
|
|
16
|
-
var o;
|
|
17
|
-
yield `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${`0 0 ${n * 2} ${l}`}" stroke-width="2" preserveAspectRatio="none">`;
|
|
18
|
-
for (const [F, d] of s) {
|
|
19
|
-
const r = (o = P[F]) == null ? void 0 : o.color;
|
|
20
|
-
if (!r) continue;
|
|
21
|
-
yield `<path stroke="${r}" d="`;
|
|
22
|
-
let a = 0, A = 0;
|
|
23
|
-
for (const { column: m, start: b, length: f } of d)
|
|
24
|
-
yield `m${m * 2 + 1 - a},${b - A}v${f}`, a = m * 2 + 1, A = b + f;
|
|
25
|
-
yield '"/>';
|
|
26
|
-
}
|
|
27
|
-
yield "</svg>";
|
|
28
|
-
}().toArray(),
|
|
29
|
-
{ type: "image/svg+xml" }
|
|
30
|
-
), p = Object.fromEntries(
|
|
31
|
-
Object.entries(P).filter(([e]) => s.has(e))
|
|
32
|
-
);
|
|
33
|
-
return { blob: y, legend: p };
|
|
34
|
-
}
|
|
35
|
-
const v = ({ residueCounts: t, rowCount: g }) => t.map((i) => {
|
|
36
|
-
const c = /* @__PURE__ */ new Set();
|
|
37
|
-
return D.filter(
|
|
38
|
-
({ residues: n, rules: l }) => n.split("").some((s) => s in i) && (!l || l.split("").map(
|
|
39
|
-
(s) => [s, w[s]]
|
|
40
|
-
).some(([s, { residues: y, threshold: p }]) => {
|
|
41
|
-
if (c.has(s)) return !0;
|
|
42
|
-
const h = y.split("").reduce((u, e) => u + (i[e] ?? 0), 0) >= g * p;
|
|
43
|
-
return h && c.add(s), h;
|
|
44
|
-
}))
|
|
45
|
-
);
|
|
46
|
-
}), P = {
|
|
47
|
-
hydrophobic: {
|
|
48
|
-
label: "Hydrophobic",
|
|
49
|
-
color: "#99CCFF"
|
|
50
|
-
},
|
|
51
|
-
positiveCharge: {
|
|
52
|
-
label: "Positive Charged",
|
|
53
|
-
color: "#FFA2A3"
|
|
54
|
-
},
|
|
55
|
-
negativeCharge: {
|
|
56
|
-
label: "Negative Charged",
|
|
57
|
-
color: "#C1ADFF"
|
|
58
|
-
},
|
|
59
|
-
polar: {
|
|
60
|
-
label: "Polar",
|
|
61
|
-
color: "#99E099"
|
|
62
|
-
},
|
|
63
|
-
cysteine: {
|
|
64
|
-
label: "Cysteines",
|
|
65
|
-
color: "#FAAAFA"
|
|
66
|
-
},
|
|
67
|
-
glycine: {
|
|
68
|
-
label: "Glycines",
|
|
69
|
-
color: "#F7BC5D"
|
|
70
|
-
},
|
|
71
|
-
proline: {
|
|
72
|
-
label: "Prolines",
|
|
73
|
-
color: "#FFFF8F"
|
|
74
|
-
},
|
|
75
|
-
aromatic: {
|
|
76
|
-
label: "Aromatic",
|
|
77
|
-
color: "#A2F5FA"
|
|
78
|
-
}
|
|
79
|
-
}, w = {
|
|
80
|
-
"%": { residues: "WLVIMAFCYHP", threshold: 0.6 },
|
|
81
|
-
"#": { residues: "WLVIMAFCYHP", threshold: 0.8 },
|
|
82
|
-
"-": { residues: "ED", threshold: 0.5 },
|
|
83
|
-
"+": { residues: "KR", threshold: 0.6 },
|
|
84
|
-
g: { residues: "G", threshold: 0.5 },
|
|
85
|
-
n: { residues: "N", threshold: 0.5 },
|
|
86
|
-
q: { residues: "QE", threshold: 0.5 },
|
|
87
|
-
p: { residues: "P", threshold: 0.5 },
|
|
88
|
-
t: { residues: "TS", threshold: 0.5 },
|
|
89
|
-
A: { residues: "A", threshold: 0.85 },
|
|
90
|
-
C: { residues: "C", threshold: 0.85 },
|
|
91
|
-
D: { residues: "D", threshold: 0.85 },
|
|
92
|
-
E: { residues: "E", threshold: 0.85 },
|
|
93
|
-
F: { residues: "F", threshold: 0.85 },
|
|
94
|
-
G: { residues: "G", threshold: 0.85 },
|
|
95
|
-
H: { residues: "H", threshold: 0.85 },
|
|
96
|
-
I: { residues: "I", threshold: 0.85 },
|
|
97
|
-
K: { residues: "K", threshold: 0.85 },
|
|
98
|
-
L: { residues: "L", threshold: 0.85 },
|
|
99
|
-
M: { residues: "M", threshold: 0.85 },
|
|
100
|
-
N: { residues: "N", threshold: 0.85 },
|
|
101
|
-
P: { residues: "P", threshold: 0.85 },
|
|
102
|
-
Q: { residues: "Q", threshold: 0.85 },
|
|
103
|
-
R: { residues: "R", threshold: 0.85 },
|
|
104
|
-
S: { residues: "S", threshold: 0.85 },
|
|
105
|
-
T: { residues: "T", threshold: 0.85 },
|
|
106
|
-
V: { residues: "V", threshold: 0.85 },
|
|
107
|
-
W: { residues: "W", threshold: 0.85 },
|
|
108
|
-
Y: { residues: "Y", threshold: 0.85 }
|
|
109
|
-
}, D = [
|
|
110
|
-
{ residues: "G", category: "glycine", rules: "" },
|
|
111
|
-
{ residues: "P", category: "proline", rules: "" },
|
|
112
|
-
{ residues: "T", category: "polar", rules: "tST%#" },
|
|
113
|
-
{ residues: "S", category: "polar", rules: "tST#" },
|
|
114
|
-
{ residues: "N", category: "polar", rules: "nND" },
|
|
115
|
-
{ residues: "Q", category: "polar", rules: "qQE+KR" },
|
|
116
|
-
// criteria below has to go before the other criteria for C,
|
|
117
|
-
// otherwise it will never match
|
|
118
|
-
{ residues: "C", category: "cysteine", rules: "C" },
|
|
119
|
-
{ residues: "WLVIMF", category: "hydrophobic", rules: "%#ACFHILMVWYPp" },
|
|
120
|
-
// below there was an 's' rule too,
|
|
121
|
-
// but no definition of such rule was provided
|
|
122
|
-
{ residues: "A", category: "hydrophobic", rules: "%#ACFHILMVWYPpTSG" },
|
|
123
|
-
{ residues: "C", category: "hydrophobic", rules: "%#AFHILMVWYSPp" },
|
|
124
|
-
{ residues: "HY", category: "aromatic", rules: "%#ACFHILMVWYPp" },
|
|
125
|
-
{ residues: "E", category: "negativeCharge", rules: "-DEqQ" },
|
|
126
|
-
{ residues: "D", category: "negativeCharge", rules: "-DEnN" },
|
|
127
|
-
{ residues: "KR", category: "positiveCharge", rules: "+KRQ" }
|
|
128
|
-
];
|
|
129
|
-
export {
|
|
130
|
-
E as highlightByChemicalProperties
|
|
131
|
-
};
|
|
132
|
-
//# sourceMappingURL=chemical-properties.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chemical-properties.js","sources":["../../../src/components/PlMultiSequenceAlignment/chemical-properties.ts"],"sourcesContent":["import type { HighlightLegend, ResidueCounts } from './types';\n\nexport function highlightByChemicalProperties(\n { sequences, residueCounts }: {\n sequences: string[];\n residueCounts: ResidueCounts;\n },\n): { blob: Blob; legend: HighlightLegend } {\n const lines: {\n category: ChemicalCategory;\n column: number;\n start: number;\n length: number;\n }[] = [];\n const chemicalProperties = getAlignmentChemicalProperties({\n residueCounts,\n rowCount: sequences.length,\n });\n const width = sequences.at(0)?.length ?? 0;\n const height = sequences.length;\n for (let column = 0; column < width; column += 1) {\n for (let row = 0; row < height; row += 1) {\n const residue = sequences[row][column];\n const category = chemicalProperties\n .at(column)\n ?.find(({ residues }) => residues.includes(residue))\n ?.category;\n if (!category) continue;\n const lastLine = lines.at(-1);\n if (\n lastLine\n && lastLine.category === category\n && lastLine.column === column\n && lastLine.start + lastLine.length === row\n ) {\n lastLine.length += 1;\n } else {\n lines.push({ category, column, start: row, length: 1 });\n }\n }\n }\n const linesByCategory = Map.groupBy(lines, ({ category }) => category);\n const blob = new Blob(\n (function*() {\n const viewBox = `0 0 ${width * 2} ${height}`;\n yield `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"${viewBox}\" stroke-width=\"2\" preserveAspectRatio=\"none\">`;\n for (const [category, lines] of linesByCategory) {\n const color = chemicalPropertiesColorScheme[category]?.color;\n if (!color) continue;\n yield `<path stroke=\"${color}\" d=\"`;\n let x = 0, y = 0;\n for (const { column, start, length } of lines) {\n yield `m${column * 2 + 1 - x},${start - y}v${length}`;\n x = column * 2 + 1;\n y = start + length;\n }\n yield '\"/>';\n }\n yield '</svg>';\n })().toArray(),\n { type: 'image/svg+xml' },\n );\n const legend = Object.fromEntries(\n Object.entries(chemicalPropertiesColorScheme)\n .filter(([color]) => linesByCategory.has(color as ChemicalCategory)),\n );\n return { blob, legend };\n}\n\nconst getAlignmentChemicalProperties = (\n { residueCounts, rowCount }: {\n residueCounts: ResidueCounts;\n rowCount: number;\n },\n): ColumnChemicalProperties[] =>\n residueCounts.map((column) => {\n const matchedRules = new Set<string>();\n return categoryCriterion.filter(({ residues, rules }) =>\n residues.split('').some((residue) => residue in column)\n && (!rules || rules.split('').map((ruleName) =>\n [ruleName, ruleDefinitions[ruleName as RuleName]] as const,\n ).some(([ruleName, { residues, threshold }]) => {\n if (matchedRules.has(ruleName)) return true;\n const groupCount = residues.split('')\n .reduce((acc, residue) => acc + (column[residue] ?? 0), 0);\n const matches = groupCount >= rowCount * threshold;\n if (matches) matchedRules.add(ruleName);\n return matches;\n })),\n );\n });\n\ntype ColumnChemicalProperties = {\n residues: string;\n category: ChemicalCategory;\n}[];\n\nconst chemicalPropertiesColorScheme = {\n hydrophobic: {\n label: 'Hydrophobic',\n color: '#99CCFF',\n },\n positiveCharge: {\n label: 'Positive Charged',\n color: '#FFA2A3',\n },\n negativeCharge: {\n label: 'Negative Charged',\n color: '#C1ADFF',\n },\n polar: {\n label: 'Polar',\n color: '#99E099',\n },\n cysteine: {\n label: 'Cysteines',\n color: '#FAAAFA',\n },\n glycine: {\n label: 'Glycines',\n color: '#F7BC5D',\n },\n proline: {\n label: 'Prolines',\n color: '#FFFF8F',\n },\n aromatic: {\n label: 'Aromatic',\n color: '#A2F5FA',\n },\n} satisfies HighlightLegend;\n\nexport type ChemicalCategory = keyof typeof chemicalPropertiesColorScheme;\n\n/*\n * Below taken mostly from\n * https://www.rbvi.ucsf.edu/chimera/1.2065/docs/ContributedSoftware/multalignviewer/colprot.par}\n */\n\nconst ruleDefinitions = {\n '%': { residues: 'WLVIMAFCYHP', threshold: 0.6 },\n '#': { residues: 'WLVIMAFCYHP', threshold: 0.8 },\n '-': { residues: 'ED', threshold: 0.5 },\n '+': { residues: 'KR', threshold: 0.6 },\n 'g': { residues: 'G', threshold: 0.5 },\n 'n': { residues: 'N', threshold: 0.5 },\n 'q': { residues: 'QE', threshold: 0.5 },\n 'p': { residues: 'P', threshold: 0.5 },\n 't': { residues: 'TS', threshold: 0.5 },\n 'A': { residues: 'A', threshold: 0.85 },\n 'C': { residues: 'C', threshold: 0.85 },\n 'D': { residues: 'D', threshold: 0.85 },\n 'E': { residues: 'E', threshold: 0.85 },\n 'F': { residues: 'F', threshold: 0.85 },\n 'G': { residues: 'G', threshold: 0.85 },\n 'H': { residues: 'H', threshold: 0.85 },\n 'I': { residues: 'I', threshold: 0.85 },\n 'K': { residues: 'K', threshold: 0.85 },\n 'L': { residues: 'L', threshold: 0.85 },\n 'M': { residues: 'M', threshold: 0.85 },\n 'N': { residues: 'N', threshold: 0.85 },\n 'P': { residues: 'P', threshold: 0.85 },\n 'Q': { residues: 'Q', threshold: 0.85 },\n 'R': { residues: 'R', threshold: 0.85 },\n 'S': { residues: 'S', threshold: 0.85 },\n 'T': { residues: 'T', threshold: 0.85 },\n 'V': { residues: 'V', threshold: 0.85 },\n 'W': { residues: 'W', threshold: 0.85 },\n 'Y': { residues: 'Y', threshold: 0.85 },\n};\n\ntype RuleName = keyof typeof ruleDefinitions;\n\nconst categoryCriterion: Criteria[] = [\n { residues: 'G', category: 'glycine', rules: '' },\n { residues: 'P', category: 'proline', rules: '' },\n { residues: 'T', category: 'polar', rules: 'tST%#' },\n { residues: 'S', category: 'polar', rules: 'tST#' },\n { residues: 'N', category: 'polar', rules: 'nND' },\n { residues: 'Q', category: 'polar', rules: 'qQE+KR' },\n // criteria below has to go before the other criteria for C,\n // otherwise it will never match\n { residues: 'C', category: 'cysteine', rules: 'C' },\n { residues: 'WLVIMF', category: 'hydrophobic', rules: '%#ACFHILMVWYPp' },\n // below there was an 's' rule too,\n // but no definition of such rule was provided\n { residues: 'A', category: 'hydrophobic', rules: '%#ACFHILMVWYPpTSG' },\n { residues: 'C', category: 'hydrophobic', rules: '%#AFHILMVWYSPp' },\n { residues: 'HY', category: 'aromatic', rules: '%#ACFHILMVWYPp' },\n { residues: 'E', category: 'negativeCharge', rules: '-DEqQ' },\n { residues: 'D', category: 'negativeCharge', rules: '-DEnN' },\n { residues: 'KR', category: 'positiveCharge', rules: '+KRQ' },\n];\n\ntype Criteria = {\n residues: string;\n category: ChemicalCategory;\n rules: string;\n};\n"],"names":["highlightByChemicalProperties","sequences","residueCounts","_a","_b","_c","lines","chemicalProperties","getAlignmentChemicalProperties","width","height","column","row","residue","category","residues","lastLine","linesByCategory","blob","color","chemicalPropertiesColorScheme","x","y","start","length","legend","rowCount","matchedRules","categoryCriterion","rules","ruleName","ruleDefinitions","threshold","matches","acc"],"mappings":"AAEO,SAASA,EACd,EAAE,WAAAC,GAAW,eAAAC,KAI4B;AALpC,MAAAC,GAAAC,GAAAC;AAML,QAAMC,IAKA,CAAA,GACAC,IAAqBC,EAA+B;AAAA,IACxD,eAAAN;AAAA,IACA,UAAUD,EAAU;AAAA,EAAA,CACrB,GACKQ,MAAQN,IAAAF,EAAU,GAAG,CAAC,MAAd,gBAAAE,EAAiB,WAAU,GACnCO,IAAST,EAAU;AACzB,WAASU,IAAS,GAAGA,IAASF,GAAOE,KAAU;AAC7C,aAASC,IAAM,GAAGA,IAAMF,GAAQE,KAAO,GAAG;AACxC,YAAMC,IAAUZ,EAAUW,CAAG,EAAED,CAAM,GAC/BG,KAAWT,KAAAD,IAAAG,EACd,GAAGI,CAAM,MADK,gBAAAP,EAEb,KAAK,CAAC,EAAE,UAAAW,EAAA,MAAeA,EAAS,SAASF,CAAO,OAFnC,gBAAAR,EAGb;AACJ,UAAI,CAACS,EAAU;AACf,YAAME,IAAWV,EAAM,GAAG,EAAE;AAC5B,MACEU,KACGA,EAAS,aAAaF,KACtBE,EAAS,WAAWL,KACpBK,EAAS,QAAQA,EAAS,WAAWJ,IAExCI,EAAS,UAAU,IAEnBV,EAAM,KAAK,EAAE,UAAAQ,GAAU,QAAAH,GAAQ,OAAOC,GAAK,QAAQ,GAAG;AAAA,IAE1D;AAEF,QAAMK,IAAkB,IAAI,QAAQX,GAAO,CAAC,EAAE,UAAAQ,EAAA,MAAeA,CAAQ,GAC/DI,IAAO,IAAI;AAAA,IACd,aAAY;AAzCV,UAAAf;AA2CD,YAAM,oDADU,OAAOM,IAAQ,CAAC,IAAIC,CAAM,EACuB;AACjE,iBAAW,CAACI,GAAUR,CAAK,KAAKW,GAAiB;AAC/C,cAAME,KA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AA,EAC9C,EAAE,UAAU,UAAU,UAAU,eAAe,OAAO,iBAAA;AAAA;AAAA;AAAA,EAGtD,EAAE,UAAU,KAAK,UAAU,eAAe,OAAO,oBAAA;AAAA,EACjD,EAAE,UAAU,KAAK,UAAU,eAAe,OAAO,iBAAA;AAAA,EACjD,EAAE,UAAU,MAAM,UAAU,YAAY,OAAO,iBAAA;AAAA,EAC/C,EAAE,UAAU,KAAK,UAAU,kBAAkB,OAAO,QAAA;AAAA,EACpD,EAAE,UAAU,KAAK,UAAU,kBAAkB,OAAO,QAAA;AAAA,EACpD,EAAE,UAAU,MAAM,UAAU,kBAAkB,OAAO,OAAA;AACvD;"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ListOptionNormalized } from '@milaboratories/uikit';
|
|
2
|
-
import { PColumnIdAndSpec, PFrameHandle, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentSettings, PlSelectionModel, PObjectId, PTableColumnId } from '@platforma-sdk/model';
|
|
3
|
-
import { HighlightLegend, ResidueCounts } from './types';
|
|
4
|
-
import type * as PhylogeneticTreeWorker from './phylogenetic-tree.worker';
|
|
5
|
-
export declare const SEQUENCE_LIMIT = 1000;
|
|
6
|
-
export declare const useSequenceColumnsOptions: (paramsGetter: () => {
|
|
7
|
-
pFrame: PFrameHandle | undefined;
|
|
8
|
-
sequenceColumnPredicate: (column: PColumnIdAndSpec) => boolean;
|
|
9
|
-
}) => {
|
|
10
|
-
data: import('vue').Ref<OptionsWithDefaults<PObjectId> | undefined, OptionsWithDefaults<PObjectId> | undefined>;
|
|
11
|
-
isLoading: import('vue').Ref<boolean, boolean>;
|
|
12
|
-
error: import('vue').Ref<Error | undefined, Error | undefined>;
|
|
13
|
-
};
|
|
14
|
-
export declare const useLabelColumnsOptions: (paramsGetter: () => {
|
|
15
|
-
pFrame: PFrameHandle | undefined;
|
|
16
|
-
sequenceColumnIds: PObjectId[] | undefined;
|
|
17
|
-
}) => {
|
|
18
|
-
data: import('vue').Ref<OptionsWithDefaults<PTableColumnId> | undefined, OptionsWithDefaults<PTableColumnId> | undefined>;
|
|
19
|
-
isLoading: import('vue').Ref<boolean, boolean>;
|
|
20
|
-
error: import('vue').Ref<Error | undefined, Error | undefined>;
|
|
21
|
-
};
|
|
22
|
-
export declare const useMarkupColumnsOptions: (paramsGetter: () => {
|
|
23
|
-
pFrame: PFrameHandle | undefined;
|
|
24
|
-
sequenceColumnIds: PObjectId[] | undefined;
|
|
25
|
-
}) => {
|
|
26
|
-
data: import('vue').Ref<ListOptionNormalized<PObjectId[]>[] | undefined, ListOptionNormalized<PObjectId[]>[] | undefined>;
|
|
27
|
-
isLoading: import('vue').Ref<boolean, boolean>;
|
|
28
|
-
error: import('vue').Ref<Error | undefined, Error | undefined>;
|
|
29
|
-
};
|
|
30
|
-
export declare const useMultipleAlignmentData: (paramsGetter: () => {
|
|
31
|
-
pFrame: PFrameHandle | undefined;
|
|
32
|
-
sequenceColumnIds: PObjectId[] | undefined;
|
|
33
|
-
labelColumnIds: PTableColumnId[] | undefined;
|
|
34
|
-
selection: PlSelectionModel | undefined;
|
|
35
|
-
colorScheme: PlMultiSequenceAlignmentColorSchemeOption;
|
|
36
|
-
alignmentParams: PlMultiSequenceAlignmentSettings["alignmentParams"];
|
|
37
|
-
shouldBuildPhylogeneticTree: boolean;
|
|
38
|
-
}) => {
|
|
39
|
-
data: import('vue').Ref<MultipleAlignmentData | undefined, MultipleAlignmentData | undefined>;
|
|
40
|
-
isLoading: import('vue').Ref<boolean, boolean>;
|
|
41
|
-
error: import('vue').Ref<Error | undefined, Error | undefined>;
|
|
42
|
-
};
|
|
43
|
-
type MultipleAlignmentData = {
|
|
44
|
-
sequences: {
|
|
45
|
-
name: string;
|
|
46
|
-
rows: string[];
|
|
47
|
-
residueCounts: ResidueCounts;
|
|
48
|
-
highlightImageUrl?: string;
|
|
49
|
-
}[];
|
|
50
|
-
labels: {
|
|
51
|
-
rows: string[];
|
|
52
|
-
}[];
|
|
53
|
-
highlightLegend?: HighlightLegend;
|
|
54
|
-
phylogeneticTree?: PhylogeneticTreeWorker.TreeNodeData[];
|
|
55
|
-
exceedsLimit: boolean;
|
|
56
|
-
};
|
|
57
|
-
type OptionsWithDefaults<T> = {
|
|
58
|
-
options: ListOptionNormalized<T>[];
|
|
59
|
-
defaults: T[];
|
|
60
|
-
};
|
|
61
|
-
export {};
|