@teselagen/ove 0.7.28 → 0.7.29
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 +1055 -996
- package/index.es.js +1055 -996
- package/index.umd.js +189036 -0
- package/ove.css +1 -1
- package/package.json +2 -6
- package/src/helperComponents/PropertiesDialog/TranslationProperties.js +1 -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/style.css +0 -10
- 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/typeField.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { getFeatureToColorMap } from "@teselagen/sequence-utils";
|
|
3
|
-
|
|
4
|
-
export const typeField = {
|
|
5
|
-
path: "type",
|
|
6
|
-
type: "string",
|
|
7
|
-
render: (name, { color }) => {
|
|
8
|
-
const colorToUse =
|
|
9
|
-
color || getFeatureToColorMap({ includeHidden: true })[name];
|
|
10
|
-
return (
|
|
11
|
-
<div style={{ display: "flex", alignItems: "center" }}>
|
|
12
|
-
<div
|
|
13
|
-
style={{
|
|
14
|
-
height: 20,
|
|
15
|
-
width: 20,
|
|
16
|
-
background: colorToUse,
|
|
17
|
-
marginRight: 3
|
|
18
|
-
}}
|
|
19
|
-
/>
|
|
20
|
-
{name}
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
};
|
package/undoTool.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Icon } from "@blueprintjs/core";
|
|
3
|
-
import ToolbarItem from "./ToolbarItem";
|
|
4
|
-
import { connectToEditor } from "../withEditorProps";
|
|
5
|
-
|
|
6
|
-
export default connectToEditor(editorState => {
|
|
7
|
-
return {
|
|
8
|
-
disabled: !(
|
|
9
|
-
editorState.sequenceDataHistory &&
|
|
10
|
-
editorState.sequenceDataHistory.past &&
|
|
11
|
-
editorState.sequenceDataHistory.past.length
|
|
12
|
-
)
|
|
13
|
-
};
|
|
14
|
-
})(({ toolbarItemProps, undo, disabled }) => {
|
|
15
|
-
return (
|
|
16
|
-
<ToolbarItem
|
|
17
|
-
{...{
|
|
18
|
-
Icon: <Icon data-test="veUndoTool" icon="undo" />,
|
|
19
|
-
disabled,
|
|
20
|
-
onIconClick: undo,
|
|
21
|
-
tooltip: (
|
|
22
|
-
<span>
|
|
23
|
-
Undo <span style={{ fontSize: 10 }}>(Cmd/Ctrl+Z)</span>
|
|
24
|
-
</span>
|
|
25
|
-
),
|
|
26
|
-
...toolbarItemProps
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
});
|
package/updateEditor.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { set } from "lodash-es";
|
|
2
|
-
import { tidyUpSequenceData } from "@teselagen/sequence-utils";
|
|
3
|
-
import { annotationTypes } from "@teselagen/sequence-utils";
|
|
4
|
-
|
|
5
|
-
export default function updateEditor(
|
|
6
|
-
store,
|
|
7
|
-
editorName,
|
|
8
|
-
initialValues = {},
|
|
9
|
-
extraMeta = {},
|
|
10
|
-
{ convertAnnotationsFromAAIndices } = {}
|
|
11
|
-
) {
|
|
12
|
-
const {
|
|
13
|
-
sequenceData,
|
|
14
|
-
annotationVisibility,
|
|
15
|
-
annotationsToSupport,
|
|
16
|
-
findTool,
|
|
17
|
-
justPassingPartialSeqData
|
|
18
|
-
} = initialValues;
|
|
19
|
-
const currentEditor = store.getState().VectorEditor[editorName] || {};
|
|
20
|
-
const isAlreadyProteinEditor =
|
|
21
|
-
currentEditor.sequenceData && currentEditor.sequenceData.isProtein;
|
|
22
|
-
const isAlreadyRnaEditor =
|
|
23
|
-
currentEditor.sequenceData && currentEditor.sequenceData.isRna;
|
|
24
|
-
const isAlreadyOligoEditor =
|
|
25
|
-
currentEditor.sequenceData && currentEditor.sequenceData.isOligo;
|
|
26
|
-
const reverseSequenceShouldBeUpdate =
|
|
27
|
-
currentEditor.sequenceData?.isSingleStrandedDNA !==
|
|
28
|
-
sequenceData?.isSingleStrandedDNA ||
|
|
29
|
-
currentEditor.sequenceData?.isDoubleStrandedRNA !==
|
|
30
|
-
sequenceData?.isDoubleStrandedRNA;
|
|
31
|
-
|
|
32
|
-
const isAlreadySpecialEditor =
|
|
33
|
-
isAlreadyProteinEditor ||
|
|
34
|
-
isAlreadyRnaEditor ||
|
|
35
|
-
isAlreadyOligoEditor ||
|
|
36
|
-
reverseSequenceShouldBeUpdate;
|
|
37
|
-
|
|
38
|
-
let toSpread = {};
|
|
39
|
-
let payload;
|
|
40
|
-
if (justPassingPartialSeqData) {
|
|
41
|
-
payload = {
|
|
42
|
-
sequenceData: tidyUpSequenceData(
|
|
43
|
-
{ ...currentEditor.sequenceData, ...sequenceData },
|
|
44
|
-
{
|
|
45
|
-
convertAnnotationsFromAAIndices,
|
|
46
|
-
//if we have sequence data coming in make sure to tidy it up for the user :)
|
|
47
|
-
annotationsAsObjects: true
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
};
|
|
51
|
-
} else {
|
|
52
|
-
if (sequenceData) {
|
|
53
|
-
const isDna =
|
|
54
|
-
!sequenceData.isOligo && !sequenceData.isRna && !sequenceData.isProtein;
|
|
55
|
-
if (sequenceData.isProtein && !isAlreadyProteinEditor) {
|
|
56
|
-
//we're editing a protein but haven't initialized the protein editor yet
|
|
57
|
-
toSpread = {
|
|
58
|
-
findTool: {
|
|
59
|
-
dnaOrAA: "AA",
|
|
60
|
-
...findTool //we spread this here to allow the user to override this .. if they must!
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
annotationVisibility: {
|
|
64
|
-
caret: true,
|
|
65
|
-
sequence: false,
|
|
66
|
-
reverseSequence: false,
|
|
67
|
-
cutsites: false,
|
|
68
|
-
translations: false,
|
|
69
|
-
aminoAcidNumbers: false,
|
|
70
|
-
primaryProteinSequence: true,
|
|
71
|
-
...annotationVisibility //we spread this here to allow the user to override this .. if they must!
|
|
72
|
-
},
|
|
73
|
-
annotationsToSupport: {
|
|
74
|
-
features: true,
|
|
75
|
-
translations: false,
|
|
76
|
-
primaryProteinSequence: true,
|
|
77
|
-
parts: true,
|
|
78
|
-
orfs: false,
|
|
79
|
-
cutsites: false,
|
|
80
|
-
primers: false,
|
|
81
|
-
...annotationsToSupport
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
} else if (sequenceData.isOligo && !isAlreadyOligoEditor) {
|
|
85
|
-
toSpread = {
|
|
86
|
-
findTool: {
|
|
87
|
-
dnaOrAA: "DNA",
|
|
88
|
-
...findTool //we spread this here to allow the user to override this .. if they must!
|
|
89
|
-
},
|
|
90
|
-
annotationVisibility: {
|
|
91
|
-
caret: true,
|
|
92
|
-
sequence: true,
|
|
93
|
-
cutsites: false,
|
|
94
|
-
reverseSequence: false,
|
|
95
|
-
translations: false,
|
|
96
|
-
aminoAcidNumbers: false,
|
|
97
|
-
primaryProteinSequence: false,
|
|
98
|
-
...annotationVisibility //we spread this here to allow the user to override this .. if they must!
|
|
99
|
-
},
|
|
100
|
-
annotationsToSupport: {
|
|
101
|
-
features: true,
|
|
102
|
-
translations: true,
|
|
103
|
-
primaryProteinSequence: false,
|
|
104
|
-
parts: true,
|
|
105
|
-
orfs: false,
|
|
106
|
-
cutsites: true,
|
|
107
|
-
primers: false,
|
|
108
|
-
...annotationsToSupport //we spread this here to allow the user to override this .. if they must!
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
} else if (sequenceData.isRna && !isAlreadyRnaEditor) {
|
|
112
|
-
toSpread = {
|
|
113
|
-
findTool: {
|
|
114
|
-
dnaOrAA: "DNA",
|
|
115
|
-
...findTool //we spread this here to allow the user to override this .. if they must!
|
|
116
|
-
},
|
|
117
|
-
annotationVisibility: {
|
|
118
|
-
caret: true,
|
|
119
|
-
sequence: true,
|
|
120
|
-
cutsites: false,
|
|
121
|
-
reverseSequence: Boolean(sequenceData?.isDoubleStrandedRNA),
|
|
122
|
-
translations: false,
|
|
123
|
-
aminoAcidNumbers: false,
|
|
124
|
-
primaryProteinSequence: false,
|
|
125
|
-
...annotationVisibility //we spread this here to allow the user to override this .. if they must!
|
|
126
|
-
},
|
|
127
|
-
annotationsToSupport: {
|
|
128
|
-
features: true,
|
|
129
|
-
translations: true,
|
|
130
|
-
primaryProteinSequence: false,
|
|
131
|
-
parts: true,
|
|
132
|
-
orfs: true,
|
|
133
|
-
cutsites: true,
|
|
134
|
-
primers: true,
|
|
135
|
-
...annotationsToSupport //we spread this here to allow the user to override this .. if they must!
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
} else if (isAlreadySpecialEditor && isDna) {
|
|
139
|
-
//we're editing dna but haven't initialized the dna editor yet
|
|
140
|
-
sequenceData.isProtein = false;
|
|
141
|
-
toSpread = {
|
|
142
|
-
findTool: {
|
|
143
|
-
dnaOrAA: "DNA",
|
|
144
|
-
...findTool //we spread this here to allow the user to override this .. if they must!
|
|
145
|
-
},
|
|
146
|
-
annotationVisibility: {
|
|
147
|
-
caret: true,
|
|
148
|
-
sequence: true,
|
|
149
|
-
reverseSequence: !sequenceData?.isSingleStrandedDNA,
|
|
150
|
-
translations: false,
|
|
151
|
-
aminoAcidNumbers: false,
|
|
152
|
-
primaryProteinSequence: false,
|
|
153
|
-
...annotationVisibility //we spread this here to allow the user to override this .. if they must!
|
|
154
|
-
},
|
|
155
|
-
annotationsToSupport: {
|
|
156
|
-
features: true,
|
|
157
|
-
translations: true,
|
|
158
|
-
primaryProteinSequence: false,
|
|
159
|
-
parts: true,
|
|
160
|
-
orfs: true,
|
|
161
|
-
cutsites: true,
|
|
162
|
-
primers: true,
|
|
163
|
-
...annotationsToSupport //we spread this here to allow the user to override this .. if they must!
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
payload = {
|
|
169
|
-
...initialValues,
|
|
170
|
-
...toSpread,
|
|
171
|
-
...(sequenceData && {
|
|
172
|
-
sequenceData: tidyUpSequenceData(sequenceData, {
|
|
173
|
-
convertAnnotationsFromAAIndices,
|
|
174
|
-
//if we have sequence data coming in make sure to tidy it up for the user :)
|
|
175
|
-
annotationsAsObjects: true
|
|
176
|
-
})
|
|
177
|
-
})
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
annotationTypes.forEach(t => {
|
|
181
|
-
if (Object.keys(sequenceData?.[t] || {}).length > 100) {
|
|
182
|
-
set(payload, `annotationLabelVisibility.${t}`, false);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
if (sequenceData && sequenceData.size > 20000) {
|
|
186
|
-
set(payload, "annotationVisibility.translations", false);
|
|
187
|
-
set(payload, "annotationVisibility.cutsites", false);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
store.dispatch({
|
|
191
|
-
type: "VECTOR_EDITOR_UPDATE",
|
|
192
|
-
payload,
|
|
193
|
-
meta: {
|
|
194
|
-
mergeStateDeep: true,
|
|
195
|
-
editorName,
|
|
196
|
-
disregardUndo: true,
|
|
197
|
-
...extraMeta
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isElWithinAnotherEl,
|
|
3
|
-
isElWithinAnotherElWithDiff
|
|
4
|
-
} from "../withEditorInteractions/isElementInViewport";
|
|
5
|
-
|
|
6
|
-
export function updateLabelsForInViewFeatures({
|
|
7
|
-
rectElement = ".veLinearView"
|
|
8
|
-
} = {}) {
|
|
9
|
-
const feats = Array.from(
|
|
10
|
-
document.querySelectorAll(`.veLinearView .veRowViewFeature`)
|
|
11
|
-
);
|
|
12
|
-
const parts = Array.from(
|
|
13
|
-
document.querySelectorAll(`.veLinearView .veRowViewPart`)
|
|
14
|
-
);
|
|
15
|
-
const primers = Array.from(
|
|
16
|
-
document.querySelectorAll(`.veLinearView .veRowViewPrimer`)
|
|
17
|
-
);
|
|
18
|
-
const els = [...feats, ...parts, ...primers];
|
|
19
|
-
const boundingRect = document
|
|
20
|
-
.querySelector(rectElement)
|
|
21
|
-
.getBoundingClientRect();
|
|
22
|
-
|
|
23
|
-
els.forEach(el => {
|
|
24
|
-
const elBounds = el.getBoundingClientRect();
|
|
25
|
-
const isElIn = isElWithinAnotherEl(elBounds, boundingRect);
|
|
26
|
-
|
|
27
|
-
if (isElIn) {
|
|
28
|
-
const label = el.querySelector(".veLabelText");
|
|
29
|
-
if (!label) return;
|
|
30
|
-
const labelBounds = label.getBoundingClientRect();
|
|
31
|
-
const [isLabelIn, diff] = isElWithinAnotherElWithDiff(labelBounds, {
|
|
32
|
-
left: Math.max(boundingRect.left, elBounds.left),
|
|
33
|
-
right: Math.min(boundingRect.right, elBounds.right)
|
|
34
|
-
});
|
|
35
|
-
if (!isLabelIn) {
|
|
36
|
-
const l = window.getComputedStyle(label, null),
|
|
37
|
-
t = l.getPropertyValue("transform");
|
|
38
|
-
|
|
39
|
-
// If t return other than "none"
|
|
40
|
-
// Split content into several value
|
|
41
|
-
// The fourth one is the translateX value
|
|
42
|
-
|
|
43
|
-
if (t !== "none") {
|
|
44
|
-
const v = t.split("(")[1],
|
|
45
|
-
// w = v.split(")")[0],
|
|
46
|
-
x = v.split(",");
|
|
47
|
-
|
|
48
|
-
const newX = Number(x[4]) + diff;
|
|
49
|
-
const newY = Number(x[5].replace(")", ""));
|
|
50
|
-
label.setAttribute("transform", `translate(${newX},${newY})`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// import {
|
|
2
|
-
// isElWithinAnotherEl,
|
|
3
|
-
// isElWithinAnotherElWithDiff
|
|
4
|
-
// } from "../withEditorInteractions/isElementInViewport";
|
|
5
|
-
|
|
6
|
-
// export function updateLabelsForInViewFeaturesCircView({
|
|
7
|
-
// rectElement = ".veCircularView",
|
|
8
|
-
// radius
|
|
9
|
-
// } = {}) {
|
|
10
|
-
// const feats = Array.from(
|
|
11
|
-
// document.querySelectorAll(`.veCircularView .veFeature`)
|
|
12
|
-
// );
|
|
13
|
-
// // const parts = Array.from(
|
|
14
|
-
// // document.querySelectorAll(`.veCircularView .vePart`)
|
|
15
|
-
// // );
|
|
16
|
-
// // const primers = Array.from(
|
|
17
|
-
// // document.querySelectorAll(`.veCircularView .vePrimer`)
|
|
18
|
-
// // );
|
|
19
|
-
// const els = [...feats];
|
|
20
|
-
// // const els = [...feats, ...parts, ...primers];
|
|
21
|
-
// const boundingRect = document
|
|
22
|
-
// .querySelector(rectElement)
|
|
23
|
-
// .getBoundingClientRect();
|
|
24
|
-
// els.forEach((el) => {
|
|
25
|
-
// // const elBounds = el.getBoundingClientRect();
|
|
26
|
-
// // const isElIn = isElWithinAnotherEl(elBounds, boundingRect);
|
|
27
|
-
// const label = el.querySelector(".veLabelText");
|
|
28
|
-
// if (!label) return;
|
|
29
|
-
// const labelBounds = label.getBoundingClientRect();
|
|
30
|
-
// const [isLabelIn, diff] = isElWithinAnotherElWithDiff(labelBounds, {
|
|
31
|
-
// left: Math.max(boundingRect.left, 0 /* elBounds.left */),
|
|
32
|
-
// right: Math.min(boundingRect.right, 0 /* elBounds.right */)
|
|
33
|
-
// });
|
|
34
|
-
// if (!isLabelIn) {
|
|
35
|
-
// label.setAttribute("transform", `rotate(-40)`);
|
|
36
|
-
// }
|
|
37
|
-
// // if (isElIn) {
|
|
38
|
-
|
|
39
|
-
// // }
|
|
40
|
-
// });
|
|
41
|
-
// }
|
package/updateTrackHelper.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { insertItem, removeItem } from "../utils/arrayUtils";
|
|
2
|
-
|
|
3
|
-
export function updateTrackHelper({
|
|
4
|
-
currentPairwiseAlignmentIndex,
|
|
5
|
-
pairwiseAlignments,
|
|
6
|
-
upsertAlignmentRun,
|
|
7
|
-
hasBeenTrimmed,
|
|
8
|
-
alignmentId,
|
|
9
|
-
alignmentTracks,
|
|
10
|
-
alignmentTrackIndex,
|
|
11
|
-
update
|
|
12
|
-
}) {
|
|
13
|
-
const updateATs = (atsToUse, alignmentTrackIndex) => {
|
|
14
|
-
const removed = removeItem(atsToUse, alignmentTrackIndex);
|
|
15
|
-
return insertItem(
|
|
16
|
-
removed,
|
|
17
|
-
{
|
|
18
|
-
...atsToUse[alignmentTrackIndex],
|
|
19
|
-
alignmentData: {
|
|
20
|
-
...atsToUse[alignmentTrackIndex].alignmentData,
|
|
21
|
-
...update
|
|
22
|
-
},
|
|
23
|
-
sequenceData: {
|
|
24
|
-
...atsToUse[alignmentTrackIndex].sequenceData,
|
|
25
|
-
...update
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
alignmentTrackIndex
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
upsertAlignmentRun({
|
|
33
|
-
id: alignmentId,
|
|
34
|
-
hasBeenTrimmed,
|
|
35
|
-
...(pairwiseAlignments
|
|
36
|
-
? {
|
|
37
|
-
pairwiseAlignments: pairwiseAlignments.map((ats, i) => {
|
|
38
|
-
if (alignmentTrackIndex === 0) {
|
|
39
|
-
return updateATs(ats, 0);
|
|
40
|
-
}
|
|
41
|
-
if (
|
|
42
|
-
currentPairwiseAlignmentIndex !== undefined
|
|
43
|
-
? currentPairwiseAlignmentIndex === i
|
|
44
|
-
: alignmentTrackIndex - 1 === i
|
|
45
|
-
) {
|
|
46
|
-
return updateATs(ats, 1);
|
|
47
|
-
}
|
|
48
|
-
return ats;
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
: {
|
|
52
|
-
alignmentTracks: updateATs(
|
|
53
|
-
alignmentTracks,
|
|
54
|
-
Number(alignmentTrackIndex)
|
|
55
|
-
)
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createReducer } from "redux-act";
|
|
2
|
-
|
|
3
|
-
//./caretPosition.js
|
|
4
|
-
import createAction from "./utils/createMetaAction";
|
|
5
|
-
// import createReducer from "./utils/createMergedDefaultStateReducer";
|
|
6
|
-
|
|
7
|
-
// ------------------------------------
|
|
8
|
-
// Actions
|
|
9
|
-
// ------------------------------------
|
|
10
|
-
export const updateSequenceCase = createAction("updateSequenceCase");
|
|
11
|
-
|
|
12
|
-
const newVal = window.localStorage.getItem("uppercaseSequenceMapFont");
|
|
13
|
-
|
|
14
|
-
// ------------------------------------
|
|
15
|
-
// Reducer
|
|
16
|
-
// ------------------------------------
|
|
17
|
-
export default createReducer(
|
|
18
|
-
{
|
|
19
|
-
[updateSequenceCase]: (state, payload) => {
|
|
20
|
-
localStorage.setItem("uppercaseSequenceMapFont", payload);
|
|
21
|
-
return payload;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
newVal || "noPreference" // noPreference || uppercase || lowercase
|
|
25
|
-
);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import omit from "lodash/omit";
|
|
2
|
-
import uuid from "shortid";
|
|
3
|
-
|
|
4
|
-
// ------------------------------------
|
|
5
|
-
// Reducer
|
|
6
|
-
// ------------------------------------
|
|
7
|
-
export default function upsertDeleteActionGenerator(
|
|
8
|
-
upsertAction,
|
|
9
|
-
deleteAction
|
|
10
|
-
) {
|
|
11
|
-
return {
|
|
12
|
-
[upsertAction]: (state, payload) => {
|
|
13
|
-
const idToUse = payload.id || uuid();
|
|
14
|
-
return {
|
|
15
|
-
...state,
|
|
16
|
-
[idToUse]: { ...(state[idToUse] || {}), ...payload, id: idToUse }
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
[deleteAction]: (state, payload) => {
|
|
20
|
-
let ids;
|
|
21
|
-
if (Array.isArray(payload)) {
|
|
22
|
-
ids = payload.map(val => {
|
|
23
|
-
return val.id || val;
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
ids = [payload.id || payload];
|
|
27
|
-
}
|
|
28
|
-
return omit(state, ids);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
package/useAAColorType.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//./caretPosition.js
|
|
2
|
-
import { createReducer } from "redux-act";
|
|
3
|
-
import createAction from "./utils/createMetaAction";
|
|
4
|
-
import { noop } from "lodash-es";
|
|
5
|
-
|
|
6
|
-
// ------------------------------------
|
|
7
|
-
// Actions
|
|
8
|
-
// ------------------------------------
|
|
9
|
-
export const useAdditionalOrfStartCodonsToggle = createAction(
|
|
10
|
-
"useAdditionalOrfStartCodonsToggle",
|
|
11
|
-
noop
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
// ------------------------------------
|
|
15
|
-
// Reducer
|
|
16
|
-
// ------------------------------------
|
|
17
|
-
export default createReducer(
|
|
18
|
-
{
|
|
19
|
-
[useAdditionalOrfStartCodonsToggle]: state => {
|
|
20
|
-
return !state;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
false
|
|
24
|
-
);
|
package/useAnnotationLimits.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MenuItem } from "@blueprintjs/core";
|
|
3
|
-
import tgUseLocalStorageState from "tg-use-local-storage-state";
|
|
4
|
-
|
|
5
|
-
const useAnnotationLimits = () =>
|
|
6
|
-
tgUseLocalStorageState("annotationLimits", {
|
|
7
|
-
defaultValue: {
|
|
8
|
-
features: 50,
|
|
9
|
-
parts: 50,
|
|
10
|
-
primers: 50,
|
|
11
|
-
warnings: 50,
|
|
12
|
-
assemblyPieces: 50,
|
|
13
|
-
lineageAnnotations: 50,
|
|
14
|
-
cutsites: 100
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
export default useAnnotationLimits;
|
|
18
|
-
|
|
19
|
-
export function LimitAnnotations({ type, ...rest }) {
|
|
20
|
-
const [limits = {}, setLimits] = useAnnotationLimits();
|
|
21
|
-
return (
|
|
22
|
-
<MenuItem icon="blank" shouldDismissPopover={false} {...rest}>
|
|
23
|
-
{[50, 100, 200, 400].map(n => (
|
|
24
|
-
<MenuItem
|
|
25
|
-
shouldDismissPopover={false}
|
|
26
|
-
icon={
|
|
27
|
-
(
|
|
28
|
-
!limits[type]
|
|
29
|
-
? n === 50 //if this hasn't been set yet, default it here
|
|
30
|
-
: limits[type] === n
|
|
31
|
-
)
|
|
32
|
-
? "small-tick"
|
|
33
|
-
: "blank"
|
|
34
|
-
}
|
|
35
|
-
key={n}
|
|
36
|
-
text={n}
|
|
37
|
-
onClick={() => setLimits({ ...limits, [type]: n })}
|
|
38
|
-
></MenuItem>
|
|
39
|
-
))}
|
|
40
|
-
</MenuItem>
|
|
41
|
-
);
|
|
42
|
-
}
|
package/useChromatogramPrefs.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MenuItem } from "@blueprintjs/core";
|
|
3
|
-
import tgUseLocalStorageState from "tg-use-local-storage-state";
|
|
4
|
-
|
|
5
|
-
const useShowChromQualScores = () => {
|
|
6
|
-
return tgUseLocalStorageState("showChromQualScores", { defaultValue: true });
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const ShowChromQualScoresMenu = () =>
|
|
10
|
-
function ShowChromQualScoresMenu(props) {
|
|
11
|
-
const [showChromQualScores, setShowChromQualScores] =
|
|
12
|
-
useShowChromQualScores();
|
|
13
|
-
return (
|
|
14
|
-
<MenuItem
|
|
15
|
-
{...props}
|
|
16
|
-
text="Show Quality Scores"
|
|
17
|
-
shouldDismissPopover={false}
|
|
18
|
-
onClick={() => {
|
|
19
|
-
setShowChromQualScores(!showChromQualScores);
|
|
20
|
-
}}
|
|
21
|
-
icon={showChromQualScores ? "small-tick" : "blank"}
|
|
22
|
-
></MenuItem>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
const chromatogramMenu = {
|
|
26
|
-
text: "Chromatogram (Quality Scores)",
|
|
27
|
-
cmd: "showChromQualScoresMenu",
|
|
28
|
-
component: ShowChromQualScoresMenu(),
|
|
29
|
-
shouldDismissPopover: false
|
|
30
|
-
};
|
|
31
|
-
export { chromatogramMenu, useShowChromQualScores };
|
package/useFormValue.js
DELETED
package/useLadders.js
DELETED
package/useMeltingTemp.js
DELETED
package/useTmType.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export const userDefinedHandlersAndOpts = [
|
|
2
|
-
"beforeReadOnlyChange",
|
|
3
|
-
"defaultLinkedOligoMessage",
|
|
4
|
-
"allowMultipleFeatureDirections",
|
|
5
|
-
"getAdditionalEditAnnotationComps",
|
|
6
|
-
"getAdditionalCreateOpts",
|
|
7
|
-
"getLinkedOligoLink",
|
|
8
|
-
"additionalTopRightToolbarButtons",
|
|
9
|
-
"getCustomAutoAnnotateList",
|
|
10
|
-
"allowPartsToOverlapSelf",
|
|
11
|
-
"allowPrimerBasesToBeEdited",
|
|
12
|
-
"truncateLabelsThatDoNotFit",
|
|
13
|
-
"smartCircViewLabelRender",
|
|
14
|
-
"onConfigureFeatureTypesClick",
|
|
15
|
-
"allPartTags",
|
|
16
|
-
"bpLimit",
|
|
17
|
-
"editTagsLink",
|
|
18
|
-
"readOnly",
|
|
19
|
-
"shouldAutosave",
|
|
20
|
-
"hideSingleImport",
|
|
21
|
-
"beforeAnnotationCreate",
|
|
22
|
-
"disableSetReadOnly",
|
|
23
|
-
"allowAnnotationEditLocking",
|
|
24
|
-
"disableBpEditing",
|
|
25
|
-
"massageCmds",
|
|
26
|
-
"showReadOnly",
|
|
27
|
-
"showCircularity",
|
|
28
|
-
"onHiddenEnzymeAdd",
|
|
29
|
-
"showMoleculeType",
|
|
30
|
-
"showAvailability",
|
|
31
|
-
"showCicularViewInternalLabels",
|
|
32
|
-
"showGCContentByDefault",
|
|
33
|
-
"GCDecimalDigits",
|
|
34
|
-
"onlyShowLabelsThatDoNotFit",
|
|
35
|
-
"fullscreenMode",
|
|
36
|
-
"maxAnnotationsToDisplay",
|
|
37
|
-
"onNew",
|
|
38
|
-
"onImport",
|
|
39
|
-
"onSave",
|
|
40
|
-
"onSaveAs",
|
|
41
|
-
"alwaysAllowSave",
|
|
42
|
-
"generatePng",
|
|
43
|
-
"onRename",
|
|
44
|
-
"getVersionList",
|
|
45
|
-
"getSequenceAtVersion",
|
|
46
|
-
"onDuplicate",
|
|
47
|
-
"onSelectionOrCaretChanged",
|
|
48
|
-
"beforeSequenceInsertOrDelete",
|
|
49
|
-
"enzymeManageOverride",
|
|
50
|
-
"enzymeGroupsOverride",
|
|
51
|
-
"additionalEnzymes",
|
|
52
|
-
"onDelete",
|
|
53
|
-
"onCopy",
|
|
54
|
-
"autoAnnotateFeatures",
|
|
55
|
-
"autoAnnotateParts",
|
|
56
|
-
"autoAnnotatePrimers",
|
|
57
|
-
"onCreateNewFromSubsequence",
|
|
58
|
-
"onPreviewModeFullscreenClose",
|
|
59
|
-
"onPaste",
|
|
60
|
-
"menuFilter"
|
|
61
|
-
];
|