@teselagen/ove 0.7.1 → 0.7.2
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/DigestTool/DigestTool.d.ts +1 -1
- package/Menlo.ttf +0 -0
- package/Monaco.ttf +0 -0
- package/helperComponents/PropertiesDialog/index.d.ts +2 -7
- package/html2canvas.esm--JN4fLQL.mjs +7891 -0
- package/html2canvas.esm-B7d7VJmQ.js +7891 -0
- package/html2canvas.esm-GLpiTZLt.cjs +7891 -0
- package/html2canvas.esm-GLpiTZLt.js +7891 -0
- package/html2canvas.esm-nFNn58sx.js +7891 -0
- package/html2canvas.esm-nFNn58sx.mjs +7891 -0
- package/index.cjs.js +6534 -536
- package/index.es.js +6523 -525
- package/index.umd.js +6523 -516
- package/package.json +2 -2
- package/src/AutoAnnotate.js +1 -0
- package/src/CircularView/Labels/index.js +1 -15
- package/src/CircularView/index.js +3 -4
- package/src/CreateAnnotationsPage.js +1 -1
- package/src/DigestTool/DigestTool.js +78 -75
- package/src/GlobalDialogUtils.js +1 -0
- package/src/Reflex/reflex-styles.css +10 -10
- package/src/RowItem/CutsiteSelectionLayers.js +1 -1
- package/src/RowItem/SelectionLayer/index.js +2 -2
- package/src/RowItem/Sequence.js +0 -1
- package/src/RowItem/Translations/Translation.js +1 -0
- package/src/RowItem/index.js +0 -1
- package/src/helperComponents/PropertiesDialog/CutsiteProperties.js +126 -135
- package/src/helperComponents/PropertiesDialog/SingleEnzymeCutsiteInfo.js +59 -51
- package/src/helperComponents/PropertiesDialog/index.js +115 -114
- package/src/helperComponents/RemoveDuplicates/index.js +144 -160
- package/src/utils/useFormValue.js +7 -0
- package/src/withEditorInteractions/index.js +8 -7
- package/style.css +39 -15
- package/utils/useFormValue.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ove",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@teselagen/sequence-utils": "0.3.27",
|
|
14
14
|
"@teselagen/range-utils": "0.3.7",
|
|
15
|
-
"@teselagen/ui": "0.7.
|
|
15
|
+
"@teselagen/ui": "0.7.6",
|
|
16
16
|
"@teselagen/file-utils": "0.3.16",
|
|
17
17
|
"@teselagen/bounce-loader": "0.3.11",
|
|
18
18
|
"@teselagen/bio-parsers": "0.4.22",
|
package/src/AutoAnnotate.js
CHANGED
|
@@ -416,23 +416,9 @@ function LabelLine(pointArray, options) {
|
|
|
416
416
|
});
|
|
417
417
|
return (
|
|
418
418
|
<React.Fragment key="labelLine">
|
|
419
|
-
{/* <polyline
|
|
420
|
-
{...{
|
|
421
|
-
key: "polyline-short",
|
|
422
|
-
points,
|
|
423
|
-
stroke: "black",
|
|
424
|
-
fill: "none",
|
|
425
|
-
strokeWidth: 1,
|
|
426
|
-
// style: {
|
|
427
|
-
// opacity: 0.2
|
|
428
|
-
// },
|
|
429
|
-
className: "veLabelLine",
|
|
430
|
-
...options
|
|
431
|
-
}}
|
|
432
|
-
/> */}
|
|
433
419
|
<polyline
|
|
420
|
+
key="polyline-long"
|
|
434
421
|
{...{
|
|
435
|
-
key: "polyline-long",
|
|
436
422
|
points,
|
|
437
423
|
stroke: "black",
|
|
438
424
|
fill: "none",
|
|
@@ -597,12 +597,11 @@ export function CircularView(props) {
|
|
|
597
597
|
) {
|
|
598
598
|
return (
|
|
599
599
|
<SelectionLayer
|
|
600
|
-
key={index}
|
|
600
|
+
key={"veCircularViewSelectionLayer" + index}
|
|
601
601
|
{...{
|
|
602
602
|
index,
|
|
603
603
|
isDraggable: true,
|
|
604
604
|
isProtein,
|
|
605
|
-
key: "veCircularViewSelectionLayer" + index,
|
|
606
605
|
selectionLayer,
|
|
607
606
|
onRightClicked: selectionLayer.isSearchLayer
|
|
608
607
|
? searchLayerRightClicked
|
|
@@ -635,13 +634,13 @@ export function CircularView(props) {
|
|
|
635
634
|
//only render if there is no selection layer
|
|
636
635
|
return (
|
|
637
636
|
<Caret
|
|
637
|
+
key="veCircularViewCaret"
|
|
638
638
|
{...{
|
|
639
639
|
caretPosition,
|
|
640
640
|
sequenceLength,
|
|
641
641
|
isProtein,
|
|
642
642
|
innerRadius,
|
|
643
|
-
outerRadius: radius
|
|
644
|
-
key: "veCircularViewCaret"
|
|
643
|
+
outerRadius: radius
|
|
645
644
|
}}
|
|
646
645
|
/>
|
|
647
646
|
);
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { compose, withProps } from "recompose";
|
|
4
|
-
// import selectionLayer from "../redux/selectionLayer";
|
|
5
|
-
import React, { useState } from "react";
|
|
6
|
-
import { DataTable } from "@teselagen/ui";
|
|
1
|
+
import React, { useMemo, useState } from "react";
|
|
2
|
+
import { DataTable, useStableReference } from "@teselagen/ui";
|
|
7
3
|
import { getCutsiteType, getVirtualDigest } from "@teselagen/sequence-utils";
|
|
8
4
|
import CutsiteFilter from "../CutsiteFilter";
|
|
9
5
|
import Ladder from "./Ladder";
|
|
10
|
-
// import getCutsiteType from "./getCutsiteType";
|
|
11
6
|
import {
|
|
12
7
|
Tabs,
|
|
13
8
|
Tab,
|
|
@@ -22,23 +17,91 @@ import { pick } from "lodash-es";
|
|
|
22
17
|
|
|
23
18
|
const MAX_DIGEST_CUTSITES = 50;
|
|
24
19
|
const MAX_PARTIAL_DIGEST_CUTSITES = 10;
|
|
20
|
+
const onSingleSelectRow = ({ onFragmentSelect }) => {
|
|
21
|
+
onFragmentSelect();
|
|
22
|
+
};
|
|
25
23
|
|
|
26
24
|
export const DigestTool = props => {
|
|
27
25
|
const [selectedTab, setSelectedTab] = useState("virtualDigest");
|
|
28
26
|
const {
|
|
29
27
|
editorName,
|
|
30
|
-
// height = 100,
|
|
31
28
|
dimensions = {},
|
|
32
|
-
lanes,
|
|
33
29
|
digestTool: { selectedFragment, computePartialDigest },
|
|
34
30
|
onDigestSave,
|
|
35
|
-
computePartialDigestDisabled,
|
|
36
|
-
computeDigestDisabled,
|
|
37
31
|
updateComputePartialDigest,
|
|
38
32
|
boxHeight,
|
|
39
33
|
digestLaneRightClicked,
|
|
40
|
-
ladders
|
|
34
|
+
ladders,
|
|
35
|
+
sequenceData,
|
|
36
|
+
sequenceLength,
|
|
37
|
+
selectionLayerUpdate: _selectionLayerUpdate,
|
|
38
|
+
updateSelectedFragment
|
|
41
39
|
} = props;
|
|
40
|
+
|
|
41
|
+
const isCircular = sequenceData.circular;
|
|
42
|
+
const cutsites = sequenceData.cutsites;
|
|
43
|
+
const computePartialDigestDisabled =
|
|
44
|
+
cutsites.length > MAX_PARTIAL_DIGEST_CUTSITES;
|
|
45
|
+
const computeDigestDisabled = cutsites.length > MAX_DIGEST_CUTSITES;
|
|
46
|
+
// The selection layer update function is memoized to prevent re-renders
|
|
47
|
+
// It changes triggered by the DataTables below
|
|
48
|
+
const selectionLayerUpdate = useStableReference(_selectionLayerUpdate);
|
|
49
|
+
|
|
50
|
+
// This useMemo might not be necessary once if we figure out
|
|
51
|
+
// why the DataTables below triggers a re-render outside of them.
|
|
52
|
+
const lanes = useMemo(() => {
|
|
53
|
+
const { fragments } = getVirtualDigest({
|
|
54
|
+
cutsites,
|
|
55
|
+
sequenceLength,
|
|
56
|
+
isCircular,
|
|
57
|
+
computePartialDigest,
|
|
58
|
+
computePartialDigestDisabled,
|
|
59
|
+
computeDigestDisabled
|
|
60
|
+
});
|
|
61
|
+
const _lanes = [
|
|
62
|
+
fragments.map(f => ({
|
|
63
|
+
...f,
|
|
64
|
+
onFragmentSelect: () => {
|
|
65
|
+
selectionLayerUpdate.current({
|
|
66
|
+
start: f.start,
|
|
67
|
+
end: f.end,
|
|
68
|
+
name: f.name
|
|
69
|
+
});
|
|
70
|
+
updateSelectedFragment(f.Intentid);
|
|
71
|
+
}
|
|
72
|
+
}))
|
|
73
|
+
];
|
|
74
|
+
return _lanes;
|
|
75
|
+
}, [
|
|
76
|
+
computeDigestDisabled,
|
|
77
|
+
computePartialDigest,
|
|
78
|
+
computePartialDigestDisabled,
|
|
79
|
+
cutsites,
|
|
80
|
+
isCircular,
|
|
81
|
+
selectionLayerUpdate,
|
|
82
|
+
sequenceLength,
|
|
83
|
+
updateSelectedFragment
|
|
84
|
+
]);
|
|
85
|
+
|
|
86
|
+
// Same comment as above
|
|
87
|
+
const digestInfoLanes = useMemo(
|
|
88
|
+
() =>
|
|
89
|
+
lanes[0].map(({ id, cut1, cut2, start, end, size, ...rest }) => {
|
|
90
|
+
return {
|
|
91
|
+
...rest,
|
|
92
|
+
id,
|
|
93
|
+
start,
|
|
94
|
+
end,
|
|
95
|
+
length: size,
|
|
96
|
+
leftCutter: cut1.restrictionEnzyme.name,
|
|
97
|
+
rightCutter: cut2.restrictionEnzyme.name,
|
|
98
|
+
leftOverhang: getCutsiteType(cut1.restrictionEnzyme),
|
|
99
|
+
rightOverhang: getCutsiteType(cut2.restrictionEnzyme)
|
|
100
|
+
};
|
|
101
|
+
}),
|
|
102
|
+
[lanes]
|
|
103
|
+
);
|
|
104
|
+
|
|
42
105
|
return (
|
|
43
106
|
<div
|
|
44
107
|
style={{
|
|
@@ -137,25 +200,9 @@ export const DigestTool = props => {
|
|
|
137
200
|
maxHeight={400}
|
|
138
201
|
// noFooter
|
|
139
202
|
withSearch={false}
|
|
140
|
-
onSingleRowSelect={
|
|
141
|
-
onFragmentSelect();
|
|
142
|
-
}}
|
|
203
|
+
onSingleRowSelect={onSingleSelectRow}
|
|
143
204
|
formName="digestInfoTable"
|
|
144
|
-
entities={
|
|
145
|
-
({ id, cut1, cut2, start, end, size, ...rest }) => {
|
|
146
|
-
return {
|
|
147
|
-
...rest,
|
|
148
|
-
id,
|
|
149
|
-
start,
|
|
150
|
-
end,
|
|
151
|
-
length: size,
|
|
152
|
-
leftCutter: cut1.restrictionEnzyme.name,
|
|
153
|
-
rightCutter: cut2.restrictionEnzyme.name,
|
|
154
|
-
leftOverhang: getCutsiteType(cut1.restrictionEnzyme),
|
|
155
|
-
rightOverhang: getCutsiteType(cut2.restrictionEnzyme)
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
)}
|
|
205
|
+
entities={digestInfoLanes}
|
|
159
206
|
schema={schema}
|
|
160
207
|
/>
|
|
161
208
|
}
|
|
@@ -178,48 +225,4 @@ const schema = {
|
|
|
178
225
|
]
|
|
179
226
|
};
|
|
180
227
|
|
|
181
|
-
export default
|
|
182
|
-
withEditorInteractions,
|
|
183
|
-
withProps(
|
|
184
|
-
({
|
|
185
|
-
sequenceData,
|
|
186
|
-
sequenceLength,
|
|
187
|
-
selectionLayerUpdate,
|
|
188
|
-
updateSelectedFragment,
|
|
189
|
-
digestTool: { computePartialDigest }
|
|
190
|
-
}) => {
|
|
191
|
-
const isCircular = sequenceData.circular;
|
|
192
|
-
const cutsites = sequenceData.cutsites;
|
|
193
|
-
const computePartialDigestDisabled =
|
|
194
|
-
cutsites.length > MAX_PARTIAL_DIGEST_CUTSITES;
|
|
195
|
-
const computeDigestDisabled = cutsites.length > MAX_DIGEST_CUTSITES;
|
|
196
|
-
|
|
197
|
-
const { fragments, overlappingEnzymes } = getVirtualDigest({
|
|
198
|
-
cutsites,
|
|
199
|
-
sequenceLength,
|
|
200
|
-
isCircular,
|
|
201
|
-
computePartialDigest,
|
|
202
|
-
computePartialDigestDisabled,
|
|
203
|
-
computeDigestDisabled
|
|
204
|
-
});
|
|
205
|
-
return {
|
|
206
|
-
computePartialDigestDisabled,
|
|
207
|
-
computeDigestDisabled,
|
|
208
|
-
lanes: [
|
|
209
|
-
fragments.map(f => ({
|
|
210
|
-
...f,
|
|
211
|
-
onFragmentSelect: () => {
|
|
212
|
-
selectionLayerUpdate({
|
|
213
|
-
start: f.start,
|
|
214
|
-
end: f.end,
|
|
215
|
-
name: f.name
|
|
216
|
-
});
|
|
217
|
-
updateSelectedFragment(f.Intentid);
|
|
218
|
-
}
|
|
219
|
-
}))
|
|
220
|
-
],
|
|
221
|
-
overlappingEnzymes
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
)(DigestTool);
|
|
228
|
+
export default withEditorInteractions(DigestTool);
|
package/src/GlobalDialogUtils.js
CHANGED
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.reflex-layout > .reflex-splitter {
|
|
37
|
-
background-color: #
|
|
37
|
+
background-color: #f1f1f1;
|
|
38
38
|
z-index: 100;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.reflex-layout > .reflex-splitter.active,
|
|
42
42
|
.reflex-layout > .reflex-splitter:hover {
|
|
43
|
-
background-color: #
|
|
43
|
+
background-color: #cccccc;
|
|
44
44
|
transition: all 1s ease;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.reflex-layout.horizontal > .reflex-splitter {
|
|
48
|
-
border-bottom: 1px solid #
|
|
49
|
-
border-top: 1px solid #
|
|
48
|
+
border-bottom: 1px solid #f1f1f1;
|
|
49
|
+
border-top: 1px solid #f1f1f1;
|
|
50
50
|
cursor: row-resize;
|
|
51
51
|
width: 100%;
|
|
52
52
|
height: 2px;
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
|
|
55
55
|
.reflex-layout.horizontal > .reflex-splitter:hover,
|
|
56
56
|
.reflex-layout.horizontal > .reflex-splitter.active {
|
|
57
|
-
border-bottom: 1px solid #
|
|
58
|
-
border-top: 1px solid #
|
|
57
|
+
border-bottom: 1px solid #cccccc;
|
|
58
|
+
border-top: 1px solid #cccccc;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.reflex-layout.vertical > .reflex-splitter {
|
|
62
|
-
border-right: 1px solid #
|
|
63
|
-
border-left: 1px solid #
|
|
62
|
+
border-right: 1px solid #f1f1f1;
|
|
63
|
+
border-left: 1px solid #f1f1f1;
|
|
64
64
|
cursor: col-resize;
|
|
65
65
|
height: 95%;
|
|
66
66
|
width: 2px;
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
|
|
74
74
|
.reflex-layout.vertical > .reflex-splitter:hover,
|
|
75
75
|
.reflex-layout.vertical > .reflex-splitter.active {
|
|
76
|
-
border-right: 1px solid #
|
|
77
|
-
border-left: 1px solid #
|
|
76
|
+
border-right: 1px solid #cccccc;
|
|
77
|
+
border-left: 1px solid #cccccc;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.reflex-layout > .reflex-splitter.reflex-thin {
|
|
@@ -26,10 +26,10 @@ export const CutsiteSelectionLayers = connectToEditor(
|
|
|
26
26
|
layer.start > -1 && (
|
|
27
27
|
<SelectionLayer
|
|
28
28
|
hideTitle
|
|
29
|
+
key={"restrictionSiteRange" + index}
|
|
29
30
|
{...annotationCommonProps}
|
|
30
31
|
{...{
|
|
31
32
|
id: cutsite.id,
|
|
32
|
-
key: "restrictionSiteRange" + index,
|
|
33
33
|
height: showReverseSequence ? sequenceHeight * 2 : sequenceHeight,
|
|
34
34
|
regions: [layer],
|
|
35
35
|
row: alignmentData
|
|
@@ -105,6 +105,7 @@ function SelectionLayer(props) {
|
|
|
105
105
|
caretSvgs = [
|
|
106
106
|
overlap.start === start && (
|
|
107
107
|
<Caret
|
|
108
|
+
key={key + "caret1"}
|
|
108
109
|
{...{
|
|
109
110
|
leftMargin,
|
|
110
111
|
onClick: _onClick || preventDefaultStopPropagation,
|
|
@@ -115,7 +116,6 @@ function SelectionLayer(props) {
|
|
|
115
116
|
getGaps,
|
|
116
117
|
isDraggable,
|
|
117
118
|
ignoreGaps,
|
|
118
|
-
key: key + "caret1",
|
|
119
119
|
sequenceLength,
|
|
120
120
|
className:
|
|
121
121
|
classNameToPass +
|
|
@@ -127,6 +127,7 @@ function SelectionLayer(props) {
|
|
|
127
127
|
),
|
|
128
128
|
overlap.end === end && (
|
|
129
129
|
<Caret
|
|
130
|
+
key={key + "caret2"}
|
|
130
131
|
{...{
|
|
131
132
|
leftMargin,
|
|
132
133
|
onClick: _onClick || preventDefaultStopPropagation,
|
|
@@ -137,7 +138,6 @@ function SelectionLayer(props) {
|
|
|
137
138
|
getGaps,
|
|
138
139
|
style: selectionLayer.style,
|
|
139
140
|
ignoreGaps,
|
|
140
|
-
key: key + "caret2",
|
|
141
141
|
sequenceLength,
|
|
142
142
|
className:
|
|
143
143
|
classNameToPass +
|
package/src/RowItem/Sequence.js
CHANGED
package/src/RowItem/index.js
CHANGED