@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/partTagSearch.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import withEditorProps from "../withEditorProps";
|
|
3
|
-
import { TgSelect, getKeyedTagsAndTagOptions } from "@teselagen/ui";
|
|
4
|
-
import { flatMap } from "lodash-es";
|
|
5
|
-
import { uniqBy } from "lodash-es";
|
|
6
|
-
|
|
7
|
-
export const PartTagSearch = withEditorProps(PartToolDropdown);
|
|
8
|
-
|
|
9
|
-
function PartToolDropdown({
|
|
10
|
-
sequenceData,
|
|
11
|
-
updateSelectedPartTags,
|
|
12
|
-
selectedPartTags,
|
|
13
|
-
allPartTags,
|
|
14
|
-
annotationVisibilityShow,
|
|
15
|
-
editTagsLink,
|
|
16
|
-
dontAutoOpen
|
|
17
|
-
}) {
|
|
18
|
-
if (!sequenceData) return <div>No Parts Present</div>;
|
|
19
|
-
const keyedTags = getKeyedTagsAndTagOptions(allPartTags);
|
|
20
|
-
|
|
21
|
-
// this is what keyedTags looks like:
|
|
22
|
-
// keyedTags = {
|
|
23
|
-
// '12:4': {label,value,id},
|
|
24
|
-
// '12:1': {label,value,id},
|
|
25
|
-
// '44': {label,value,id},
|
|
26
|
-
// }
|
|
27
|
-
|
|
28
|
-
const tags = uniqBy(
|
|
29
|
-
flatMap(sequenceData.parts, ({ tags }) => {
|
|
30
|
-
return flatMap(tags, t => {
|
|
31
|
-
const tag = keyedTags[t];
|
|
32
|
-
if (!tag) return [];
|
|
33
|
-
return tag;
|
|
34
|
-
});
|
|
35
|
-
}),
|
|
36
|
-
"value"
|
|
37
|
-
);
|
|
38
|
-
return (
|
|
39
|
-
<div style={{ width: "100%" }}>
|
|
40
|
-
<div>Search Parts By Tag: </div>
|
|
41
|
-
<div style={{ display: "flex" }}>
|
|
42
|
-
<TgSelect
|
|
43
|
-
value={selectedPartTags.parts}
|
|
44
|
-
onChange={(...args) => {
|
|
45
|
-
annotationVisibilityShow("parts");
|
|
46
|
-
updateSelectedPartTags(...args);
|
|
47
|
-
}}
|
|
48
|
-
isTagSelect
|
|
49
|
-
multi
|
|
50
|
-
popoverProps={{
|
|
51
|
-
usePortal: false,
|
|
52
|
-
modifiers: {
|
|
53
|
-
preventOverflow: { enabled: false },
|
|
54
|
-
hide: {
|
|
55
|
-
enabled: false
|
|
56
|
-
},
|
|
57
|
-
flip: {
|
|
58
|
-
boundariesElement: "viewport"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}}
|
|
62
|
-
options={tags}
|
|
63
|
-
autoOpen={!dontAutoOpen}
|
|
64
|
-
></TgSelect>
|
|
65
|
-
{editTagsLink || null}
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
}
|
package/partTool.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@blueprintjs/core";
|
|
2
|
-
// import { Checkbox, Button } from "@blueprintjs/core";
|
|
3
|
-
import React from "react";
|
|
4
|
-
// import { connect } from "react-redux";
|
|
5
|
-
// import { convertRangeTo1Based } from "@teselagen/range-utils";
|
|
6
|
-
//import { partIcon } from "@teselagen/ui";
|
|
7
|
-
import ToolbarItem from "./ToolbarItem";
|
|
8
|
-
import { connectToEditor } from "../withEditorProps";
|
|
9
|
-
import { PartTagSearch } from "../helperComponents/partTagSearch";
|
|
10
|
-
|
|
11
|
-
export default connectToEditor(
|
|
12
|
-
({ annotationVisibility = {}, toolBar = {} }) => {
|
|
13
|
-
return {
|
|
14
|
-
toggled: annotationVisibility.parts,
|
|
15
|
-
isOpen: toolBar.openItem === "partTool"
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
)(({
|
|
19
|
-
allPartTags,
|
|
20
|
-
editTagsLink,
|
|
21
|
-
toolbarItemProps,
|
|
22
|
-
toggled,
|
|
23
|
-
annotationVisibilityToggle,
|
|
24
|
-
isOpen
|
|
25
|
-
}) => {
|
|
26
|
-
return (
|
|
27
|
-
<ToolbarItem
|
|
28
|
-
{...{
|
|
29
|
-
Icon: <Icon icon="doughnut-chart" />,
|
|
30
|
-
onIconClick: function () {
|
|
31
|
-
annotationVisibilityToggle("parts");
|
|
32
|
-
},
|
|
33
|
-
toggled,
|
|
34
|
-
editTagsLink,
|
|
35
|
-
allPartTags,
|
|
36
|
-
tooltip: "Show parts",
|
|
37
|
-
tooltipToggled: "Hide parts",
|
|
38
|
-
noDropdownIcon: !allPartTags,
|
|
39
|
-
Dropdown: PartTagSearch,
|
|
40
|
-
dropdowntooltip: (!isOpen ? "Show" : "Hide") + " Part Options",
|
|
41
|
-
...toolbarItemProps
|
|
42
|
-
}}
|
|
43
|
-
/>
|
|
44
|
-
);
|
|
45
|
-
});
|
package/parts.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createReducer } from "redux-act";
|
|
2
|
-
import createAction from "../utils/createMetaAction";
|
|
3
|
-
import upsertDeleteActionGenerator from "./upsertDeleteActionGenerator";
|
|
4
|
-
|
|
5
|
-
// ------------------------------------
|
|
6
|
-
// Actions
|
|
7
|
-
// ------------------------------------
|
|
8
|
-
export const upsertPart = createAction("UPSERT_PART");
|
|
9
|
-
export const deletePart = createAction("DELETE_PART");
|
|
10
|
-
|
|
11
|
-
// ------------------------------------
|
|
12
|
-
// Reducer
|
|
13
|
-
// ------------------------------------
|
|
14
|
-
export default createReducer(
|
|
15
|
-
{
|
|
16
|
-
...upsertDeleteActionGenerator(upsertPart, deletePart)
|
|
17
|
-
},
|
|
18
|
-
{}
|
|
19
|
-
);
|
package/partsSelector.js
DELETED
package/pie.png
DELETED
|
Binary file
|
package/positionCutsites.js
DELETED
package/prepareRowData.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { mapAnnotationsToRows } from "@teselagen/sequence-utils";
|
|
2
|
-
import { annotationTypes } from "@teselagen/sequence-utils";
|
|
3
|
-
export default function prepareRowData(sequenceData, bpsPerRow) {
|
|
4
|
-
const sequenceLength = sequenceData.noSequence
|
|
5
|
-
? sequenceData.size
|
|
6
|
-
: sequenceData.sequence.length;
|
|
7
|
-
const totalRows = Math.ceil(sequenceLength / bpsPerRow) || 1; //this check makes sure there is always at least 1 row!
|
|
8
|
-
const rows = [];
|
|
9
|
-
const rowMap = {};
|
|
10
|
-
if (sequenceData.isProtein) {
|
|
11
|
-
rowMap.primaryProteinSequence = mapAnnotationsToRows(
|
|
12
|
-
[
|
|
13
|
-
{
|
|
14
|
-
id: "primaryProteinSequence",
|
|
15
|
-
forward: true,
|
|
16
|
-
start: 0,
|
|
17
|
-
end: sequenceLength - 1,
|
|
18
|
-
proteinSequence: sequenceData.proteinSequence,
|
|
19
|
-
aminoAcids: sequenceData.aminoAcidDataForEachBaseOfDNA
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
sequenceLength,
|
|
23
|
-
bpsPerRow
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
annotationTypes.forEach(function (type) {
|
|
27
|
-
rowMap[type] = mapAnnotationsToRows(
|
|
28
|
-
sequenceData[type],
|
|
29
|
-
sequenceLength,
|
|
30
|
-
bpsPerRow,
|
|
31
|
-
{ splitForwardReverse: type === "primers" }
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
for (let rowNumber = 0; rowNumber < totalRows; rowNumber++) {
|
|
36
|
-
const row = {};
|
|
37
|
-
row.rowNumber = rowNumber;
|
|
38
|
-
row.start = rowNumber * bpsPerRow;
|
|
39
|
-
row.end =
|
|
40
|
-
(rowNumber + 1) * bpsPerRow - 1 < sequenceLength
|
|
41
|
-
? (rowNumber + 1) * bpsPerRow - 1
|
|
42
|
-
: sequenceLength - 1;
|
|
43
|
-
if (row.end < 0) {
|
|
44
|
-
row.end = 0;
|
|
45
|
-
}
|
|
46
|
-
annotationTypes.forEach(function (type) {
|
|
47
|
-
row[type] = rowMap[type][rowNumber] || [];
|
|
48
|
-
});
|
|
49
|
-
if (sequenceData.isProtein) {
|
|
50
|
-
row.isProtein = true;
|
|
51
|
-
row.primaryProteinSequence =
|
|
52
|
-
rowMap.primaryProteinSequence &&
|
|
53
|
-
(rowMap.primaryProteinSequence[rowNumber] || []);
|
|
54
|
-
}
|
|
55
|
-
row.sequence = sequenceData.noSequence
|
|
56
|
-
? {
|
|
57
|
-
length: row.end + 1 - row.start
|
|
58
|
-
}
|
|
59
|
-
: sequenceData.sequence.slice(row.start, row.end + 1);
|
|
60
|
-
|
|
61
|
-
rows[rowNumber] = row;
|
|
62
|
-
}
|
|
63
|
-
return rows;
|
|
64
|
-
}
|
package/primerBases.js
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { map } from "lodash-es";
|
|
3
|
-
import { fudge2, realCharWidth } from "../constants";
|
|
4
|
-
import getYOffset from "../../CircularView/getYOffset";
|
|
5
|
-
import { getRangeLength } from "@teselagen/range-utils";
|
|
6
|
-
import { getStructuredBases } from "./getStructuredBases";
|
|
7
|
-
|
|
8
|
-
export function getBasesToShow({
|
|
9
|
-
hidePrimerBases,
|
|
10
|
-
annotation,
|
|
11
|
-
annotationRange,
|
|
12
|
-
charWidth,
|
|
13
|
-
bpsPerRow,
|
|
14
|
-
fullSequence,
|
|
15
|
-
iTree,
|
|
16
|
-
sequenceLength
|
|
17
|
-
}) {
|
|
18
|
-
if (hidePrimerBases) return {};
|
|
19
|
-
const basesToShow = {};
|
|
20
|
-
if (annotation && annotation.bases) {
|
|
21
|
-
const fudge = charWidth - realCharWidth;
|
|
22
|
-
const { forward, primerBindsOn } = annotation;
|
|
23
|
-
|
|
24
|
-
const { basesNoInsertsWithMetaData, inserts, aRange } = getStructuredBases({
|
|
25
|
-
...annotation,
|
|
26
|
-
fullSequence,
|
|
27
|
-
annotationRange,
|
|
28
|
-
sequenceLength
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
const annLen = getRangeLength(annotation, sequenceLength);
|
|
32
|
-
const aRangeLen = getRangeLength(annotationRange, sequenceLength);
|
|
33
|
-
const startOffset = annotationRange.start % bpsPerRow;
|
|
34
|
-
const endOffset = bpsPerRow - (annotationRange.end % bpsPerRow);
|
|
35
|
-
basesToShow.insertPaths = "";
|
|
36
|
-
basesToShow.insertTicks = "";
|
|
37
|
-
basesToShow.flipAnnotation = !forward;
|
|
38
|
-
basesToShow.extraHeight = 0;
|
|
39
|
-
const insertText = [];
|
|
40
|
-
const level1Height = -10;
|
|
41
|
-
const level2Height = 11;
|
|
42
|
-
inserts.forEach((i, n) => {
|
|
43
|
-
//loop thru all inserts
|
|
44
|
-
const indexToUse = forward ? i.index : annLen - i.index - 1;
|
|
45
|
-
if (
|
|
46
|
-
aRange.start - (primerBindsOn === "5prime" ? 1 : 0) <= indexToUse &&
|
|
47
|
-
aRange.end + (primerBindsOn === "5prime" ? 1 : 0) >= indexToUse
|
|
48
|
-
) {
|
|
49
|
-
//only draw if insert falls within the annotation range
|
|
50
|
-
let xStart = i.index - aRange.start - Math.ceil(0.5 * i.bases.length); //calculate initial xStart
|
|
51
|
-
let xEnd = i.index - aRange.start + Math.floor(0.5 * i.bases.length);
|
|
52
|
-
if (aRange.end + 3 < xEnd) {
|
|
53
|
-
xStart -= xEnd - aRange.end - 3;
|
|
54
|
-
xEnd -= xEnd - aRange.end - 3;
|
|
55
|
-
}
|
|
56
|
-
if (i.index === 0) {
|
|
57
|
-
//for the first chunk, try to make it hang off the end if possible
|
|
58
|
-
xStart -= xEnd - 1;
|
|
59
|
-
xEnd -= xEnd - 1;
|
|
60
|
-
}
|
|
61
|
-
const forwAnd3Prime = forward;
|
|
62
|
-
|
|
63
|
-
if (xStart < -(forwAnd3Prime ? startOffset : endOffset)) {
|
|
64
|
-
//if the xStart is going to fall off the row to the left, correct it by moving the xStart to the right
|
|
65
|
-
const offsetLeft =
|
|
66
|
-
-(forwAnd3Prime ? startOffset : endOffset) - xStart;
|
|
67
|
-
xStart += offsetLeft;
|
|
68
|
-
xEnd += offsetLeft;
|
|
69
|
-
} else if (
|
|
70
|
-
xEnd + (forwAnd3Prime ? startOffset : endOffset) >
|
|
71
|
-
bpsPerRow
|
|
72
|
-
) {
|
|
73
|
-
//if the xStart is going to fall off the row to the right, correct it by moving the xStart to the left
|
|
74
|
-
const offsetLeft =
|
|
75
|
-
bpsPerRow - xEnd - (forwAnd3Prime ? startOffset : endOffset);
|
|
76
|
-
xStart += offsetLeft;
|
|
77
|
-
xEnd += offsetLeft;
|
|
78
|
-
}
|
|
79
|
-
// use an interval tree to determine the level the primer insert should be on to not overlap with other inserts
|
|
80
|
-
const yOffset = getYOffset(iTree, xStart, xEnd);
|
|
81
|
-
iTree.insert(xStart, xEnd, {
|
|
82
|
-
//tnr: pass an initial level in the case that the underlying primer ranges themselves are overlapping
|
|
83
|
-
...annotationRange,
|
|
84
|
-
yOffset
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
basesToShow.extraHeight = Math.max(
|
|
88
|
-
basesToShow.extraHeight,
|
|
89
|
-
15 + yOffset * 20
|
|
90
|
-
);
|
|
91
|
-
const insertStart =
|
|
92
|
-
(indexToUse - (forward ? aRange.start : aRange.end)) *
|
|
93
|
-
(!forward && primerBindsOn === "5prime" ? -1 : 1);
|
|
94
|
-
basesToShow.insertPaths += getInsertPath({
|
|
95
|
-
xStart,
|
|
96
|
-
xEnd,
|
|
97
|
-
charWidth,
|
|
98
|
-
level: yOffset,
|
|
99
|
-
insertStart
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
if (indexToUse !== aRange.end + 1 && indexToUse !== -1) {
|
|
103
|
-
basesToShow.insertTicks += getInsertTick({
|
|
104
|
-
charWidth,
|
|
105
|
-
height: level2Height,
|
|
106
|
-
insertStart
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
const textLength = Math.max(
|
|
110
|
-
0,
|
|
111
|
-
charWidth * i.bases.length - fudge - fudge2
|
|
112
|
-
);
|
|
113
|
-
insertText.push(
|
|
114
|
-
<text
|
|
115
|
-
style={{ pointerEvents: "none" }}
|
|
116
|
-
data-insert-bases={i.bases}
|
|
117
|
-
className="ve-monospace-font tg-primer-bases-insert"
|
|
118
|
-
textLength={textLength}
|
|
119
|
-
transform={
|
|
120
|
-
forward
|
|
121
|
-
? ""
|
|
122
|
-
: `translate(${aRangeLen * charWidth},-5) scale(-1,-1) `
|
|
123
|
-
}
|
|
124
|
-
key={n}
|
|
125
|
-
x={
|
|
126
|
-
forward
|
|
127
|
-
? (xStart - 1) * charWidth + fudge
|
|
128
|
-
: xStart * charWidth - fudge / 2
|
|
129
|
-
}
|
|
130
|
-
y={level1Height - yOffset * 20 - (forward ? 0 : 5)}
|
|
131
|
-
>
|
|
132
|
-
{i.bases.split("").map((b, i) => (
|
|
133
|
-
<tspan
|
|
134
|
-
key={i}
|
|
135
|
-
rotate={forward ? 0 : 180}
|
|
136
|
-
className="tg-no-match-seq"
|
|
137
|
-
textLength={textLength}
|
|
138
|
-
>
|
|
139
|
-
{b}
|
|
140
|
-
</tspan>
|
|
141
|
-
))}
|
|
142
|
-
</text>
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
const textLength =
|
|
148
|
-
charWidth * basesNoInsertsWithMetaData.length - fudge - fudge2;
|
|
149
|
-
basesToShow.baseEl = (
|
|
150
|
-
<React.Fragment>
|
|
151
|
-
<text
|
|
152
|
-
{...{
|
|
153
|
-
textLength,
|
|
154
|
-
y: forward ? level2Height : -(basesToShow.extraHeight - 5),
|
|
155
|
-
x: forward ? fudge / 2 : fudge / 2 + 0.2 /* + diffLen * charWidth */
|
|
156
|
-
}}
|
|
157
|
-
style={{ pointerEvents: "none" }}
|
|
158
|
-
className="ve-monospace-font tg-primer-bases"
|
|
159
|
-
>
|
|
160
|
-
{map(
|
|
161
|
-
basesNoInsertsWithMetaData,
|
|
162
|
-
({ b, isMatch, isAmbiguousMatch }, i) => {
|
|
163
|
-
return (
|
|
164
|
-
<tspan
|
|
165
|
-
key={i}
|
|
166
|
-
className={
|
|
167
|
-
b === "&"
|
|
168
|
-
? "tg-no-show-seq"
|
|
169
|
-
: isMatch
|
|
170
|
-
? ""
|
|
171
|
-
: isAmbiguousMatch
|
|
172
|
-
? "tg-ambiguous-match-seq"
|
|
173
|
-
: "tg-no-match-seq"
|
|
174
|
-
}
|
|
175
|
-
textLength={textLength}
|
|
176
|
-
>
|
|
177
|
-
{b}
|
|
178
|
-
</tspan>
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
)}
|
|
182
|
-
</text>
|
|
183
|
-
{insertText}
|
|
184
|
-
</React.Fragment>
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
return basesToShow;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function getInsertTick({ insertStart, charWidth, height }) {
|
|
191
|
-
if (insertStart === 0) return "";
|
|
192
|
-
const insertLocation = insertStart * charWidth;
|
|
193
|
-
|
|
194
|
-
const jutUp = `
|
|
195
|
-
L ${insertLocation - 1},${height + 5}
|
|
196
|
-
L ${insertLocation - 1},${height - 4}
|
|
197
|
-
L ${insertLocation - 1},${height + 5}
|
|
198
|
-
`;
|
|
199
|
-
return jutUp;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function getInsertPath({ charWidth, xStart, xEnd, insertStart, level = 0 }) {
|
|
203
|
-
const insertLocation = insertStart * charWidth;
|
|
204
|
-
const insertHeight = 15;
|
|
205
|
-
const levelHeight = -5 - level * 20;
|
|
206
|
-
const leftX = (xStart - 1) * charWidth;
|
|
207
|
-
const rightX = (xEnd - 1) * charWidth;
|
|
208
|
-
|
|
209
|
-
const jutUp = `
|
|
210
|
-
L ${insertLocation - 6},${0}
|
|
211
|
-
L ${insertLocation - 6},${levelHeight}
|
|
212
|
-
L ${leftX},${levelHeight}
|
|
213
|
-
L ${leftX},${-insertHeight + levelHeight}
|
|
214
|
-
|
|
215
|
-
L ${rightX},${-insertHeight + levelHeight}
|
|
216
|
-
L ${rightX},${levelHeight}
|
|
217
|
-
L ${insertLocation + 4},${levelHeight}
|
|
218
|
-
L ${insertLocation + 4},${0}
|
|
219
|
-
`;
|
|
220
|
-
return jutUp;
|
|
221
|
-
}
|
package/primerLengthsToHide.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import createMergedDefaultStateReducer from "./utils/createMergedDefaultStateReducer";
|
|
2
|
-
import createAction from "./utils/createMetaAction";
|
|
3
|
-
|
|
4
|
-
// ------------------------------------
|
|
5
|
-
// Actions
|
|
6
|
-
// ------------------------------------
|
|
7
|
-
export const updatePrimerLengthsToHide = createAction(
|
|
8
|
-
"updatePrimerLengthsToHide"
|
|
9
|
-
);
|
|
10
|
-
export const togglePrimerLengthsToHide = createAction(
|
|
11
|
-
"togglePrimerLengthsToHide"
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
// ------------------------------------
|
|
15
|
-
// Reducer
|
|
16
|
-
// ------------------------------------
|
|
17
|
-
export default createMergedDefaultStateReducer(
|
|
18
|
-
{
|
|
19
|
-
[updatePrimerLengthsToHide]: (state, payload) => {
|
|
20
|
-
return { ...state, ...payload };
|
|
21
|
-
},
|
|
22
|
-
[togglePrimerLengthsToHide]: state => {
|
|
23
|
-
return { ...state, enabled: !state["enabled"] };
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{ enabled: false, min: 0, max: 40 }
|
|
27
|
-
);
|
package/primers.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createReducer } from "redux-act";
|
|
2
|
-
import createAction from "../utils/createMetaAction";
|
|
3
|
-
import upsertDeleteActionGenerator from "./upsertDeleteActionGenerator";
|
|
4
|
-
|
|
5
|
-
// ------------------------------------
|
|
6
|
-
// Actions
|
|
7
|
-
// ------------------------------------
|
|
8
|
-
export const upsertPrimer = createAction("UPSERT_PRIMER");
|
|
9
|
-
export const deletePrimer = createAction("DELETE_PRIMER");
|
|
10
|
-
|
|
11
|
-
// ------------------------------------
|
|
12
|
-
// Reducer
|
|
13
|
-
// ------------------------------------
|
|
14
|
-
export default createReducer(
|
|
15
|
-
{
|
|
16
|
-
...upsertDeleteActionGenerator(upsertPrimer, deletePrimer)
|
|
17
|
-
},
|
|
18
|
-
{}
|
|
19
|
-
);
|
package/primersSelector.js
DELETED
package/print.png
DELETED
|
Binary file
|
package/printTool.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//TNRTODO this needs to be fixed and implemented
|
|
2
|
-
import React from "react";
|
|
3
|
-
import print from "./veToolbarIcons/print.png";
|
|
4
|
-
|
|
5
|
-
export default () => {
|
|
6
|
-
return {
|
|
7
|
-
Icon: <img src={print} alt="Print Vector" />,
|
|
8
|
-
onIconClick: function () {
|
|
9
|
-
// var myPrintContent = document.getElementById('printdiv');
|
|
10
|
-
// var myPrintWindow = window.open(windowUrl, windowName, 'left=300,top=100,width=400,height=400');
|
|
11
|
-
// myPrintWindow.document.write(myPrintContent.innerHTML);
|
|
12
|
-
// myPrintWindow.document.getElementById('hidden_div').style.display='block'
|
|
13
|
-
// myPrintWindow.document.close();
|
|
14
|
-
// myPrintWindow.focus();
|
|
15
|
-
// myPrintWindow.print();
|
|
16
|
-
// myPrintWindow.close();
|
|
17
|
-
// return false;
|
|
18
|
-
// print();
|
|
19
|
-
// var content = document.getElementById("divcontents");
|
|
20
|
-
// document.appendChild(con)
|
|
21
|
-
// var pri = document.getElementById("ifmcontentstoprint").contentWindow;
|
|
22
|
-
// pri.document.open();
|
|
23
|
-
// pri.document.write(content.innerHTML);
|
|
24
|
-
// pri.document.close();
|
|
25
|
-
// pri.focus();
|
|
26
|
-
// pri.print();
|
|
27
|
-
// downloadSequenceData(sequenceData || )
|
|
28
|
-
},
|
|
29
|
-
tooltip: "Print Vector"
|
|
30
|
-
};
|
|
31
|
-
};
|
package/propertiesTool.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import createAction from "./utils/createMetaAction";
|
|
2
|
-
import createMergedDefaultStateReducer from "./utils/createMergedDefaultStateReducer";
|
|
3
|
-
|
|
4
|
-
// ------------------------------------
|
|
5
|
-
// Actions
|
|
6
|
-
// ------------------------------------
|
|
7
|
-
// export const propertiesViewToggle = createAction(
|
|
8
|
-
// "TOGGLE_PROPERTIES_VIEW",
|
|
9
|
-
// () => {}
|
|
10
|
-
// ); //NOTE!!:: second argument sanitizes actions so no payload is passed
|
|
11
|
-
// export const propertiesViewOpen = createAction(
|
|
12
|
-
// "Open_PROPERTIES_VIEW",
|
|
13
|
-
// () => {}
|
|
14
|
-
// ); //NOTE!!:: second argument sanitizes actions so no payload is passed
|
|
15
|
-
export const propertiesViewTabUpdate = createAction("propertiesViewTabUpdate"); //NOTE!!:: second argument sanitizes actions so no payload is passed
|
|
16
|
-
|
|
17
|
-
// ------------------------------------
|
|
18
|
-
// Reducer
|
|
19
|
-
// ------------------------------------
|
|
20
|
-
export default createMergedDefaultStateReducer(
|
|
21
|
-
{
|
|
22
|
-
[propertiesViewTabUpdate]: (
|
|
23
|
-
state,
|
|
24
|
-
tabId,
|
|
25
|
-
selectedAnnotationOrAnnotationId
|
|
26
|
-
) => {
|
|
27
|
-
return {
|
|
28
|
-
...state,
|
|
29
|
-
selectedAnnotationId: selectedAnnotationOrAnnotationId
|
|
30
|
-
? selectedAnnotationOrAnnotationId.id ||
|
|
31
|
-
selectedAnnotationOrAnnotationId
|
|
32
|
-
: undefined,
|
|
33
|
-
tabId
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
tabId: "general"
|
|
39
|
-
}
|
|
40
|
-
);
|
package/proteinUtils.js
DELETED
package/pureNoFunc.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { shouldUpdate } from "recompose";
|
|
2
|
-
import { isEqualWith, isFunction } from "lodash-es";
|
|
3
|
-
|
|
4
|
-
const isEq = (o1, o2) => {
|
|
5
|
-
const isEq = isEqualWith(o1, o2, function (val1, val2) {
|
|
6
|
-
if (isFunction(val1) && isFunction(val2)) {
|
|
7
|
-
return val1 === val2 || val1.toString() === val2.toString();
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
return isEq;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const pure = BaseComponent => {
|
|
14
|
-
const hoc = shouldUpdate((props, nextProps) => !isEq(props, nextProps));
|
|
15
|
-
return hoc(BaseComponent);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default pure;
|
package/readOnly.js
DELETED
|
@@ -1,25 +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 toggleReadOnlyMode = createAction("TOGGLE_READ_ONLY_MODE", noop); //NOTE!!:: second argument sanitizes actions so no payload is passed
|
|
10
|
-
export const updateReadOnlyMode = createAction("UPDATE_READ_ONLY_MODE");
|
|
11
|
-
|
|
12
|
-
// ------------------------------------
|
|
13
|
-
// Reducer
|
|
14
|
-
// ------------------------------------
|
|
15
|
-
export default createReducer(
|
|
16
|
-
{
|
|
17
|
-
[updateReadOnlyMode]: (state, payload) => {
|
|
18
|
-
return payload;
|
|
19
|
-
},
|
|
20
|
-
[toggleReadOnlyMode]: state => {
|
|
21
|
-
return !state;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
true
|
|
25
|
-
);
|
package/redoTool.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.future &&
|
|
11
|
-
editorState.sequenceDataHistory.future.length
|
|
12
|
-
)
|
|
13
|
-
};
|
|
14
|
-
})(({ toolbarItemProps, redo, disabled }) => {
|
|
15
|
-
return (
|
|
16
|
-
<ToolbarItem
|
|
17
|
-
{...{
|
|
18
|
-
Icon: <Icon data-test="veRedoTool" icon="redo" />,
|
|
19
|
-
disabled,
|
|
20
|
-
onIconClick: redo,
|
|
21
|
-
tooltip: (
|
|
22
|
-
<span>
|
|
23
|
-
Redo <span style={{ fontSize: 10 }}>(Cmd/Ctrl+Shift+Z)</span>
|
|
24
|
-
</span>
|
|
25
|
-
),
|
|
26
|
-
...toolbarItemProps
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
});
|