@teselagen/ove 0.8.19 → 0.8.21
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/index.cjs.js +327 -45
- package/index.es.js +327 -45
- package/index.umd.js +327 -45
- package/ove.css +46 -0
- package/package.json +3 -3
- package/redux/temporaryAnnotations.d.ts +6 -0
- package/selectors/featuresSelector.d.ts +1 -1
- package/selectors/partsSelector.d.ts +1 -1
- package/selectors/primersSelector.d.ts +1 -1
- package/selectors/temporaryAnnotationsSelector.d.ts +2 -0
- package/src/StatusBar/MeltingTemp.js +16 -5
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +23 -11
- package/src/redux/index.js +3 -1
- package/src/redux/temporaryAnnotations.js +23 -0
- package/src/selectors/featuresSelector.js +8 -3
- package/src/selectors/partsSelector.js +9 -3
- package/src/selectors/primersSelector.js +9 -3
- package/src/selectors/temporaryAnnotationsSelector.js +1 -0
- package/src/updateEditor.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ove",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.21",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"@teselagen/file-utils": "0.3.20",
|
|
19
19
|
"@teselagen/range-utils": "0.3.13",
|
|
20
20
|
"@teselagen/react-list": "0.8.18",
|
|
21
|
-
"@teselagen/sequence-utils": "0.3.
|
|
22
|
-
"@teselagen/ui": "0.10.
|
|
21
|
+
"@teselagen/sequence-utils": "0.3.36",
|
|
22
|
+
"@teselagen/ui": "0.10.10",
|
|
23
23
|
"@use-gesture/react": "10.3.0",
|
|
24
24
|
"biomsa": "^0.2.4",
|
|
25
25
|
"classnames": "^2.3.2",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any) => any, {
|
|
1
|
+
declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any) => any, {
|
|
2
2
|
clearCache: () => void;
|
|
3
3
|
}> & {
|
|
4
4
|
clearCache: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any) => any, {
|
|
1
|
+
declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any) => any, {
|
|
2
2
|
clearCache: () => void;
|
|
3
3
|
}> & {
|
|
4
4
|
clearCache: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any) => any, {
|
|
1
|
+
declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any) => any, {
|
|
2
2
|
clearCache: () => void;
|
|
3
3
|
}> & {
|
|
4
4
|
clearCache: () => void;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Button, Icon, Popover, RadioGroup } from "@blueprintjs/core";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
calculateTm,
|
|
6
|
+
calculateNebTm,
|
|
7
|
+
calculateSantaLuciaTm
|
|
8
|
+
} from "@teselagen/sequence-utils";
|
|
5
9
|
|
|
6
10
|
import { isNumber, isString } from "lodash-es";
|
|
7
11
|
import { popoverOverflowModifiers } from "@teselagen/ui";
|
|
@@ -20,7 +24,13 @@ export default function MeltingTemp({
|
|
|
20
24
|
const [monovalentCationConc /* , setMonovalentCationConc */] =
|
|
21
25
|
React.useState(0.05);
|
|
22
26
|
const [tmType, setTmType] = useTmType();
|
|
23
|
-
let tm = (
|
|
27
|
+
let tm = (
|
|
28
|
+
tmType === "neb_tm"
|
|
29
|
+
? calculateNebTm
|
|
30
|
+
: tmType === "default"
|
|
31
|
+
? calculateSantaLuciaTm
|
|
32
|
+
: calculateTm
|
|
33
|
+
)(sequence, {
|
|
24
34
|
monovalentCationConc,
|
|
25
35
|
primerConc
|
|
26
36
|
});
|
|
@@ -47,8 +57,9 @@ export default function MeltingTemp({
|
|
|
47
57
|
<RadioGroup
|
|
48
58
|
label="Choose Tm Type:"
|
|
49
59
|
options={[
|
|
50
|
-
{ value: "default", label: "
|
|
51
|
-
{ value: "
|
|
60
|
+
{ value: "default", label: "Santa Lucia (Default)" },
|
|
61
|
+
{ value: "breslauer", label: "Breslauer" },
|
|
62
|
+
{ value: "neb_tm", label: "NEB Tm" }
|
|
52
63
|
]}
|
|
53
64
|
onChange={e => setTmType(e.target.value)}
|
|
54
65
|
selectedValue={tmType}
|
|
@@ -70,7 +81,7 @@ export default function MeltingTemp({
|
|
|
70
81
|
}
|
|
71
82
|
>
|
|
72
83
|
<React.Fragment>
|
|
73
|
-
<InnerWrapper>Melting Temp: {Number(tm) || 0}
|
|
84
|
+
<InnerWrapper>Melting Temp: {Number(tm) || 0}°C</InnerWrapper>
|
|
74
85
|
{hasWarning && (
|
|
75
86
|
<Icon
|
|
76
87
|
style={{ marginLeft: 5, marginRight: 5 }}
|
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
} from "@teselagen/ui";
|
|
9
9
|
import {
|
|
10
10
|
filterSequenceString,
|
|
11
|
-
getReverseComplementSequenceString
|
|
11
|
+
getReverseComplementSequenceString,
|
|
12
|
+
calculatePercentGC,
|
|
13
|
+
calculateEndStability
|
|
12
14
|
} from "@teselagen/sequence-utils";
|
|
13
15
|
|
|
14
16
|
import AddOrEditAnnotationDialog from "../AddOrEditAnnotationDialog";
|
|
@@ -294,15 +296,34 @@ const RenderBases = props => {
|
|
|
294
296
|
</AdvancedOptions>
|
|
295
297
|
|
|
296
298
|
<MeltingTemp
|
|
297
|
-
InnerWrapper={
|
|
299
|
+
InnerWrapper={TextInnerWrapper}
|
|
298
300
|
sequence={bases}
|
|
299
301
|
></MeltingTemp>
|
|
302
|
+
<TextInnerWrapper>
|
|
303
|
+
GC content: {bases && calculatePercentGC(bases).toFixed(1)}%
|
|
304
|
+
</TextInnerWrapper>
|
|
305
|
+
<TextInnerWrapper>
|
|
306
|
+
3' Stability: {bases && calculateEndStability(bases)} kcal/mol
|
|
307
|
+
</TextInnerWrapper>
|
|
300
308
|
</div>
|
|
301
309
|
)}
|
|
302
310
|
</div>
|
|
303
311
|
);
|
|
304
312
|
};
|
|
305
313
|
|
|
314
|
+
const TextInnerWrapper = p => (
|
|
315
|
+
<div
|
|
316
|
+
className="bp3-text-muted bp3-text-small"
|
|
317
|
+
style={{
|
|
318
|
+
marginBottom: 15,
|
|
319
|
+
marginTop: -5,
|
|
320
|
+
fontStyle: "italic"
|
|
321
|
+
}}
|
|
322
|
+
>
|
|
323
|
+
{p.children}
|
|
324
|
+
</div>
|
|
325
|
+
);
|
|
326
|
+
|
|
306
327
|
export default AddOrEditAnnotationDialog({
|
|
307
328
|
formName: "AddOrEditPrimerDialog",
|
|
308
329
|
getProps: props => ({
|
|
@@ -311,12 +332,3 @@ export default AddOrEditAnnotationDialog({
|
|
|
311
332
|
RenderBases
|
|
312
333
|
})
|
|
313
334
|
});
|
|
314
|
-
|
|
315
|
-
const InnerWrapperMeltingTemp = p => (
|
|
316
|
-
<div
|
|
317
|
-
className="bp3-text-muted bp3-text-small"
|
|
318
|
-
style={{ marginBottom: 15, marginTop: -5, fontStyle: "italic" }}
|
|
319
|
-
>
|
|
320
|
-
{p.children}
|
|
321
|
-
</div>
|
|
322
|
-
);
|
package/src/redux/index.js
CHANGED
|
@@ -34,6 +34,7 @@ import * as featureLengthsToHide from "./featureLengthsToHide";
|
|
|
34
34
|
import * as primerLengthsToHide from "./primerLengthsToHide";
|
|
35
35
|
import * as partLengthsToHide from "./partLengthsToHide";
|
|
36
36
|
import * as selectedPartTags from "./selectedPartTags";
|
|
37
|
+
import * as temporaryAnnotations from "./temporaryAnnotations";
|
|
37
38
|
import { combineReducers } from "redux";
|
|
38
39
|
import createAction from "./utils/createMetaAction";
|
|
39
40
|
export { default as vectorEditorMiddleware } from "./middleware";
|
|
@@ -72,7 +73,8 @@ const subReducers = {
|
|
|
72
73
|
partLengthsToHide,
|
|
73
74
|
primerLengthsToHide,
|
|
74
75
|
featureLengthsToHide,
|
|
75
|
-
selectedPartTags
|
|
76
|
+
selectedPartTags,
|
|
77
|
+
temporaryAnnotations
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
const vectorEditorInitialize = createAction("VECTOR_EDITOR_UPDATE");
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import createAction from "./utils/createMetaAction";
|
|
2
|
+
import createMergedDefaultStateReducer from "./utils/createMergedDefaultStateReducer";
|
|
3
|
+
|
|
4
|
+
export const updateTemporaryAnnotations = createAction(
|
|
5
|
+
"TEMPORARY_ANNOTATIONS_UPDATE"
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
export default createMergedDefaultStateReducer(
|
|
9
|
+
{
|
|
10
|
+
TEMPORARY_ANNOTATIONS_UPDATE: (state, payload) => {
|
|
11
|
+
return { ...state, ...payload };
|
|
12
|
+
},
|
|
13
|
+
VECTOR_EDITOR_UPDATE: (state, payload) => {
|
|
14
|
+
return { ...state, ...payload.temporaryAnnotations };
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
features: {},
|
|
19
|
+
primers: {},
|
|
20
|
+
parts: {},
|
|
21
|
+
selectionLayer: {}
|
|
22
|
+
}
|
|
23
|
+
);
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { createSelector } from "reselect";
|
|
2
2
|
import sequenceDataSelector from "./sequenceDataSelector";
|
|
3
|
+
import temporaryAnnotationsSelector from "./temporaryAnnotationsSelector";
|
|
3
4
|
|
|
4
|
-
function featuresRawSelector(sequenceData) {
|
|
5
|
-
return sequenceData.features;
|
|
5
|
+
function featuresRawSelector(sequenceData, temporaryAnnotations) {
|
|
6
|
+
return { ...sequenceData.features, ...temporaryAnnotations?.features };
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
export default createSelector(
|
|
9
|
+
export default createSelector(
|
|
10
|
+
sequenceDataSelector,
|
|
11
|
+
temporaryAnnotationsSelector,
|
|
12
|
+
featuresRawSelector
|
|
13
|
+
);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createSelector } from "reselect";
|
|
2
2
|
import sequenceDataSelector from "./sequenceDataSelector";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import temporaryAnnotationsSelector from "./temporaryAnnotationsSelector";
|
|
5
|
+
|
|
6
|
+
function partsRawSelector(sequenceData, temporaryAnnotations) {
|
|
7
|
+
return { ...sequenceData.parts, ...temporaryAnnotations?.parts };
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export default createSelector(
|
|
10
|
+
export default createSelector(
|
|
11
|
+
sequenceDataSelector,
|
|
12
|
+
temporaryAnnotationsSelector,
|
|
13
|
+
partsRawSelector
|
|
14
|
+
);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createSelector } from "reselect";
|
|
2
2
|
import sequenceDataSelector from "./sequenceDataSelector";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import temporaryAnnotationsSelector from "./temporaryAnnotationsSelector";
|
|
5
|
+
|
|
6
|
+
function primersRawSelector(sequenceData, temporaryAnnotations) {
|
|
7
|
+
return { ...sequenceData.primers, ...temporaryAnnotations?.primers };
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export default createSelector(
|
|
10
|
+
export default createSelector(
|
|
11
|
+
sequenceDataSelector,
|
|
12
|
+
temporaryAnnotationsSelector,
|
|
13
|
+
primersRawSelector
|
|
14
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default editor => editor.temporaryAnnotations;
|
package/src/updateEditor.js
CHANGED
|
@@ -14,7 +14,8 @@ export default function updateEditor(
|
|
|
14
14
|
annotationVisibility,
|
|
15
15
|
annotationsToSupport,
|
|
16
16
|
findTool,
|
|
17
|
-
justPassingPartialSeqData
|
|
17
|
+
justPassingPartialSeqData,
|
|
18
|
+
temporaryAnnotations
|
|
18
19
|
} = initialValues;
|
|
19
20
|
const currentEditor = store.getState().VectorEditor[editorName] || {};
|
|
20
21
|
const isAlreadyProteinEditor =
|
|
@@ -174,6 +175,9 @@ export default function updateEditor(
|
|
|
174
175
|
//if we have sequence data coming in make sure to tidy it up for the user :)
|
|
175
176
|
annotationsAsObjects: true
|
|
176
177
|
})
|
|
178
|
+
}),
|
|
179
|
+
...(temporaryAnnotations && {
|
|
180
|
+
temporaryAnnotations
|
|
177
181
|
})
|
|
178
182
|
};
|
|
179
183
|
}
|