@teselagen/ove 0.7.28 → 0.7.30-beta.1
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/CreateAnnotationsPage.d.ts +4 -3
- package/README.md +1 -1
- package/fileUtils.d.ts +12 -0
- package/html2canvas.esm--JN4fLQL.js +7891 -0
- package/html2canvas.esm-B7d7VJmQ.cjs +7891 -0
- package/index.cjs.js +1305 -1121
- package/index.es.js +1305 -1121
- package/index.umd.js +189161 -0
- package/ove.css +17 -4
- package/package.json +5 -9
- package/redux/findTool.d.ts +1 -0
- package/selectors/searchLayersSelector.d.ts +1 -1
- package/src/AutoAnnotate.js +1 -1
- package/src/CreateAnnotationsPage.js +1 -2
- package/src/Editor/style.css +8 -3
- package/src/FindBar/index.js +32 -1
- package/src/RowItem/SelectionLayer/index.js +42 -4
- package/src/RowItem/SelectionLayer/style.css +8 -0
- package/src/fileUtils.js +103 -0
- package/src/helperComponents/PropertiesDialog/TranslationProperties.js +1 -1
- package/src/redux/findTool.js +9 -0
- package/src/selectors/searchLayersSelector.js +40 -2
- package/style.css +12098 -1
- package/AASliver.js +0 -187
- package/AddLaddersDialog.js +0 -82
- package/AdditionalCutsiteInfoDialog.js +0 -599
- package/AlignmentVisibilityTool.js +0 -105
- package/AnnotationContainerHolder.js +0 -20
- package/AnnotationPositioner.js +0 -27
- package/AutoAnnotate.js +0 -501
- package/AutoAnnotateBpMatchingDialog.js +0 -208
- package/Axis.js +0 -151
- package/AxisNumbers.js +0 -35
- package/Browser.js +0 -106
- package/Caret.js +0 -63
- package/Chromatogram.js +0 -293
- package/CircularDnaSequence.js +0 -73
- package/CircularZoomMinimap.js +0 -16
- package/ColorPicker.js +0 -30
- package/CommandHotkeyHandler.js +0 -44
- package/CreateAnnotationsPage.js +0 -98
- package/Cutsite.js +0 -18
- package/CutsiteProperties.js +0 -176
- package/CutsiteSelectionLayers.js +0 -47
- package/Cutsites.js +0 -271
- package/DeletionLayer.js +0 -28
- package/DropHandler.css +0 -21
- package/DropHandler.js +0 -64
- package/EditCaretPosition.js +0 -234
- package/EditTrackNameDialog.js +0 -30
- package/Feature.js +0 -83
- package/FeatureProperties.js +0 -6
- package/FillWindow.js +0 -47
- package/GenbankView.js +0 -74
- package/GeneralProperties.js +0 -117
- package/GenericAnnotationProperties.js +0 -406
- package/GlobalDialog.js +0 -73
- package/GlobalDialogUtils.js +0 -110
- package/GoToDialog.js +0 -25
- package/HorizontalPanelDragHandle.js +0 -35
- package/Keyboard.js +0 -85
- package/Labels.js +0 -327
- package/Ladder.css +0 -20
- package/Ladder.js +0 -303
- package/MeltingTemp.js +0 -85
- package/Menlo.ttf +0 -0
- package/Minimap.js +0 -515
- package/Mismatches.js +0 -134
- package/Monaco.ttf +0 -0
- package/MultipleSeqsDetectedOnImportDialog.js +0 -74
- package/Orf.js +0 -109
- package/OrfProperties.js +0 -117
- package/Orfs.js +0 -35
- package/PCRTool.js +0 -179
- package/PairwiseAlignmentView.js +0 -68
- package/Part.js +0 -34
- package/PartProperties.js +0 -9
- package/PassThrough.js +0 -3
- package/PerformantSelectionLayer.js +0 -32
- package/PinchHelper.js +0 -24
- package/PointedAnnotation.js +0 -347
- package/PositionAnnotationOnCircle.js +0 -26
- package/Primer.js +0 -41
- package/PrimerProperties.js +0 -19
- package/ReflexContainer.js +0 -802
- package/ReflexElement.js +0 -160
- package/ReflexEvents.js +0 -77
- package/ReflexSplitter.js +0 -205
- package/RenameSequenceDialog.js +0 -7
- package/RotateCircularViewSlider.js +0 -93
- package/SelectDialog.js +0 -150
- package/SequenceName.js +0 -15
- package/SimpleCircularOrLinearView.js +0 -381
- package/SimpleOligoPreview.js +0 -39
- package/SingleEnzymeCutsiteInfo.js +0 -139
- package/ToolbarItem.js +0 -192
- package/Translation.js +0 -198
- package/TranslationProperties.js +0 -149
- package/UncontrolledSliderWithPlusMinusBtns.css +0 -5
- package/UncontrolledSliderWithPlusMinusBtns.js +0 -134
- package/VeTopRightContainer.js +0 -12
- package/ZoomCircularViewSlider.js +0 -62
- package/ZoomLinearView.js +0 -47
- package/addAlignment.js +0 -6
- package/addMetaToActionCreators.js +0 -12
- package/addWrappedAddons.js +0 -20
- package/alignmentTool.js +0 -503
- package/alignments.js +0 -379
- package/annotationLabelVisibility.js +0 -2
- package/annotationSearchSelector.js +0 -24
- package/annotationTypes.js +0 -35
- package/annotationVisibility.js +0 -196
- package/annotationsToSupport.js +0 -104
- package/arrayToObjWithIds.js +0 -17
- package/arrayUtils.js +0 -19
- package/array_move.js +0 -10
- package/calculateTickMarkPositionsForGivenRange.js +0 -47
- package/caretPosition.js +0 -27
- package/cdsFeaturesSelector.js +0 -9
- package/charWidth.js +0 -22
- package/circular.js +0 -19
- package/circularSelector.js +0 -4
- package/clickAndDragUtils.js +0 -576
- package/coerceInitialValue.js +0 -7
- package/combineReducersDontIgnoreKeys.js +0 -12
- package/commandUtils.js +0 -20
- package/constants.js +0 -2
- package/copyOptions.js +0 -34
- package/createFragmentLines.js +0 -120
- package/createMergedDefaultStateReducer.js +0 -30
- package/createMetaAction.js +0 -12
- package/createSequenceInputPopup.js +0 -290
- package/createSequenceInputPopupStyle.css +0 -87
- package/createSimpleDialog.js +0 -89
- package/createYourOwnEnzyme.js +0 -39
- package/cutsiteLabelColorSelector.js +0 -6
- package/cutsiteTool.js +0 -88
- package/cutsitesByRangeSelector.js +0 -5
- package/cutsitesSelector.js +0 -61
- package/darkmode.css +0 -98
- package/defaultConfig.js +0 -150
- package/deletionLayers.js +0 -36
- package/description.js +0 -21
- package/digestTool.js +0 -34
- package/dnaToColor.js +0 -17
- package/downloadTool.js +0 -39
- package/draggableClassnames.js +0 -5
- package/drawAnnotations.js +0 -440
- package/drawDirectedPiePiece.js +0 -142
- package/editTool.js +0 -49
- package/editorSelector.js +0 -2
- package/editorUtils.js +0 -205
- package/estimateRowHeight.js +0 -184
- package/featureLengthsToHide.js +0 -27
- package/featureTool.js +0 -34
- package/features.js +0 -19
- package/featuresSelector.js +0 -8
- package/filteredCutsitesSelector.js +0 -136
- package/filteredFeaturesSelector.js +0 -32
- package/filteredPartsSelector.js +0 -57
- package/filteredPrimersSelector.js +0 -27
- package/filteredRestrictionEnzymesSelector.js +0 -1
- package/find.png +0 -0
- package/findTool.js +0 -79
- package/findToolConstants.js +0 -1
- package/frameTranslations.js +0 -52
- package/fullscreen.png +0 -0
- package/getAdditionalEnzymesSelector.js +0 -46
- package/getAngleForPositionMidpoint.js +0 -3
- package/getAnnotationClassnames.js +0 -12
- package/getAnnotationNameAndStartStopString.js +0 -61
- package/getBpsPerRow.js +0 -19
- package/getCutsiteLabelHeights.js +0 -56
- package/getGapMap.js +0 -12
- package/getGaps.js +0 -27
- package/getInternalLabel.js +0 -40
- package/getOveHotkeyDefs.js +0 -12
- package/getPairwiseOverviewLinearViewOptions.js +0 -38
- package/getRangeAnglesSpecial.js +0 -12
- package/getStructuredBases.js +0 -97
- package/getTrackFromEvent.js +0 -25
- package/getVisibleStartEnd.js +0 -7
- package/getXStartAndWidthFromNonCircularRange.js +0 -12
- package/getXStartAndWidthOfRangeWrtRow.js +0 -27
- package/getXStartAndWidthOfRowAnnotation.js +0 -19
- package/getYOffset.js +0 -15
- package/hoveredAnnotation.js +0 -24
- package/importTool.js +0 -27
- package/index.js +0 -71
- package/inlineFindTool.js +0 -38
- package/isElementInViewport.js +0 -29
- package/isEnzymeFilterAndSelector.js +0 -1
- package/isTargetWithinEl.js +0 -6
- package/labelLineIntensity.js +0 -25
- package/labelSize.js +0 -23
- package/ladderDefaults.js +0 -25
- package/lastSavedId.js +0 -20
- package/lineageLines.js +0 -11
- package/linear.png +0 -0
- package/makeStore.js +0 -34
- package/massageTickSpacing.js +0 -19
- package/materiallyAvailable.js +0 -19
- package/middleware.js +0 -112
- package/minimumOrfSize.js +0 -24
- package/minimumOrfSizeSelector.js +0 -2
- package/modalActions.js +0 -3
- package/moveCaret.js +0 -58
- package/name.js +0 -19
- package/normalizeAngle.js +0 -3
- package/normalizeAngleRange.js +0 -9
- package/oligoTool.js +0 -30
- package/onlyUpdateForKeysDeep.js +0 -31
- package/orfFrameToColorMap.js +0 -10
- package/orfTool.js +0 -136
- package/orfsSelector.js +0 -15
- package/panelsShown.js +0 -294
- package/partLengthsToHide.js +0 -23
- package/partOverhangs.js +0 -6
- package/partTagSearch.js +0 -69
- package/partTool.js +0 -45
- package/parts.js +0 -19
- package/partsSelector.js +0 -8
- package/pie.png +0 -0
- package/polarToSpecialCartesian.js +0 -7
- package/positionCutsites.js +0 -6
- package/prepareRowData.js +0 -64
- package/primerBases.js +0 -221
- package/primerLengthsToHide.js +0 -27
- package/primers.js +0 -19
- package/primersSelector.js +0 -8
- package/print.png +0 -0
- package/printTool.js +0 -31
- package/propertiesTool.js +0 -40
- package/proteinUtils.js +0 -3
- package/pureNoFunc.js +0 -18
- package/readOnly.js +0 -25
- package/redoTool.js +0 -30
- package/reflex-styles.css +0 -128
- package/reflex-styles.css.map +0 -9
- package/relaxLabelAngles.js +0 -157
- package/relaxLabels_DEPRECATED.js +0 -105
- package/replacementLayers.js +0 -36
- package/restrictionEnzymes.js +0 -52
- package/restrictionEnzymesSelector.js +0 -34
- package/rowviewContants.js +0 -3
- package/ruler.css +0 -89
- package/save.png +0 -0
- package/saveTool.js +0 -44
- package/searchLayersSelector.js +0 -71
- package/selectedAnnotations.js +0 -89
- package/selectedAnnotationsSelector.js +0 -1
- package/selectedCutsitesSelector.js +0 -21
- package/selectedPartTags.js +0 -21
- package/selectionLayer.js +0 -25
- package/sequence.js +0 -12
- package/sequenceDataHistory.js +0 -43
- package/sequenceDataSelector.js +0 -2
- package/sequenceLengthSelector.js +0 -5
- package/sequenceSelector.js +0 -4
- package/sharedActionCreators.js +0 -0
- package/shouldFlipText.js +0 -4
- package/shouldRerender.js +0 -27
- package/showFileDialog.js +0 -25
- package/showGCContent.js +0 -23
- package/show_cut_sites.png +0 -0
- package/show_features.png +0 -0
- package/show_orfs.png +0 -0
- package/show_primers.png +0 -0
- package/simpleDialog.css +0 -13
- package/specialCutsiteFilterOptions.js +0 -22
- package/tagsToBoldSelector.js +0 -2
- package/toggle_views.svg +0 -1
- package/toolBar.js +0 -23
- package/translationSearchMatchesSelector.js +0 -14
- package/translations.js +0 -20
- package/translationsRawSelector.js +0 -8
- package/translationsSelector.js +0 -137
- package/typeField.js +0 -24
- package/undoTool.js +0 -30
- package/updateEditor.js +0 -200
- package/updateLabelsForInViewFeatures.js +0 -55
- package/updateLabelsForInViewFeaturesCircView.js +0 -41
- package/updateTrackHelper.js +0 -58
- package/uppercaseSequenceMapFont.js +0 -25
- package/upsertDeleteActionGenerator.js +0 -31
- package/useAAColorType.js +0 -8
- package/useAdditionalOrfStartCodons.js +0 -24
- package/useAnnotationLimits.js +0 -42
- package/useChromatogramPrefs.js +0 -31
- package/useFormValue.js +0 -7
- package/useLadders.js +0 -6
- package/useMeltingTemp.js +0 -7
- package/useTmType.js +0 -10
- package/userDefinedHandlersAndOpts.js +0 -61
- package/utils.js +0 -37
- package/versionHistory.js +0 -26
- package/versionHistoryTool.js +0 -21
- package/viewSubmenu.js +0 -479
- package/visibilityTool.js +0 -39
- package/withHover.js +0 -113
- package/withRestrictionEnzymes.js +0 -15
package/moveCaret.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const handleMoves = {
|
|
2
|
-
moveCaretLeftOne: function ({ isProtein, selectionLayer, shiftHeld }) {
|
|
3
|
-
if (selectionLayer.start > -1 && !shiftHeld) {
|
|
4
|
-
return 0;
|
|
5
|
-
}
|
|
6
|
-
return isProtein ? -3 : -1;
|
|
7
|
-
},
|
|
8
|
-
moveCaretRightOne: function ({ isProtein, selectionLayer, shiftHeld }) {
|
|
9
|
-
if (selectionLayer.start > -1 && !shiftHeld) {
|
|
10
|
-
return 0;
|
|
11
|
-
}
|
|
12
|
-
return isProtein ? 3 : 1;
|
|
13
|
-
},
|
|
14
|
-
moveCaretUpARow: function ({ bpsPerRow }) {
|
|
15
|
-
return -bpsPerRow;
|
|
16
|
-
},
|
|
17
|
-
moveCaretDownARow: function ({ bpsPerRow }) {
|
|
18
|
-
return bpsPerRow;
|
|
19
|
-
},
|
|
20
|
-
moveCaretToEndOfRow: function ({ bpsPerRow, caretPosition }) {
|
|
21
|
-
return bpsPerRow - (caretPosition % bpsPerRow);
|
|
22
|
-
},
|
|
23
|
-
moveCaretToStartOfRow: function ({ bpsPerRow, caretPosition }) {
|
|
24
|
-
let moveBy = -caretPosition % bpsPerRow;
|
|
25
|
-
if (moveBy === 0) {
|
|
26
|
-
moveBy = -bpsPerRow;
|
|
27
|
-
}
|
|
28
|
-
return moveBy;
|
|
29
|
-
},
|
|
30
|
-
moveCaretToStartOfSequence: function ({ caretPosition }) {
|
|
31
|
-
return -caretPosition;
|
|
32
|
-
},
|
|
33
|
-
moveCaretToEndOfSequence: function ({ caretPosition, sequenceLength }) {
|
|
34
|
-
return sequenceLength - caretPosition;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
function moveCaret({
|
|
39
|
-
sequenceLength,
|
|
40
|
-
bpsPerRow,
|
|
41
|
-
caretPosition,
|
|
42
|
-
selectionLayer,
|
|
43
|
-
shiftHeld,
|
|
44
|
-
isProtein,
|
|
45
|
-
type
|
|
46
|
-
}) {
|
|
47
|
-
const moveBy = handleMoves[type]({
|
|
48
|
-
shiftHeld,
|
|
49
|
-
sequenceLength,
|
|
50
|
-
isProtein,
|
|
51
|
-
bpsPerRow,
|
|
52
|
-
caretPosition,
|
|
53
|
-
selectionLayer
|
|
54
|
-
});
|
|
55
|
-
return moveBy;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export default moveCaret;
|
package/name.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createReducer } from "redux-act";
|
|
2
|
-
import createAction from "../utils/createMetaAction";
|
|
3
|
-
|
|
4
|
-
// ------------------------------------
|
|
5
|
-
// Actions
|
|
6
|
-
// ------------------------------------
|
|
7
|
-
export const sequenceNameUpdate = createAction("sequenceNameUpdate");
|
|
8
|
-
|
|
9
|
-
// ------------------------------------
|
|
10
|
-
// Reducer
|
|
11
|
-
// ------------------------------------
|
|
12
|
-
export default createReducer(
|
|
13
|
-
{
|
|
14
|
-
[sequenceNameUpdate]: (state, payload) => {
|
|
15
|
-
return payload;
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"Untitled Sequence"
|
|
19
|
-
);
|
package/normalizeAngle.js
DELETED
package/normalizeAngleRange.js
DELETED
package/oligoTool.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@blueprintjs/core";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import ToolbarItem from "./ToolbarItem";
|
|
4
|
-
import { connectToEditor } from "../withEditorProps";
|
|
5
|
-
|
|
6
|
-
export default connectToEditor(editorState => {
|
|
7
|
-
return {
|
|
8
|
-
isHidden: editorState.sequenceData && editorState.sequenceData.isProtein,
|
|
9
|
-
|
|
10
|
-
toggled:
|
|
11
|
-
editorState.annotationVisibility &&
|
|
12
|
-
editorState.annotationVisibility.primers
|
|
13
|
-
};
|
|
14
|
-
})(({ toolbarItemProps, isHidden, toggled, annotationVisibilityToggle }) => {
|
|
15
|
-
return (
|
|
16
|
-
<ToolbarItem
|
|
17
|
-
{...{
|
|
18
|
-
Icon: <Icon icon="swap-horizontal" />,
|
|
19
|
-
onIconClick: function () {
|
|
20
|
-
annotationVisibilityToggle("primers");
|
|
21
|
-
},
|
|
22
|
-
isHidden,
|
|
23
|
-
toggled,
|
|
24
|
-
tooltip: "Show Primers",
|
|
25
|
-
tooltipToggled: "Hide Primers",
|
|
26
|
-
...toolbarItemProps
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
});
|
package/onlyUpdateForKeysDeep.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { pick } from "lodash-es";
|
|
2
|
-
import { shouldUpdate } from "recompose";
|
|
3
|
-
import { isEqualWith, isFunction } from "lodash-es";
|
|
4
|
-
|
|
5
|
-
// import deepEqual from "deep-equal";
|
|
6
|
-
|
|
7
|
-
const onlyUpdateForKeys = propKeys => {
|
|
8
|
-
const hoc = shouldUpdate((props, nextProps) => {
|
|
9
|
-
const a = !isEq(pick(nextProps, propKeys), pick(props, propKeys));
|
|
10
|
-
return a;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// if (process.env.NODE_ENV !== "production") {
|
|
14
|
-
// return BaseComponent =>
|
|
15
|
-
// setDisplayName(wrapDisplayName(BaseComponent, "onlyUpdateForKeys"))(
|
|
16
|
-
// hoc(BaseComponent)
|
|
17
|
-
// );
|
|
18
|
-
// }
|
|
19
|
-
return hoc;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default onlyUpdateForKeys;
|
|
23
|
-
|
|
24
|
-
const isEq = (o1, o2) => {
|
|
25
|
-
const isEq = isEqualWith(o1, o2, function (val1, val2) {
|
|
26
|
-
if (isFunction(val1) && isFunction(val2)) {
|
|
27
|
-
return val1 === val2 || val1.toString() === val2.toString();
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
return isEq;
|
|
31
|
-
};
|
package/orfFrameToColorMap.js
DELETED
package/orfTool.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@blueprintjs/core";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { orfIcon, CmdCheckbox, CmdDiv, InfoHelper } from "@teselagen/ui";
|
|
4
|
-
import ToolbarItem from "./ToolbarItem";
|
|
5
|
-
import { connectToEditor } from "../withEditorProps";
|
|
6
|
-
import withEditorProps from "../withEditorProps";
|
|
7
|
-
import getCommands from "../commands";
|
|
8
|
-
|
|
9
|
-
export default connectToEditor(
|
|
10
|
-
({ annotationVisibility = {}, toolBar = {} }) => {
|
|
11
|
-
return {
|
|
12
|
-
toggled: annotationVisibility.orfs,
|
|
13
|
-
isOpen: toolBar.openItem === "orfTool"
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
)(({ toolbarItemProps, toggled, annotationVisibilityToggle, isOpen }) => {
|
|
17
|
-
return (
|
|
18
|
-
<ToolbarItem
|
|
19
|
-
{...{
|
|
20
|
-
Icon: <Icon data-test="orfTool" icon={orfIcon} />,
|
|
21
|
-
onIconClick: function () {
|
|
22
|
-
annotationVisibilityToggle("orfs");
|
|
23
|
-
},
|
|
24
|
-
toggled,
|
|
25
|
-
tooltip: "Show Open Reading Frames",
|
|
26
|
-
tooltipToggled: "Hide Open Reading Frames",
|
|
27
|
-
Dropdown: OrfToolDropdown,
|
|
28
|
-
dropdowntooltip:
|
|
29
|
-
(!isOpen ? "Show" : "Hide") + " Open Reading Frame Options",
|
|
30
|
-
...toolbarItemProps
|
|
31
|
-
}}
|
|
32
|
-
/>
|
|
33
|
-
);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const OrfToolDropdown = withEditorProps(
|
|
37
|
-
class OrfDropdown extends React.Component {
|
|
38
|
-
constructor(props) {
|
|
39
|
-
super(props);
|
|
40
|
-
this.commands = getCommands(this);
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
return (
|
|
44
|
-
<div className="veToolbarOrfOptionsHolder">
|
|
45
|
-
<CmdCheckbox
|
|
46
|
-
prefix="Show "
|
|
47
|
-
cmd={this.commands.toggleOrfTranslations}
|
|
48
|
-
/>
|
|
49
|
-
<CmdCheckbox
|
|
50
|
-
prefix="Show "
|
|
51
|
-
cmd={this.commands.useGtgAndCtgAsStartCodons}
|
|
52
|
-
/>
|
|
53
|
-
<CmdDiv cmd={this.commands.minOrfSizeCmd} />
|
|
54
|
-
<div className="vespacer" />
|
|
55
|
-
|
|
56
|
-
<InfoHelper
|
|
57
|
-
displayToSide
|
|
58
|
-
content="To translate an arbitrary area, right click a selection."
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
// const OrfToolDropdown = withEditorProps(function({
|
|
66
|
-
// useAdditionalOrfStartCodons,
|
|
67
|
-
// useAdditionalOrfStartCodonsToggle,
|
|
68
|
-
// annotationVisibility,
|
|
69
|
-
// annotationVisibilityToggle,
|
|
70
|
-
// editorName
|
|
71
|
-
// }) {
|
|
72
|
-
// return (
|
|
73
|
-
// <div className="veToolbarOrfOptionsHolder">
|
|
74
|
-
// {/* <div className="vespacer" />
|
|
75
|
-
// <MinOrfSize editorName={editorName} />
|
|
76
|
-
// <Checkbox
|
|
77
|
-
// onChange={function() {
|
|
78
|
-
// annotationVisibilityToggle("orfTranslations");
|
|
79
|
-
// }}
|
|
80
|
-
// disabled={!annotationVisibility.orfs}
|
|
81
|
-
// checked={annotationVisibility.orfTranslations}
|
|
82
|
-
// label="Show translations for ORFs"
|
|
83
|
-
// />
|
|
84
|
-
// <Checkbox
|
|
85
|
-
// onChange={function() {
|
|
86
|
-
// annotationVisibilityToggle("cdsFeatureTranslations");
|
|
87
|
-
// }}
|
|
88
|
-
// checked={annotationVisibility.cdsFeatureTranslations}
|
|
89
|
-
// label="Show translations for CDS features"
|
|
90
|
-
// />
|
|
91
|
-
// <Checkbox
|
|
92
|
-
// onChange={useAdditionalOrfStartCodonsToggle}
|
|
93
|
-
// checked={useAdditionalOrfStartCodons}
|
|
94
|
-
// label="Use GTG and CTG as start codons"
|
|
95
|
-
// /> */}
|
|
96
|
-
// <div className="vespacer" />
|
|
97
|
-
|
|
98
|
-
// <InfoHelper
|
|
99
|
-
// displayToSide
|
|
100
|
-
// content="To translate an arbitrary area, right click a selection."
|
|
101
|
-
// />
|
|
102
|
-
// </div>
|
|
103
|
-
// );
|
|
104
|
-
// });
|
|
105
|
-
|
|
106
|
-
// export const MinOrfSize = connectToEditor(editorState => {
|
|
107
|
-
// return {
|
|
108
|
-
// sequenceLength: selectors.sequenceLengthSelector(editorState),
|
|
109
|
-
// minimumOrfSize: editorState.minimumOrfSize
|
|
110
|
-
// };
|
|
111
|
-
// })(
|
|
112
|
-
// ({
|
|
113
|
-
// minimumOrfSizeUpdate,
|
|
114
|
-
// sequenceLength,
|
|
115
|
-
// annotationVisibilityShow,
|
|
116
|
-
// minimumOrfSize
|
|
117
|
-
// }) => {
|
|
118
|
-
// return (
|
|
119
|
-
// <div data-test="min-orf-size" style={{ display: "flex" }}>
|
|
120
|
-
// Minimum ORF Size:
|
|
121
|
-
// <input
|
|
122
|
-
// type="number"
|
|
123
|
-
// className={classNames(Classes.INPUT, "minOrfSizeInput")}
|
|
124
|
-
// onChange={function(event) {
|
|
125
|
-
// let minimumOrfSize = parseInt(event.target.value, 10);
|
|
126
|
-
// if (!(minimumOrfSize > -1)) return;
|
|
127
|
-
// if (minimumOrfSize > sequenceLength) return;
|
|
128
|
-
// annotationVisibilityShow("orfs");
|
|
129
|
-
// minimumOrfSizeUpdate(minimumOrfSize);
|
|
130
|
-
// }}
|
|
131
|
-
// value={minimumOrfSize}
|
|
132
|
-
// />
|
|
133
|
-
// </div>
|
|
134
|
-
// );
|
|
135
|
-
// }
|
|
136
|
-
// );
|
package/orfsSelector.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import circularSelector from "./circularSelector";
|
|
2
|
-
import sequenceSelector from "./sequenceSelector";
|
|
3
|
-
import minimumOrfSizeSelector from "./minimumOrfSizeSelector";
|
|
4
|
-
import { findOrfsInPlasmid } from "@teselagen/sequence-utils";
|
|
5
|
-
import { createSelector } from "reselect";
|
|
6
|
-
|
|
7
|
-
export default createSelector(
|
|
8
|
-
sequenceSelector,
|
|
9
|
-
circularSelector,
|
|
10
|
-
minimumOrfSizeSelector,
|
|
11
|
-
state => state.useAdditionalOrfStartCodons,
|
|
12
|
-
findOrfsInPlasmid
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
//tiny
|
package/panelsShown.js
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import { map, flatMap } from "lodash-es";
|
|
2
|
-
import { createReducer } from "redux-act";
|
|
3
|
-
import createAction from "./utils/createMetaAction";
|
|
4
|
-
import { removeItem } from "../utils/arrayUtils";
|
|
5
|
-
import immer from "immer";
|
|
6
|
-
|
|
7
|
-
//manages which tab panels are shown in the editor
|
|
8
|
-
|
|
9
|
-
// ------------------------------------
|
|
10
|
-
// Actions
|
|
11
|
-
// ------------------------------------
|
|
12
|
-
export const panelsShownUpdate = createAction("PANELS_SHOWN_UPDATE");
|
|
13
|
-
export const addPanelIfItDoesntAlreadyExist = createAction(
|
|
14
|
-
"addPanelIfItDoesntAlreadyExist"
|
|
15
|
-
);
|
|
16
|
-
export const togglePanelFullScreen = createAction("togglePanelFullScreen");
|
|
17
|
-
export const collapsePanel = createAction("collapsePanel");
|
|
18
|
-
export const closePanel = createAction("closePanel");
|
|
19
|
-
export const _collapseSplitScreen = createAction("_collapseSplitScreen");
|
|
20
|
-
export const setPanelAsActive = createAction("setPanelAsActive");
|
|
21
|
-
export const flipActiveTabFromLinearOrCircularIfNecessary = createAction(
|
|
22
|
-
"flipActiveTabFromLinearOrCircularIfNecessary"
|
|
23
|
-
);
|
|
24
|
-
export const expandTabToSplitScreen = createAction("expandTabToSplitScreen");
|
|
25
|
-
export const propertiesViewOpen = (unused, meta) => {
|
|
26
|
-
return setPanelAsActive("properties", meta);
|
|
27
|
-
};
|
|
28
|
-
export const createNewDigest = (unused, meta) => {
|
|
29
|
-
return dispatch => {
|
|
30
|
-
dispatch(
|
|
31
|
-
addPanelIfItDoesntAlreadyExist(
|
|
32
|
-
{
|
|
33
|
-
id: "digestTool",
|
|
34
|
-
name: "New Digest",
|
|
35
|
-
active: true,
|
|
36
|
-
canClose: true
|
|
37
|
-
},
|
|
38
|
-
meta
|
|
39
|
-
)
|
|
40
|
-
);
|
|
41
|
-
dispatch(setPanelAsActive("digestTool", meta));
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export const createNewPCR = (unused, meta) => {
|
|
45
|
-
return dispatch => {
|
|
46
|
-
dispatch(
|
|
47
|
-
addPanelIfItDoesntAlreadyExist(
|
|
48
|
-
{
|
|
49
|
-
id: "pcrTool",
|
|
50
|
-
name: "New PCR",
|
|
51
|
-
active: true,
|
|
52
|
-
canClose: true
|
|
53
|
-
},
|
|
54
|
-
meta
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
dispatch(setPanelAsActive("pcrTool", meta));
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const createNewAlignment = (payload, meta) => {
|
|
62
|
-
return dispatch => {
|
|
63
|
-
dispatch(
|
|
64
|
-
addPanelIfItDoesntAlreadyExist(
|
|
65
|
-
{
|
|
66
|
-
type: "alignment",
|
|
67
|
-
name: "New Alignment",
|
|
68
|
-
active: true,
|
|
69
|
-
canClose: true,
|
|
70
|
-
...payload
|
|
71
|
-
},
|
|
72
|
-
meta
|
|
73
|
-
)
|
|
74
|
-
);
|
|
75
|
-
dispatch(setPanelAsActive(payload.id, meta));
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const createNewMismatchesList = (payload, meta) => {
|
|
80
|
-
return dispatch => {
|
|
81
|
-
dispatch(
|
|
82
|
-
addPanelIfItDoesntAlreadyExist(
|
|
83
|
-
{
|
|
84
|
-
type: "mismatches",
|
|
85
|
-
name: "Mismatches",
|
|
86
|
-
active: true,
|
|
87
|
-
canClose: true,
|
|
88
|
-
...payload
|
|
89
|
-
},
|
|
90
|
-
meta
|
|
91
|
-
)
|
|
92
|
-
);
|
|
93
|
-
dispatch(setPanelAsActive(payload.id, meta));
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const collapseSplitScreen = (activePanelId, meta) => {
|
|
98
|
-
return dispatch => {
|
|
99
|
-
dispatch(_collapseSplitScreen(activePanelId, meta));
|
|
100
|
-
activePanelId && dispatch(setPanelAsActive(activePanelId, meta));
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
// ------------------------------------
|
|
105
|
-
// Reducer
|
|
106
|
-
// ------------------------------------
|
|
107
|
-
const reducer = createReducer(
|
|
108
|
-
{
|
|
109
|
-
[addPanelIfItDoesntAlreadyExist]: (state, panelToAdd) => {
|
|
110
|
-
if (
|
|
111
|
-
!state.some(panelGroup => {
|
|
112
|
-
return panelGroup.some(({ id }) => {
|
|
113
|
-
return id === panelToAdd.id;
|
|
114
|
-
});
|
|
115
|
-
})
|
|
116
|
-
) {
|
|
117
|
-
return state.map((panelGroup, index) => {
|
|
118
|
-
if (index === 0) return [panelToAdd, ...panelGroup];
|
|
119
|
-
return panelGroup;
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
return state;
|
|
123
|
-
},
|
|
124
|
-
[panelsShownUpdate]: (state, payload) => {
|
|
125
|
-
return payload.filter(group => group.length); //filter out any empty groups
|
|
126
|
-
},
|
|
127
|
-
[flipActiveTabFromLinearOrCircularIfNecessary]: (state, setCircActive) => {
|
|
128
|
-
const newState = immer(state, s => {
|
|
129
|
-
s.forEach(g => {
|
|
130
|
-
flipActiveForGroup(g, setCircActive);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
return newState;
|
|
135
|
-
},
|
|
136
|
-
[closePanel]: (state, idToClose) => {
|
|
137
|
-
const newState = state.map(group => {
|
|
138
|
-
let indexToClose;
|
|
139
|
-
group.forEach(({ id }, i) => {
|
|
140
|
-
if (id === idToClose) indexToClose = i;
|
|
141
|
-
});
|
|
142
|
-
if (indexToClose > -1) {
|
|
143
|
-
const newPanels = removeItem(group, indexToClose);
|
|
144
|
-
let mostRecentIndex = 0;
|
|
145
|
-
newPanels.forEach(p => {
|
|
146
|
-
if (
|
|
147
|
-
(p.lastActive || 0) > (newPanels[mostRecentIndex].lastActive || 0)
|
|
148
|
-
) {
|
|
149
|
-
mostRecentIndex = newPanels.indexOf(p);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
return newPanels.map((tab, i) => {
|
|
154
|
-
if (i === mostRecentIndex) return { ...tab, active: true };
|
|
155
|
-
else {
|
|
156
|
-
return tab;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
return group;
|
|
161
|
-
});
|
|
162
|
-
return newState.filter(group => group.length); //filter out any empty groups
|
|
163
|
-
},
|
|
164
|
-
[_collapseSplitScreen]: state => {
|
|
165
|
-
return [flatMap(state)];
|
|
166
|
-
},
|
|
167
|
-
[expandTabToSplitScreen]: (state, activePanelId) => {
|
|
168
|
-
let panelToMove;
|
|
169
|
-
return [
|
|
170
|
-
state[0]
|
|
171
|
-
.filter(panel => {
|
|
172
|
-
if (panel.id === activePanelId) {
|
|
173
|
-
panelToMove = panel;
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
return true;
|
|
177
|
-
})
|
|
178
|
-
.map((panel, i) => {
|
|
179
|
-
return i === 0 ? { ...panel, active: true } : panel;
|
|
180
|
-
}),
|
|
181
|
-
[{ ...panelToMove, active: true }]
|
|
182
|
-
];
|
|
183
|
-
},
|
|
184
|
-
[setPanelAsActive]: (state, panelId) => {
|
|
185
|
-
return map(state, panelGroup => {
|
|
186
|
-
const isPanelInGroup = panelGroup.some(({ id }) => {
|
|
187
|
-
return panelId === id;
|
|
188
|
-
});
|
|
189
|
-
return panelGroup.map(panel => {
|
|
190
|
-
return {
|
|
191
|
-
...panel,
|
|
192
|
-
active:
|
|
193
|
-
panelId === panel.id
|
|
194
|
-
? true
|
|
195
|
-
: isPanelInGroup
|
|
196
|
-
? false
|
|
197
|
-
: panel.active
|
|
198
|
-
};
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
[togglePanelFullScreen]: (state, panelId) => {
|
|
203
|
-
return map(state, panelGroup => {
|
|
204
|
-
const isPanelInGroup = panelGroup.some(({ id }) => {
|
|
205
|
-
return panelId === id;
|
|
206
|
-
});
|
|
207
|
-
return panelGroup.map(panel => {
|
|
208
|
-
return {
|
|
209
|
-
...panel,
|
|
210
|
-
active:
|
|
211
|
-
panelId === panel.id
|
|
212
|
-
? true
|
|
213
|
-
: isPanelInGroup
|
|
214
|
-
? false
|
|
215
|
-
: panel.active,
|
|
216
|
-
fullScreen:
|
|
217
|
-
panelId === panel.id
|
|
218
|
-
? !panel.fullScreen
|
|
219
|
-
: isPanelInGroup
|
|
220
|
-
? false
|
|
221
|
-
: panel.fullScreen
|
|
222
|
-
};
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
},
|
|
226
|
-
[collapsePanel]: (state, panelToCloseId) => {
|
|
227
|
-
return [
|
|
228
|
-
flatMap(state, panelGroup => {
|
|
229
|
-
return panelGroup;
|
|
230
|
-
}).map(panel => {
|
|
231
|
-
if (panel.id === panelToCloseId) {
|
|
232
|
-
return {
|
|
233
|
-
...panel,
|
|
234
|
-
active: false
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
return panel;
|
|
238
|
-
})
|
|
239
|
-
];
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
[
|
|
243
|
-
[
|
|
244
|
-
{
|
|
245
|
-
id: "circular",
|
|
246
|
-
name: "Circular Map",
|
|
247
|
-
active: true
|
|
248
|
-
// canClose: true
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
id: "rail",
|
|
252
|
-
name: "Linear Map",
|
|
253
|
-
active: false
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
|
-
[
|
|
257
|
-
{
|
|
258
|
-
id: "sequence",
|
|
259
|
-
name: "Sequence Map",
|
|
260
|
-
active: true
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
id: "properties",
|
|
264
|
-
name: "Properties",
|
|
265
|
-
active: false
|
|
266
|
-
}
|
|
267
|
-
]
|
|
268
|
-
]
|
|
269
|
-
);
|
|
270
|
-
|
|
271
|
-
export default (state, action) => {
|
|
272
|
-
const nextState = reducer(state, action);
|
|
273
|
-
nextState.forEach(pg => {
|
|
274
|
-
pg.forEach(p => {
|
|
275
|
-
if (p.active) {
|
|
276
|
-
p.lastActive = Date.now();
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
return nextState;
|
|
281
|
-
};
|
|
282
|
-
function flipActiveForGroup(group, setCircActive) {
|
|
283
|
-
const activeTab = group.find(({ active }) => active);
|
|
284
|
-
if (activeTab?.id === (setCircActive ? "rail" : "circular")) {
|
|
285
|
-
//we're on the wrong tab type so check if the other tab is in
|
|
286
|
-
const newTabToActivate = group.find(
|
|
287
|
-
({ id }) => id === (setCircActive ? "circular" : "rail")
|
|
288
|
-
);
|
|
289
|
-
if (newTabToActivate) {
|
|
290
|
-
newTabToActivate.active = true;
|
|
291
|
-
activeTab.active = false;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
package/partLengthsToHide.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import createMergedDefaultStateReducer from "./utils/createMergedDefaultStateReducer";
|
|
2
|
-
import createAction from "./utils/createMetaAction";
|
|
3
|
-
|
|
4
|
-
// ------------------------------------
|
|
5
|
-
// Actions
|
|
6
|
-
// ------------------------------------
|
|
7
|
-
export const updatePartLengthsToHide = createAction("updatePartLengthsToHide");
|
|
8
|
-
export const togglePartLengthsToHide = createAction("togglePartLengthsToHide");
|
|
9
|
-
|
|
10
|
-
// ------------------------------------
|
|
11
|
-
// Reducer
|
|
12
|
-
// ------------------------------------
|
|
13
|
-
export default createMergedDefaultStateReducer(
|
|
14
|
-
{
|
|
15
|
-
[updatePartLengthsToHide]: (state, payload) => {
|
|
16
|
-
return { ...state, ...payload };
|
|
17
|
-
},
|
|
18
|
-
[togglePartLengthsToHide]: state => {
|
|
19
|
-
return { ...state, enabled: !state["enabled"] };
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{ enabled: false, min: 0, max: 800 }
|
|
23
|
-
);
|