@teselagen/ove 0.3.10 → 0.3.12
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.js +453 -319
- package/index.mjs +453 -319
- package/index.umd.js +397 -287
- package/package.json +2 -2
- package/src/AlignmentView/AlignmentVisibilityTool.js +1 -1
- package/src/AlignmentView/EditTrackNameDialog.js +1 -5
- package/src/AlignmentView/HorizontalPanelDragHandle.js +2 -2
- package/src/AlignmentView/Minimap.js +12 -12
- package/src/AlignmentView/PairwiseAlignmentView.js +1 -1
- package/src/AlignmentView/getGapMap.js +1 -1
- package/src/AlignmentView/getTrackFromEvent.js +1 -1
- package/src/AlignmentView/index.js +32 -37
- package/src/AutoAnnotate.js +48 -48
- package/src/CircularView/Cutsites.js +3 -3
- package/src/CircularView/Labels/index.js +7 -7
- package/src/CircularView/Labels/relaxLabels_DEPRECATED.js +5 -5
- package/src/CircularView/RotateCircularViewSlider.js +1 -1
- package/src/CircularView/SelectionLayer.js +2 -2
- package/src/CircularView/drawAnnotations.js +3 -3
- package/src/CircularView/getAngleForPositionMidpoint.js +1 -1
- package/src/CircularView/index.d.ts +11 -11
- package/src/CircularView/index.js +9 -9
- package/src/CreateAnnotationsPage.js +7 -5
- package/src/CreateCustomEnzyme/index.js +1 -5
- package/src/CutsiteFilter/AdditionalCutsiteInfoDialog.js +11 -11
- package/src/CutsiteFilter/index.js +12 -12
- package/src/DigestTool/AddLaddersDialog.js +1 -1
- package/src/DigestTool/DigestTool.js +3 -3
- package/src/DigestTool/Ladder.js +8 -8
- package/src/DigestTool/ladderDefaults.js +1 -2
- package/src/Editor/CommandHotkeyHandler.js +1 -1
- package/src/Editor/DropHandler.js +2 -2
- package/src/Editor/index.js +14 -14
- package/src/Editor/userDefinedHandlersAndOpts.js +2 -0
- package/src/FindBar/index.js +6 -6
- package/src/GlobalDialogUtils.js +6 -0
- package/src/LinearView/ZoomLinearView.js +1 -1
- package/src/LinearView/index.js +7 -7
- package/src/MenuBar/index.js +1 -1
- package/src/MenuBar/viewSubmenu.js +1 -1
- package/src/PCRTool/PCRTool.js +19 -19
- package/src/Reflex/Browser.js +4 -5
- package/src/Reflex/ReflexContainer.js +3 -3
- package/src/Reflex/ReflexElement.js +2 -2
- package/src/RowItem/Axis.js +1 -1
- package/src/RowItem/Caret/index.js +1 -1
- package/src/RowItem/Chromatograms/Chromatogram.js +3 -3
- package/src/RowItem/CutsiteSelectionLayers.js +1 -1
- package/src/RowItem/Cutsites.js +1 -1
- package/src/RowItem/Labels.js +2 -2
- package/src/RowItem/Orfs.js +2 -2
- package/src/RowItem/Sequence.js +4 -4
- package/src/RowItem/StackedAnnotations/PointedAnnotation.js +3 -3
- package/src/RowItem/StackedAnnotations/getStructuredBases.js +1 -1
- package/src/RowItem/Translations/AASliver.js +71 -75
- package/src/RowItem/Translations/index.js +1 -1
- package/src/RowItem/getCutsiteLabelHeights.js +1 -1
- package/src/RowItem/index.js +14 -8
- package/src/RowView/estimateRowHeight.js +5 -5
- package/src/RowView/index.d.ts +7 -7
- package/src/RowView/index.js +11 -12
- package/src/SimpleCircularOrLinearView.js +6 -6
- package/src/StatusBar/MeltingTemp.js +3 -3
- package/src/ToolBar/ToolbarItem.js +2 -2
- package/src/ToolBar/alignmentTool.js +9 -9
- package/src/ToolBar/editTool.js +1 -1
- package/src/ToolBar/findTool.js +2 -2
- package/src/ToolBar/importTool.js +1 -1
- package/src/ToolBar/index.js +2 -2
- package/src/ToolBar/oligoTool.js +1 -1
- package/src/ToolBar/orfTool.js +1 -6
- package/src/ToolBar/printTool.js +2 -2
- package/src/ToolBar/visibilityTool.js +1 -1
- package/src/VersionHistoryView/index.js +2 -2
- package/src/commands/index.js +236 -230
- package/src/createVectorEditor/index.js +4 -4
- package/src/fileUtils.js +18 -18
- package/src/helperComponents/AddOrEditAnnotationDialog/index.js +22 -15
- package/src/helperComponents/AddOrEditFeatureDialog/index.js +2 -2
- package/src/helperComponents/AddOrEditPartDialog/index.js +2 -2
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +5 -5
- package/src/helperComponents/EnzymesDialog/index.js +17 -22
- package/src/helperComponents/GoToDialog.js +5 -1
- package/src/helperComponents/MergeFeaturesDialog/index.js +3 -3
- package/src/helperComponents/PinchHelper/PinchHelper.js +1 -1
- package/src/helperComponents/PrintDialog/index.js +4 -4
- package/src/helperComponents/PropertiesDialog/CutsiteProperties.js +3 -3
- package/src/helperComponents/PropertiesDialog/GenbankView.js +1 -1
- package/src/helperComponents/PropertiesDialog/GeneralProperties.js +5 -5
- package/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +136 -138
- package/src/helperComponents/PropertiesDialog/OrfProperties.js +3 -3
- package/src/helperComponents/PropertiesDialog/PrimerProperties.js +1 -1
- package/src/helperComponents/PropertiesDialog/TranslationProperties.js +2 -2
- package/src/helperComponents/PropertiesDialog/index.js +3 -3
- package/src/helperComponents/RemoveDuplicates/index.js +3 -3
- package/src/helperComponents/SelectDialog.js +3 -3
- package/src/helperComponents/UncontrolledSliderWithPlusMinusBtns.js +5 -5
- package/src/helperComponents/createSimpleDialog.js +1 -1
- package/src/helperComponents/partTagSearch.js +2 -5
- package/src/helperComponents/withHover.js +3 -3
- package/src/redux/alignments.js +6 -6
- package/src/redux/annotationVisibility.js +4 -4
- package/src/redux/featureLengthsToHide.js +1 -1
- package/src/redux/frameTranslations.js +3 -3
- package/src/redux/middleware.js +2 -2
- package/src/redux/panelsShown.js +19 -19
- package/src/redux/partLengthsToHide.js +1 -1
- package/src/redux/primerLengthsToHide.js +1 -1
- package/src/redux/readOnly.js +1 -4
- package/src/redux/selectionLayer.js +1 -1
- package/src/redux/sequenceData/features.js +1 -1
- package/src/redux/sequenceData/upsertDeleteActionGenerator.js +1 -1
- package/src/redux/sequenceDataHistory.js +5 -5
- package/src/redux/toolBar.js +2 -4
- package/src/redux/utils/createMetaAction.js +2 -2
- package/src/redux/versionHistory.js +1 -2
- package/src/selectors/annotationSearchSelector.js +4 -4
- package/src/selectors/circularSelector.js +1 -1
- package/src/selectors/cutsiteLabelColorSelector.js +1 -1
- package/src/selectors/filteredCutsitesSelector.js +6 -6
- package/src/selectors/filteredFeaturesSelector.js +4 -4
- package/src/selectors/filteredPartsSelector.js +5 -5
- package/src/selectors/filteredPrimersSelector.js +3 -3
- package/src/selectors/isEnzymeFilterAndSelector.js +1 -1
- package/src/selectors/orfsSelector.js +1 -1
- package/src/selectors/restrictionEnzymesSelector.js +2 -2
- package/src/selectors/searchLayersSelector.js +7 -7
- package/src/selectors/sequenceLengthSelector.js +1 -1
- package/src/selectors/sequenceSelector.js +1 -1
- package/src/selectors/tagsToBoldSelector.js +1 -1
- package/src/selectors/translationsSelector.js +7 -7
- package/src/updateEditor.js +1 -1
- package/src/utils/PassThrough.js +1 -1
- package/src/utils/addWrappedAddons.js +1 -1
- package/src/utils/annotationTypes.js +2 -2
- package/src/utils/combineReducersDontIgnoreKeys.js +1 -1
- package/src/utils/editorUtils.js +2 -2
- package/src/utils/massageTickSpacing.js +1 -1
- package/src/utils/onlyUpdateForKeysDeep.js +1 -1
- package/src/utils/pureNoFunc.js +1 -1
- package/src/utils/shouldRerender.js +1 -1
- package/src/utils/showFileDialog.js +6 -7
- package/src/utils/updateLabelsForInViewFeatures.js +1 -1
- package/src/utils/useAnnotationLimits.js +1 -1
- package/src/withEditorInteractions/Keyboard.js +2 -3
- package/src/withEditorInteractions/createSequenceInputPopup.js +4 -4
- package/src/withEditorInteractions/index.js +93 -55
- package/src/withEditorProps/index.js +40 -37
package/src/redux/middleware.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// }
|
|
19
19
|
// );
|
|
20
20
|
|
|
21
|
-
export default
|
|
21
|
+
export default store => next => action => {
|
|
22
22
|
if (action.meta && action.meta.disregardUndo) {
|
|
23
23
|
return next(action);
|
|
24
24
|
}
|
|
@@ -75,7 +75,7 @@ export default (store) => (next) => (action) => {
|
|
|
75
75
|
const OldVectorEditor = store.getState().VectorEditor;
|
|
76
76
|
const result = next(action);
|
|
77
77
|
const NewVectorEditor = store.getState().VectorEditor;
|
|
78
|
-
Object.keys(NewVectorEditor).forEach(
|
|
78
|
+
Object.keys(NewVectorEditor).forEach(editorName => {
|
|
79
79
|
const newEditorState = NewVectorEditor[editorName];
|
|
80
80
|
const oldEditorState = OldVectorEditor[editorName];
|
|
81
81
|
if (
|
package/src/redux/panelsShown.js
CHANGED
|
@@ -26,7 +26,7 @@ export const propertiesViewOpen = (unused, meta) => {
|
|
|
26
26
|
return setPanelAsActive("properties", meta);
|
|
27
27
|
};
|
|
28
28
|
export const createNewDigest = (unused, meta) => {
|
|
29
|
-
return
|
|
29
|
+
return dispatch => {
|
|
30
30
|
dispatch(
|
|
31
31
|
addPanelIfItDoesntAlreadyExist(
|
|
32
32
|
{
|
|
@@ -42,7 +42,7 @@ export const createNewDigest = (unused, meta) => {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
export const createNewPCR = (unused, meta) => {
|
|
45
|
-
return
|
|
45
|
+
return dispatch => {
|
|
46
46
|
dispatch(
|
|
47
47
|
addPanelIfItDoesntAlreadyExist(
|
|
48
48
|
{
|
|
@@ -59,7 +59,7 @@ export const createNewPCR = (unused, meta) => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
export const createNewAlignment = (payload, meta) => {
|
|
62
|
-
return
|
|
62
|
+
return dispatch => {
|
|
63
63
|
dispatch(
|
|
64
64
|
addPanelIfItDoesntAlreadyExist(
|
|
65
65
|
{
|
|
@@ -77,7 +77,7 @@ export const createNewAlignment = (payload, meta) => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
export const createNewMismatchesList = (payload, meta) => {
|
|
80
|
-
return
|
|
80
|
+
return dispatch => {
|
|
81
81
|
dispatch(
|
|
82
82
|
addPanelIfItDoesntAlreadyExist(
|
|
83
83
|
{
|
|
@@ -95,7 +95,7 @@ export const createNewMismatchesList = (payload, meta) => {
|
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
export const collapseSplitScreen = (activePanelId, meta) => {
|
|
98
|
-
return
|
|
98
|
+
return dispatch => {
|
|
99
99
|
dispatch(_collapseSplitScreen(activePanelId, meta));
|
|
100
100
|
activePanelId && dispatch(setPanelAsActive(activePanelId, meta));
|
|
101
101
|
};
|
|
@@ -108,7 +108,7 @@ export default createReducer(
|
|
|
108
108
|
{
|
|
109
109
|
[addPanelIfItDoesntAlreadyExist]: (state, panelToAdd) => {
|
|
110
110
|
if (
|
|
111
|
-
!state.some(
|
|
111
|
+
!state.some(panelGroup => {
|
|
112
112
|
return panelGroup.some(({ id }) => {
|
|
113
113
|
return id === panelToAdd.id;
|
|
114
114
|
});
|
|
@@ -122,11 +122,11 @@ export default createReducer(
|
|
|
122
122
|
return state;
|
|
123
123
|
},
|
|
124
124
|
[panelsShownUpdate]: (state, payload) => {
|
|
125
|
-
return payload.filter(
|
|
125
|
+
return payload.filter(group => group.length); //filter out any empty groups
|
|
126
126
|
},
|
|
127
127
|
[flipActiveTabFromLinearOrCircularIfNecessary]: (state, setCircActive) => {
|
|
128
|
-
const newState = immer(state,
|
|
129
|
-
s.forEach(
|
|
128
|
+
const newState = immer(state, s => {
|
|
129
|
+
s.forEach(g => {
|
|
130
130
|
flipActiveForGroup(g, setCircActive);
|
|
131
131
|
});
|
|
132
132
|
});
|
|
@@ -134,7 +134,7 @@ export default createReducer(
|
|
|
134
134
|
return newState;
|
|
135
135
|
},
|
|
136
136
|
[closePanel]: (state, idToClose) => {
|
|
137
|
-
const newState = state.map(
|
|
137
|
+
const newState = state.map(group => {
|
|
138
138
|
let indexToClose;
|
|
139
139
|
group.forEach(({ id }, i) => {
|
|
140
140
|
if (id === idToClose) indexToClose = i;
|
|
@@ -149,16 +149,16 @@ export default createReducer(
|
|
|
149
149
|
}
|
|
150
150
|
return group;
|
|
151
151
|
});
|
|
152
|
-
return newState.filter(
|
|
152
|
+
return newState.filter(group => group.length); //filter out any empty groups
|
|
153
153
|
},
|
|
154
|
-
[_collapseSplitScreen]:
|
|
154
|
+
[_collapseSplitScreen]: state => {
|
|
155
155
|
return [flatMap(state)];
|
|
156
156
|
},
|
|
157
157
|
[expandTabToSplitScreen]: (state, activePanelId) => {
|
|
158
158
|
let panelToMove;
|
|
159
159
|
return [
|
|
160
160
|
state[0]
|
|
161
|
-
.filter(
|
|
161
|
+
.filter(panel => {
|
|
162
162
|
if (panel.id === activePanelId) {
|
|
163
163
|
panelToMove = panel;
|
|
164
164
|
return false;
|
|
@@ -172,11 +172,11 @@ export default createReducer(
|
|
|
172
172
|
];
|
|
173
173
|
},
|
|
174
174
|
[setPanelAsActive]: (state, panelId) => {
|
|
175
|
-
return map(state,
|
|
175
|
+
return map(state, panelGroup => {
|
|
176
176
|
const isPanelInGroup = panelGroup.some(({ id }) => {
|
|
177
177
|
return panelId === id;
|
|
178
178
|
});
|
|
179
|
-
return panelGroup.map(
|
|
179
|
+
return panelGroup.map(panel => {
|
|
180
180
|
return {
|
|
181
181
|
...panel,
|
|
182
182
|
active:
|
|
@@ -190,11 +190,11 @@ export default createReducer(
|
|
|
190
190
|
});
|
|
191
191
|
},
|
|
192
192
|
[togglePanelFullScreen]: (state, panelId) => {
|
|
193
|
-
return map(state,
|
|
193
|
+
return map(state, panelGroup => {
|
|
194
194
|
const isPanelInGroup = panelGroup.some(({ id }) => {
|
|
195
195
|
return panelId === id;
|
|
196
196
|
});
|
|
197
|
-
return panelGroup.map(
|
|
197
|
+
return panelGroup.map(panel => {
|
|
198
198
|
return {
|
|
199
199
|
...panel,
|
|
200
200
|
active:
|
|
@@ -215,9 +215,9 @@ export default createReducer(
|
|
|
215
215
|
},
|
|
216
216
|
[collapsePanel]: (state, panelToCloseId) => {
|
|
217
217
|
return [
|
|
218
|
-
flatMap(state,
|
|
218
|
+
flatMap(state, panelGroup => {
|
|
219
219
|
return panelGroup;
|
|
220
|
-
}).map(
|
|
220
|
+
}).map(panel => {
|
|
221
221
|
if (panel.id === panelToCloseId) {
|
|
222
222
|
return {
|
|
223
223
|
...panel,
|
|
@@ -15,7 +15,7 @@ export default createMergedDefaultStateReducer(
|
|
|
15
15
|
[updatePartLengthsToHide]: (state, payload) => {
|
|
16
16
|
return { ...state, ...payload };
|
|
17
17
|
},
|
|
18
|
-
[togglePartLengthsToHide]:
|
|
18
|
+
[togglePartLengthsToHide]: state => {
|
|
19
19
|
return { ...state, enabled: !state["enabled"] };
|
|
20
20
|
}
|
|
21
21
|
},
|
|
@@ -19,7 +19,7 @@ export default createMergedDefaultStateReducer(
|
|
|
19
19
|
[updatePrimerLengthsToHide]: (state, payload) => {
|
|
20
20
|
return { ...state, ...payload };
|
|
21
21
|
},
|
|
22
|
-
[togglePrimerLengthsToHide]:
|
|
22
|
+
[togglePrimerLengthsToHide]: state => {
|
|
23
23
|
return { ...state, enabled: !state["enabled"] };
|
|
24
24
|
}
|
|
25
25
|
},
|
package/src/redux/readOnly.js
CHANGED
|
@@ -6,10 +6,7 @@ import { noop } from "lodash";
|
|
|
6
6
|
// ------------------------------------
|
|
7
7
|
// Actions
|
|
8
8
|
// ------------------------------------
|
|
9
|
-
export const toggleReadOnlyMode = createAction(
|
|
10
|
-
"TOGGLE_READ_ONLY_MODE",
|
|
11
|
-
noop
|
|
12
|
-
); //NOTE!!:: second argument sanitizes actions so no payload is passed
|
|
9
|
+
export const toggleReadOnlyMode = createAction("TOGGLE_READ_ONLY_MODE", noop); //NOTE!!:: second argument sanitizes actions so no payload is passed
|
|
13
10
|
export const updateReadOnlyMode = createAction("UPDATE_READ_ONLY_MODE");
|
|
14
11
|
|
|
15
12
|
// ------------------------------------
|
|
@@ -13,7 +13,7 @@ export const deleteFeature = createAction("DELETE_FEATURE");
|
|
|
13
13
|
// ------------------------------------
|
|
14
14
|
export default createReducer(
|
|
15
15
|
{
|
|
16
|
-
...upsertDeleteActionGenerator(upsertFeature, deleteFeature)
|
|
16
|
+
...upsertDeleteActionGenerator(upsertFeature, deleteFeature)
|
|
17
17
|
},
|
|
18
18
|
{}
|
|
19
19
|
);
|
|
@@ -18,21 +18,21 @@ export default createReducer(
|
|
|
18
18
|
return {
|
|
19
19
|
...state,
|
|
20
20
|
future: [],
|
|
21
|
-
past: [...(state.past||[]), payload]
|
|
21
|
+
past: [...(state.past || []), payload]
|
|
22
22
|
};
|
|
23
23
|
},
|
|
24
24
|
[veUndo]: (state, presentState) => {
|
|
25
25
|
return {
|
|
26
26
|
...state,
|
|
27
|
-
past: (state.past||[]).slice(0, -1),
|
|
28
|
-
future: (state.future||[]).concat(presentState)
|
|
27
|
+
past: (state.past || []).slice(0, -1),
|
|
28
|
+
future: (state.future || []).concat(presentState)
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
31
|
[veRedo]: (state, presentState) => {
|
|
32
32
|
return {
|
|
33
33
|
...state,
|
|
34
|
-
future: (state.future||[]).slice(0, -1),
|
|
35
|
-
past: (state.past||[]).concat(presentState)
|
|
34
|
+
future: (state.future || []).slice(0, -1),
|
|
35
|
+
past: (state.past || []).concat(presentState)
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
},
|
package/src/redux/toolBar.js
CHANGED
|
@@ -10,16 +10,14 @@ export const openToolbarItemUpdate = createAction("openToolbarItemUpdate");
|
|
|
10
10
|
// ------------------------------------
|
|
11
11
|
export default createMergedDefaultStateReducer(
|
|
12
12
|
{
|
|
13
|
-
|
|
14
13
|
[openToolbarItemUpdate]: (state, payload) => {
|
|
15
14
|
return {
|
|
16
15
|
...state,
|
|
17
16
|
openItem: payload
|
|
18
17
|
};
|
|
19
|
-
}
|
|
20
|
-
|
|
18
|
+
}
|
|
21
19
|
},
|
|
22
20
|
{
|
|
23
|
-
openItem: ""
|
|
21
|
+
openItem: ""
|
|
24
22
|
}
|
|
25
23
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createAction } from "redux-act";
|
|
2
2
|
|
|
3
|
-
//this makes it so we can call our actionCreator like:
|
|
3
|
+
//this makes it so we can call our actionCreator like:
|
|
4
4
|
//addFeature(myFeatureData, {editorName})
|
|
5
5
|
export default function createMetaAction(actionName, payloadHelper) {
|
|
6
|
-
return createAction(actionName, payloadHelper, function(unused, meta) {
|
|
6
|
+
return createAction(actionName, payloadHelper, function (unused, meta) {
|
|
7
7
|
return {
|
|
8
8
|
...meta,
|
|
9
9
|
editorName: meta.editorName
|
|
@@ -16,9 +16,8 @@ export const toggleViewVersionHistory = createAction(
|
|
|
16
16
|
// ------------------------------------
|
|
17
17
|
export default createReducer(
|
|
18
18
|
{
|
|
19
|
-
|
|
20
19
|
[toggleViewVersionHistory]: state => {
|
|
21
|
-
return {viewVersionHistory: !state.viewVersionHistory};
|
|
20
|
+
return { viewVersionHistory: !state.viewVersionHistory };
|
|
22
21
|
}
|
|
23
22
|
},
|
|
24
23
|
{
|
|
@@ -8,7 +8,7 @@ function annotationSearchSelector(isOpen, searchString, ...rest) {
|
|
|
8
8
|
}
|
|
9
9
|
return searchableTypes.map((type, i) => {
|
|
10
10
|
const annotations = rest[i];
|
|
11
|
-
return filter(annotations,
|
|
11
|
+
return filter(annotations, ann =>
|
|
12
12
|
ann.name
|
|
13
13
|
.toLowerCase()
|
|
14
14
|
.includes(searchString ? searchString.toLowerCase() : "")
|
|
@@ -17,8 +17,8 @@ function annotationSearchSelector(isOpen, searchString, ...rest) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export default createSelector(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
...searchableTypes.map(
|
|
20
|
+
state => state.findTool && state.findTool.isOpen,
|
|
21
|
+
state => state.findTool && state.findTool.searchText,
|
|
22
|
+
...searchableTypes.map(type => state => state.sequenceData[type]),
|
|
23
23
|
annotationSearchSelector
|
|
24
24
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSelector } from "reselect";
|
|
2
2
|
import sequenceDataSelector from "./sequenceDataSelector";
|
|
3
3
|
|
|
4
|
-
export default createSelector(sequenceDataSelector, function(sequenceData) {
|
|
4
|
+
export default createSelector(sequenceDataSelector, function (sequenceData) {
|
|
5
5
|
return sequenceData.cutsiteLabelColors;
|
|
6
6
|
});
|
|
@@ -27,7 +27,7 @@ export default createSelector(
|
|
|
27
27
|
let hasUserGroup;
|
|
28
28
|
let groupCount = 0;
|
|
29
29
|
//handle adding enzymes that are included in user created groups
|
|
30
|
-
filteredRestrictionEnzymes.forEach(
|
|
30
|
+
filteredRestrictionEnzymes.forEach(e => {
|
|
31
31
|
if (e.value.includes("__userCreatedGroup")) {
|
|
32
32
|
hasUserGroup = true;
|
|
33
33
|
const existingGroups = {
|
|
@@ -36,7 +36,7 @@ export default createSelector(
|
|
|
36
36
|
};
|
|
37
37
|
const enzymes =
|
|
38
38
|
existingGroups[e.value.replace("__userCreatedGroup", "")] || [];
|
|
39
|
-
const zs = flatMap(enzymes,
|
|
39
|
+
const zs = flatMap(enzymes, e => (e ? { value: e } : []));
|
|
40
40
|
filteredEnzymes = filteredEnzymes.concat(zs);
|
|
41
41
|
enzymesFromGroups = enzymesFromGroups.concat(zs);
|
|
42
42
|
groupCount += 1;
|
|
@@ -94,21 +94,21 @@ export default createSelector(
|
|
|
94
94
|
|
|
95
95
|
const enzymeCounts = {};
|
|
96
96
|
cutSiteList.forEach(
|
|
97
|
-
|
|
97
|
+
enzyme =>
|
|
98
98
|
(enzymeCounts[enzyme] = enzymeCounts[enzyme]
|
|
99
99
|
? enzymeCounts[enzyme] + 1
|
|
100
100
|
: 1)
|
|
101
101
|
);
|
|
102
102
|
|
|
103
103
|
const intersectionCutSites = [];
|
|
104
|
-
Object.keys(enzymeCounts).forEach(
|
|
104
|
+
Object.keys(enzymeCounts).forEach(key => {
|
|
105
105
|
if (enzymeCounts[key] === groupCount) intersectionCutSites.push(key);
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
returnVal.cutsiteIntersectionCount = intersectionCutSites.length;
|
|
109
109
|
|
|
110
110
|
const cutsbyname_AND = {};
|
|
111
|
-
intersectionCutSites.forEach(
|
|
111
|
+
intersectionCutSites.forEach(value => {
|
|
112
112
|
cutsbyname_AND[value] = cutsitesByName[value];
|
|
113
113
|
});
|
|
114
114
|
|
|
@@ -120,7 +120,7 @@ export default createSelector(
|
|
|
120
120
|
|
|
121
121
|
returnVal.cutsitesArray = flatmap(
|
|
122
122
|
returnVal.cutsitesByName,
|
|
123
|
-
|
|
123
|
+
cutsitesByNameArray => cutsitesByNameArray
|
|
124
124
|
);
|
|
125
125
|
returnVal.cutsitesById = returnVal.cutsitesArray.reduce(function (
|
|
126
126
|
obj,
|
|
@@ -11,7 +11,7 @@ function filteredFeaturesSelector(
|
|
|
11
11
|
featureTypesToHide,
|
|
12
12
|
lengthsToHide
|
|
13
13
|
) {
|
|
14
|
-
return omitBy(features,
|
|
14
|
+
return omitBy(features, ann => {
|
|
15
15
|
const hideIndividually = featureIndividualToHide[ann.id];
|
|
16
16
|
const hideFeaturesByType = featureTypesToHide[ann.type];
|
|
17
17
|
return (
|
|
@@ -25,8 +25,8 @@ function filteredFeaturesSelector(
|
|
|
25
25
|
export default createSelector(
|
|
26
26
|
featuresSelector,
|
|
27
27
|
sequenceLengthSelector,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
state => state.annotationVisibility.featureIndividualToHide,
|
|
29
|
+
state => state.annotationVisibility.featureTypesToHide,
|
|
30
|
+
state => state.featureLengthsToHide,
|
|
31
31
|
filteredFeaturesSelector
|
|
32
32
|
);
|
|
@@ -17,10 +17,10 @@ function filteredPartsSelector(
|
|
|
17
17
|
if (tagsToBold) {
|
|
18
18
|
const keyedTagsToBold = keyBy(tagsToBold, "value");
|
|
19
19
|
|
|
20
|
-
return map(parts || {},
|
|
20
|
+
return map(parts || {}, p => {
|
|
21
21
|
if (p.tags) {
|
|
22
22
|
if (
|
|
23
|
-
some(p.tags,
|
|
23
|
+
some(p.tags, tagId => {
|
|
24
24
|
return keyedTagsToBold[tagId];
|
|
25
25
|
})
|
|
26
26
|
) {
|
|
@@ -38,7 +38,7 @@ function filteredPartsSelector(
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const toRet = map(
|
|
41
|
-
omitBy(parts,
|
|
41
|
+
omitBy(parts, ann => {
|
|
42
42
|
const hideIndividually = partIndividualToHide[ann.id];
|
|
43
43
|
return (
|
|
44
44
|
hideAnnByLengthFilter(lengthsToHide, ann, seqLen) || hideIndividually
|
|
@@ -50,8 +50,8 @@ function filteredPartsSelector(
|
|
|
50
50
|
export default createSelector(
|
|
51
51
|
partsSelector,
|
|
52
52
|
sequenceLengthSelector,
|
|
53
|
-
|
|
53
|
+
state => state.annotationVisibility.partIndividualToHide,
|
|
54
54
|
tagsToBoldSelector,
|
|
55
|
-
|
|
55
|
+
state => state.partLengthsToHide,
|
|
56
56
|
filteredPartsSelector
|
|
57
57
|
);
|
|
@@ -10,7 +10,7 @@ function filteredPrimersSelector(
|
|
|
10
10
|
primerIndividualToHide,
|
|
11
11
|
lengthsToHide
|
|
12
12
|
) {
|
|
13
|
-
return omitBy(primers,
|
|
13
|
+
return omitBy(primers, ann => {
|
|
14
14
|
const hideIndividually = primerIndividualToHide[ann.id];
|
|
15
15
|
return (
|
|
16
16
|
hideAnnByLengthFilter(lengthsToHide, ann, seqLen) || hideIndividually
|
|
@@ -21,7 +21,7 @@ function filteredPrimersSelector(
|
|
|
21
21
|
export default createSelector(
|
|
22
22
|
primersSelector,
|
|
23
23
|
sequenceLengthSelector,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
state => state.annotationVisibility.primerIndividualToHide,
|
|
25
|
+
state => state.primerLengthsToHide,
|
|
26
26
|
filteredPrimersSelector
|
|
27
27
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default
|
|
1
|
+
export default state => state.restrictionEnzymes.isEnzymeFilterAnd;
|
|
@@ -13,8 +13,8 @@ export default createSelector(
|
|
|
13
13
|
() => localStorage.getItem("enzymeGroups"), //it should recompute if the enzyme groups change in localstorage
|
|
14
14
|
(defaultEnzymesByName, additionalEnzymes) => {
|
|
15
15
|
const enzymesFromGroups = {};
|
|
16
|
-
forEach(window.getExistingEnzymeGroups(),
|
|
17
|
-
forEach(group,
|
|
16
|
+
forEach(window.getExistingEnzymeGroups(), group => {
|
|
17
|
+
forEach(group, enzymeName => {
|
|
18
18
|
const enzyme = { ...aliasedEnzymesByName, ...additionalEnzymes }[
|
|
19
19
|
enzymeName.toLowerCase()
|
|
20
20
|
];
|
|
@@ -48,7 +48,7 @@ function searchLayersSelector(
|
|
|
48
48
|
}).sort(({ start }, { start: start2 }) => {
|
|
49
49
|
return start - start2;
|
|
50
50
|
});
|
|
51
|
-
return matches.map(
|
|
51
|
+
return matches.map(match => ({
|
|
52
52
|
...match,
|
|
53
53
|
forward: !match.bottomStrand,
|
|
54
54
|
className:
|
|
@@ -61,11 +61,11 @@ function searchLayersSelector(
|
|
|
61
61
|
export default createSelector(
|
|
62
62
|
sequenceSelector,
|
|
63
63
|
circularSelector,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
state => state.findTool && state.findTool.isOpen,
|
|
65
|
+
state => state.findTool && state.findTool.searchText,
|
|
66
|
+
state => state.findTool && state.findTool.ambiguousOrLiteral,
|
|
67
|
+
state => state.findTool && state.findTool.dnaOrAA,
|
|
68
|
+
state => state.sequenceData.isProtein,
|
|
69
|
+
state => state.sequenceData.proteinSequence,
|
|
70
70
|
searchLayersSelector
|
|
71
71
|
);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const tagsToBoldSelector =
|
|
1
|
+
const tagsToBoldSelector = state => state.selectedPartTags.parts;
|
|
2
2
|
export default tagsToBoldSelector;
|
|
@@ -124,14 +124,14 @@ export default createSelector(
|
|
|
124
124
|
translationSearchMatchesSelector,
|
|
125
125
|
sequenceSelector,
|
|
126
126
|
orfsSelector,
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
state => state.annotationVisibility.orfTranslations,
|
|
128
|
+
state => state.annotationVisibility.orfs,
|
|
129
129
|
cdsFeaturesSelector,
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
state => state.annotationVisibility.cdsFeatureTranslations,
|
|
131
|
+
state => state.annotationVisibility.features,
|
|
132
132
|
translationsRawSelector,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
state => state.frameTranslations,
|
|
134
|
+
state => state.sequenceData.isProtein,
|
|
135
|
+
state => state.sequenceData.proteinSequence,
|
|
136
136
|
translationsSelector
|
|
137
137
|
);
|
package/src/updateEditor.js
CHANGED
|
@@ -177,7 +177,7 @@ export default function updateEditor(
|
|
|
177
177
|
})
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
annotationTypes.forEach(
|
|
180
|
+
annotationTypes.forEach(t => {
|
|
181
181
|
if (Object.keys(sequenceData?.[t] || {}).length > 100) {
|
|
182
182
|
set(payload, `annotationLabelVisibility.${t}`, false);
|
|
183
183
|
}
|
package/src/utils/PassThrough.js
CHANGED
|
@@ -2,7 +2,7 @@ import { flatMap } from "lodash";
|
|
|
2
2
|
import { normalizePositionByRangeLength } from "@teselagen/range-utils";
|
|
3
3
|
|
|
4
4
|
export function addWrappedAddons(anns, seqLen) {
|
|
5
|
-
return flatMap(anns,
|
|
5
|
+
return flatMap(anns, ann => {
|
|
6
6
|
if (ann.overlapsSelf) {
|
|
7
7
|
return [
|
|
8
8
|
ann,
|
|
@@ -5,7 +5,7 @@ export const userDefinedTypes = [
|
|
|
5
5
|
"primers"
|
|
6
6
|
];
|
|
7
7
|
|
|
8
|
-
export const userDefinedTypesMap = userDefinedTypes.reduce(function(
|
|
8
|
+
export const userDefinedTypesMap = userDefinedTypes.reduce(function (
|
|
9
9
|
nextVal,
|
|
10
10
|
key
|
|
11
11
|
) {
|
|
@@ -22,7 +22,7 @@ export const userDefinedTypesMap = userDefinedTypes.reduce(function(
|
|
|
22
22
|
{});
|
|
23
23
|
|
|
24
24
|
export const derivedDataTypes = ["cutsites", "orfs"];
|
|
25
|
-
export const derivedDataTypesMap = derivedDataTypes.reduce(function(
|
|
25
|
+
export const derivedDataTypesMap = derivedDataTypes.reduce(function (
|
|
26
26
|
nextVal,
|
|
27
27
|
key
|
|
28
28
|
) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function combineReducersDontIgnoreKeys(reducers) {
|
|
2
|
-
return function(state = {}, action) {
|
|
2
|
+
return function (state = {}, action) {
|
|
3
3
|
const newState = Object.keys(reducers).reduce((acc, key) => {
|
|
4
4
|
acc[key] = reducers[key](state[key], action);
|
|
5
5
|
return acc;
|
package/src/utils/editorUtils.js
CHANGED
|
@@ -211,13 +211,13 @@ export function getStripedPattern({ color }) {
|
|
|
211
211
|
</pattern>
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
|
-
export const getEnzymeAliases =
|
|
214
|
+
export const getEnzymeAliases = enzyme => {
|
|
215
215
|
let lowerName = (enzyme.name && enzyme.name.toLowerCase()) || "";
|
|
216
216
|
if (typeof enzyme === "string") {
|
|
217
217
|
lowerName = enzyme.toLowerCase();
|
|
218
218
|
}
|
|
219
219
|
return filter(
|
|
220
220
|
(aliasedEnzymesByName[lowerName] || {}).aliases,
|
|
221
|
-
|
|
221
|
+
n => n.toLowerCase() !== lowerName //filter out current enzyme
|
|
222
222
|
);
|
|
223
223
|
};
|
|
@@ -22,7 +22,7 @@ const onlyUpdateForKeys = propKeys => {
|
|
|
22
22
|
export default onlyUpdateForKeys;
|
|
23
23
|
|
|
24
24
|
const isEq = (o1, o2) => {
|
|
25
|
-
const isEq = _.isEqualWith(o1, o2, function(val1, val2) {
|
|
25
|
+
const isEq = _.isEqualWith(o1, o2, function (val1, val2) {
|
|
26
26
|
if (_.isFunction(val1) && _.isFunction(val2)) {
|
|
27
27
|
return val1 === val2 || val1.toString() === val2.toString();
|
|
28
28
|
}
|