@teselagen/ove 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +453 -319
- package/index.mjs +453 -319
- package/index.umd.js +397 -287
- package/package.json +2 -2
- package/src/AlignmentView/AlignmentVisibilityTool.js +1 -1
- package/src/AlignmentView/EditTrackNameDialog.js +1 -5
- package/src/AlignmentView/HorizontalPanelDragHandle.js +2 -2
- package/src/AlignmentView/Minimap.js +12 -12
- package/src/AlignmentView/PairwiseAlignmentView.js +1 -1
- package/src/AlignmentView/getGapMap.js +1 -1
- package/src/AlignmentView/getTrackFromEvent.js +1 -1
- package/src/AlignmentView/index.js +32 -37
- package/src/AutoAnnotate.js +48 -48
- package/src/CircularView/Cutsites.js +3 -3
- package/src/CircularView/Labels/index.js +7 -7
- package/src/CircularView/Labels/relaxLabels_DEPRECATED.js +5 -5
- package/src/CircularView/RotateCircularViewSlider.js +1 -1
- package/src/CircularView/SelectionLayer.js +2 -2
- package/src/CircularView/drawAnnotations.js +3 -3
- package/src/CircularView/getAngleForPositionMidpoint.js +1 -1
- package/src/CircularView/index.d.ts +11 -11
- package/src/CircularView/index.js +9 -9
- package/src/CreateAnnotationsPage.js +7 -5
- package/src/CreateCustomEnzyme/index.js +1 -5
- package/src/CutsiteFilter/AdditionalCutsiteInfoDialog.js +11 -11
- package/src/CutsiteFilter/index.js +12 -12
- package/src/DigestTool/AddLaddersDialog.js +1 -1
- package/src/DigestTool/DigestTool.js +3 -3
- package/src/DigestTool/Ladder.js +8 -8
- package/src/DigestTool/ladderDefaults.js +1 -2
- package/src/Editor/CommandHotkeyHandler.js +1 -1
- package/src/Editor/DropHandler.js +2 -2
- package/src/Editor/index.js +14 -14
- package/src/Editor/userDefinedHandlersAndOpts.js +2 -0
- package/src/FindBar/index.js +6 -6
- package/src/GlobalDialogUtils.js +6 -0
- package/src/LinearView/ZoomLinearView.js +1 -1
- package/src/LinearView/index.js +7 -7
- package/src/MenuBar/index.js +1 -1
- package/src/MenuBar/viewSubmenu.js +1 -1
- package/src/PCRTool/PCRTool.js +19 -19
- package/src/Reflex/Browser.js +4 -5
- package/src/Reflex/ReflexContainer.js +3 -3
- package/src/Reflex/ReflexElement.js +2 -2
- package/src/RowItem/Axis.js +1 -1
- package/src/RowItem/Caret/index.js +1 -1
- package/src/RowItem/Chromatograms/Chromatogram.js +3 -3
- package/src/RowItem/CutsiteSelectionLayers.js +1 -1
- package/src/RowItem/Cutsites.js +1 -1
- package/src/RowItem/Labels.js +2 -2
- package/src/RowItem/Orfs.js +2 -2
- package/src/RowItem/Sequence.js +4 -4
- package/src/RowItem/StackedAnnotations/PointedAnnotation.js +3 -3
- package/src/RowItem/StackedAnnotations/getStructuredBases.js +1 -1
- package/src/RowItem/Translations/AASliver.js +71 -75
- package/src/RowItem/Translations/index.js +1 -1
- package/src/RowItem/getCutsiteLabelHeights.js +1 -1
- package/src/RowItem/index.js +14 -8
- package/src/RowView/estimateRowHeight.js +5 -5
- package/src/RowView/index.d.ts +7 -7
- package/src/RowView/index.js +11 -12
- package/src/SimpleCircularOrLinearView.js +6 -6
- package/src/StatusBar/MeltingTemp.js +3 -3
- package/src/ToolBar/ToolbarItem.js +2 -2
- package/src/ToolBar/alignmentTool.js +9 -9
- package/src/ToolBar/editTool.js +1 -1
- package/src/ToolBar/findTool.js +2 -2
- package/src/ToolBar/importTool.js +1 -1
- package/src/ToolBar/index.js +2 -2
- package/src/ToolBar/oligoTool.js +1 -1
- package/src/ToolBar/orfTool.js +1 -6
- package/src/ToolBar/printTool.js +2 -2
- package/src/ToolBar/visibilityTool.js +1 -1
- package/src/VersionHistoryView/index.js +2 -2
- package/src/commands/index.js +236 -230
- package/src/createVectorEditor/index.js +4 -4
- package/src/fileUtils.js +18 -18
- package/src/helperComponents/AddOrEditAnnotationDialog/index.js +22 -15
- package/src/helperComponents/AddOrEditFeatureDialog/index.js +2 -2
- package/src/helperComponents/AddOrEditPartDialog/index.js +2 -2
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +5 -5
- package/src/helperComponents/EnzymesDialog/index.js +17 -22
- package/src/helperComponents/GoToDialog.js +5 -1
- package/src/helperComponents/MergeFeaturesDialog/index.js +3 -3
- package/src/helperComponents/PinchHelper/PinchHelper.js +1 -1
- package/src/helperComponents/PrintDialog/index.js +4 -4
- package/src/helperComponents/PropertiesDialog/CutsiteProperties.js +3 -3
- package/src/helperComponents/PropertiesDialog/GenbankView.js +1 -1
- package/src/helperComponents/PropertiesDialog/GeneralProperties.js +5 -5
- package/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +136 -138
- package/src/helperComponents/PropertiesDialog/OrfProperties.js +3 -3
- package/src/helperComponents/PropertiesDialog/PrimerProperties.js +1 -1
- package/src/helperComponents/PropertiesDialog/TranslationProperties.js +2 -2
- package/src/helperComponents/PropertiesDialog/index.js +3 -3
- package/src/helperComponents/RemoveDuplicates/index.js +3 -3
- package/src/helperComponents/SelectDialog.js +3 -3
- package/src/helperComponents/UncontrolledSliderWithPlusMinusBtns.js +5 -5
- package/src/helperComponents/createSimpleDialog.js +1 -1
- package/src/helperComponents/partTagSearch.js +2 -5
- package/src/helperComponents/withHover.js +3 -3
- package/src/redux/alignments.js +6 -6
- package/src/redux/annotationVisibility.js +4 -4
- package/src/redux/featureLengthsToHide.js +1 -1
- package/src/redux/frameTranslations.js +3 -3
- package/src/redux/middleware.js +2 -2
- package/src/redux/panelsShown.js +19 -19
- package/src/redux/partLengthsToHide.js +1 -1
- package/src/redux/primerLengthsToHide.js +1 -1
- package/src/redux/readOnly.js +1 -4
- package/src/redux/selectionLayer.js +1 -1
- package/src/redux/sequenceData/features.js +1 -1
- package/src/redux/sequenceData/upsertDeleteActionGenerator.js +1 -1
- package/src/redux/sequenceDataHistory.js +5 -5
- package/src/redux/toolBar.js +2 -4
- package/src/redux/utils/createMetaAction.js +2 -2
- package/src/redux/versionHistory.js +1 -2
- package/src/selectors/annotationSearchSelector.js +4 -4
- package/src/selectors/circularSelector.js +1 -1
- package/src/selectors/cutsiteLabelColorSelector.js +1 -1
- package/src/selectors/filteredCutsitesSelector.js +6 -6
- package/src/selectors/filteredFeaturesSelector.js +4 -4
- package/src/selectors/filteredPartsSelector.js +5 -5
- package/src/selectors/filteredPrimersSelector.js +3 -3
- package/src/selectors/isEnzymeFilterAndSelector.js +1 -1
- package/src/selectors/orfsSelector.js +1 -1
- package/src/selectors/restrictionEnzymesSelector.js +2 -2
- package/src/selectors/searchLayersSelector.js +7 -7
- package/src/selectors/sequenceLengthSelector.js +1 -1
- package/src/selectors/sequenceSelector.js +1 -1
- package/src/selectors/tagsToBoldSelector.js +1 -1
- package/src/selectors/translationsSelector.js +7 -7
- package/src/updateEditor.js +1 -1
- package/src/utils/PassThrough.js +1 -1
- package/src/utils/addWrappedAddons.js +1 -1
- package/src/utils/annotationTypes.js +2 -2
- package/src/utils/combineReducersDontIgnoreKeys.js +1 -1
- package/src/utils/editorUtils.js +2 -2
- package/src/utils/massageTickSpacing.js +1 -1
- package/src/utils/onlyUpdateForKeysDeep.js +1 -1
- package/src/utils/pureNoFunc.js +1 -1
- package/src/utils/shouldRerender.js +1 -1
- package/src/utils/showFileDialog.js +6 -7
- package/src/utils/updateLabelsForInViewFeatures.js +1 -1
- package/src/utils/useAnnotationLimits.js +1 -1
- package/src/withEditorInteractions/Keyboard.js +2 -3
- package/src/withEditorInteractions/createSequenceInputPopup.js +4 -4
- package/src/withEditorInteractions/index.js +93 -55
- package/src/withEditorProps/index.js +40 -37
|
@@ -60,7 +60,7 @@ const genericAnnotationProperties = ({
|
|
|
60
60
|
<>
|
|
61
61
|
<Icon
|
|
62
62
|
data-tip="Hide/Show"
|
|
63
|
-
onClick={
|
|
63
|
+
onClick={e => {
|
|
64
64
|
e.stopPropagation();
|
|
65
65
|
const upperType = startCase(annotationType);
|
|
66
66
|
if (checked) {
|
|
@@ -109,7 +109,7 @@ const genericAnnotationProperties = ({
|
|
|
109
109
|
path: "color",
|
|
110
110
|
type: "string",
|
|
111
111
|
width: 50,
|
|
112
|
-
render:
|
|
112
|
+
render: color => {
|
|
113
113
|
return (
|
|
114
114
|
<div
|
|
115
115
|
style={{ height: 20, width: 20, background: color }}
|
|
@@ -129,7 +129,7 @@ const genericAnnotationProperties = ({
|
|
|
129
129
|
type: "string",
|
|
130
130
|
getValueToFilterOn: (o, { keyedPartTags }) => {
|
|
131
131
|
const toRet = (o.tags || [])
|
|
132
|
-
.map(
|
|
132
|
+
.map(tagId => {
|
|
133
133
|
const tag = keyedPartTags[tagId];
|
|
134
134
|
if (!tag) return "";
|
|
135
135
|
return tag.label;
|
|
@@ -181,11 +181,11 @@ const genericAnnotationProperties = ({
|
|
|
181
181
|
selectedAnnotationId
|
|
182
182
|
} = this.props;
|
|
183
183
|
const annotationPropertiesSelectedEntities =
|
|
184
|
-
_annotationPropertiesSelectedEntities.filter(
|
|
184
|
+
_annotationPropertiesSelectedEntities.filter(a => annotations[a.id]);
|
|
185
185
|
|
|
186
186
|
const deleteAnnotation = this.props[`delete${annotationTypeUpper}`];
|
|
187
187
|
|
|
188
|
-
const annotationsToUse = map(annotations,
|
|
188
|
+
const annotationsToUse = map(annotations, annotation => {
|
|
189
189
|
return {
|
|
190
190
|
...annotation,
|
|
191
191
|
...(annotation.strand === undefined && {
|
|
@@ -197,107 +197,105 @@ const genericAnnotationProperties = ({
|
|
|
197
197
|
|
|
198
198
|
return (
|
|
199
199
|
<DataTable
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
200
|
+
topLeftItems={getVisFilter(
|
|
201
|
+
createCommandMenu(
|
|
202
|
+
isFunction(visSubmenu) ? visSubmenu(this.props) : visSubmenu,
|
|
203
|
+
this.commands,
|
|
204
|
+
{
|
|
205
|
+
useTicks: true
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
)}
|
|
209
|
+
annotationPropertiesSelectedEntities={
|
|
210
|
+
annotationPropertiesSelectedEntities
|
|
211
|
+
}
|
|
212
|
+
leftOfSearchBarItems={
|
|
213
|
+
<>
|
|
214
|
+
{!readOnly && (
|
|
215
|
+
<ButtonGroup style={{ marginTop: 3, marginRight: 4 }}>
|
|
216
|
+
<Tooltip
|
|
217
|
+
position="top"
|
|
218
|
+
modifiers={popoverOverflowModifiers}
|
|
219
|
+
content="New"
|
|
220
|
+
>
|
|
221
|
+
<AnchorButton
|
|
222
|
+
disabled={!sequenceLength}
|
|
223
|
+
icon="plus"
|
|
224
|
+
className="tgNewAnnBtn"
|
|
225
|
+
onClick={() => {
|
|
226
|
+
showAddOrEditAnnotationDialog({
|
|
227
|
+
type: annotationType,
|
|
228
|
+
annotation: pick(
|
|
229
|
+
selectionLayer,
|
|
230
|
+
"start",
|
|
231
|
+
"end",
|
|
232
|
+
"forward"
|
|
233
|
+
)
|
|
234
|
+
});
|
|
235
|
+
}}
|
|
236
|
+
></AnchorButton>
|
|
237
|
+
</Tooltip>
|
|
238
|
+
<Tooltip
|
|
239
|
+
position="top"
|
|
240
|
+
modifiers={popoverOverflowModifiers}
|
|
241
|
+
content="Edit"
|
|
242
|
+
>
|
|
243
|
+
<AnchorButton
|
|
244
|
+
onClick={() => {
|
|
245
|
+
showAddOrEditAnnotationDialog({
|
|
246
|
+
type: annotationType,
|
|
247
|
+
annotation: annotationPropertiesSelectedEntities[0]
|
|
248
|
+
});
|
|
249
|
+
}}
|
|
250
|
+
disabled={
|
|
251
|
+
annotationPropertiesSelectedEntities.length !== 1
|
|
252
|
+
}
|
|
253
|
+
icon="edit"
|
|
254
|
+
></AnchorButton>
|
|
255
|
+
</Tooltip>
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
257
|
+
{["feature"].includes(annotationType) && (
|
|
258
|
+
<CmdButton
|
|
259
|
+
text=""
|
|
260
|
+
icon="cog"
|
|
261
|
+
data-tip="Configure Feature Types"
|
|
262
|
+
cmd={this.commands.onConfigureFeatureTypesClick}
|
|
263
|
+
/>
|
|
264
|
+
)}
|
|
265
|
+
{["part", "primer", "feature"].includes(annotationType) && (
|
|
266
|
+
<CmdButton
|
|
267
|
+
text=""
|
|
268
|
+
icon={removeDuplicatesIcon}
|
|
269
|
+
data-tip="Remove Duplicates"
|
|
270
|
+
cmd={
|
|
271
|
+
this.commands[
|
|
272
|
+
`showRemoveDuplicatesDialog${
|
|
273
|
+
annotationTypeUpper + "s"
|
|
274
|
+
}`
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
/>
|
|
278
|
+
)}
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
)}
|
|
300
|
-
{/* {createCommandMenu(
|
|
280
|
+
{additionalFooterEls && additionalFooterEls(this.props)}
|
|
281
|
+
<Tooltip
|
|
282
|
+
position="top"
|
|
283
|
+
modifiers={popoverOverflowModifiers}
|
|
284
|
+
content="Delete"
|
|
285
|
+
>
|
|
286
|
+
<AnchorButton
|
|
287
|
+
onClick={() => {
|
|
288
|
+
deleteAnnotation(annotationPropertiesSelectedEntities);
|
|
289
|
+
}}
|
|
290
|
+
className="tgDeleteAnnsBtn"
|
|
291
|
+
intent="danger"
|
|
292
|
+
disabled={!annotationPropertiesSelectedEntities.length}
|
|
293
|
+
icon="trash"
|
|
294
|
+
></AnchorButton>
|
|
295
|
+
</Tooltip>
|
|
296
|
+
</ButtonGroup>
|
|
297
|
+
)}
|
|
298
|
+
{/* {createCommandMenu(
|
|
301
299
|
{
|
|
302
300
|
cmd: "featureFilterIndividualCmd",
|
|
303
301
|
// text: 'hahah',
|
|
@@ -308,43 +306,43 @@ const genericAnnotationProperties = ({
|
|
|
308
306
|
useTicks: true
|
|
309
307
|
}
|
|
310
308
|
)} */}
|
|
311
|
-
|
|
309
|
+
{/* <CmdCheckbox
|
|
312
310
|
prefix="Show "
|
|
313
311
|
cmd={this.commands.featureFilterIndividualCmd}
|
|
314
312
|
/> */}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
313
|
+
</>
|
|
314
|
+
}
|
|
315
|
+
onDoubleClick={annotation => {
|
|
316
|
+
showAddOrEditAnnotationDialog({
|
|
317
|
+
type: annotationType,
|
|
318
|
+
annotation
|
|
319
|
+
});
|
|
320
|
+
}}
|
|
321
|
+
withCheckboxes
|
|
322
|
+
showFeatureIndividual={this.props.showFeatureIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
323
|
+
hideFeatureIndividual={this.props.hideFeatureIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
324
|
+
showPartIndividual={this.props.showPartIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
325
|
+
hidePartIndividual={this.props.hidePartIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
326
|
+
showPrimerIndividual={this.props.showPrimerIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
327
|
+
hidePrimerIndividual={this.props.hidePrimerIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
328
|
+
annotationVisibility={annotationVisibility} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
329
|
+
featureLengthsToHide={this.props.featureLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
330
|
+
primerLengthsToHide={this.props.primerLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
331
|
+
partLengthsToHide={this.props.partLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
332
|
+
sequence={sequence} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
|
|
333
|
+
noPadding
|
|
334
|
+
noFullscreenButton
|
|
335
|
+
onRowSelect={this.onRowSelect}
|
|
336
|
+
selectedIds={selectedAnnotationId}
|
|
337
|
+
formName="annotationProperties"
|
|
338
|
+
noRouter
|
|
339
|
+
isProtein={isProtein}
|
|
340
|
+
keyedPartTags={getKeyedTagsAndTagOptions(allPartTags)}
|
|
341
|
+
compact
|
|
342
|
+
isInfinite
|
|
343
|
+
schema={this.schema}
|
|
344
|
+
entities={annotationsToUse}
|
|
345
|
+
/>
|
|
348
346
|
);
|
|
349
347
|
}
|
|
350
348
|
}
|
|
@@ -35,7 +35,7 @@ class OrfProperties extends React.Component {
|
|
|
35
35
|
};
|
|
36
36
|
render() {
|
|
37
37
|
const { orfs, sequenceLength, annotationVisibility } = this.props;
|
|
38
|
-
const orfsToUse = map(orfs,
|
|
38
|
+
const orfsToUse = map(orfs, orf => {
|
|
39
39
|
return {
|
|
40
40
|
...orf,
|
|
41
41
|
color: getOrfColor(orf),
|
|
@@ -69,7 +69,7 @@ class OrfProperties extends React.Component {
|
|
|
69
69
|
{
|
|
70
70
|
path: "color",
|
|
71
71
|
type: "string",
|
|
72
|
-
render:
|
|
72
|
+
render: color => {
|
|
73
73
|
return (
|
|
74
74
|
<div style={{ height: 20, width: 20, background: color }} />
|
|
75
75
|
);
|
|
@@ -94,7 +94,7 @@ class OrfProperties extends React.Component {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export default compose(
|
|
97
|
-
connectToEditor(
|
|
97
|
+
connectToEditor(editorState => {
|
|
98
98
|
const {
|
|
99
99
|
readOnly,
|
|
100
100
|
annotationVisibility = {},
|
|
@@ -9,7 +9,7 @@ export default genericAnnotationProperties({
|
|
|
9
9
|
visSubmenu: primersSubmenu,
|
|
10
10
|
noType: true,
|
|
11
11
|
withBases: true,
|
|
12
|
-
additionalFooterEls:
|
|
12
|
+
additionalFooterEls: props => {
|
|
13
13
|
return (
|
|
14
14
|
<Button onClick={props.createNewPCR} intent="success">
|
|
15
15
|
Simulate PCR
|
|
@@ -41,7 +41,7 @@ class TranslationProperties extends React.Component {
|
|
|
41
41
|
selectedAnnotationId,
|
|
42
42
|
annotationVisibility
|
|
43
43
|
} = this.props;
|
|
44
|
-
const translationsToUse = map(translations,
|
|
44
|
+
const translationsToUse = map(translations, translation => {
|
|
45
45
|
let aaString = "";
|
|
46
46
|
for (let i = 0; i < translation.aminoAcids.length; i++) {
|
|
47
47
|
aaString += translation.aminoAcids[i].aminoAcid.value;
|
|
@@ -134,7 +134,7 @@ class TranslationProperties extends React.Component {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
export default compose(
|
|
137
|
-
connectToEditor(
|
|
137
|
+
connectToEditor(editorState => {
|
|
138
138
|
const { readOnly, annotationVisibility = {}, sequenceData } = editorState;
|
|
139
139
|
return {
|
|
140
140
|
readOnly,
|
|
@@ -15,7 +15,7 @@ import "./style.css";
|
|
|
15
15
|
import { userDefinedHandlersAndOpts } from "../../Editor/userDefinedHandlersAndOpts";
|
|
16
16
|
import { pick } from "lodash";
|
|
17
17
|
|
|
18
|
-
const PropertiesContainer =
|
|
18
|
+
const PropertiesContainer = Comp => props => {
|
|
19
19
|
const { additionalFooterEls, additionalHeaderEls, ...rest } = props;
|
|
20
20
|
return (
|
|
21
21
|
<React.Fragment>
|
|
@@ -67,12 +67,12 @@ export class PropertiesDialog extends React.Component {
|
|
|
67
67
|
let { tabId, selectedAnnotationId } = propertiesTool;
|
|
68
68
|
if (
|
|
69
69
|
propertiesList
|
|
70
|
-
.map(
|
|
70
|
+
.map(nameOrOverride => nameOrOverride.name || nameOrOverride)
|
|
71
71
|
.indexOf(tabId) === -1
|
|
72
72
|
) {
|
|
73
73
|
tabId = propertiesList[0].name || propertiesList[0];
|
|
74
74
|
}
|
|
75
|
-
const propertiesTabs = flatMap(propertiesList,
|
|
75
|
+
const propertiesTabs = flatMap(propertiesList, nameOrOverride => {
|
|
76
76
|
if (annotationsToSupport[nameOrOverride] === false) {
|
|
77
77
|
return [];
|
|
78
78
|
}
|
|
@@ -73,7 +73,7 @@ class RemoveDuplicatesDialog extends React.Component {
|
|
|
73
73
|
const annotations = sequenceData[type];
|
|
74
74
|
const dups = [];
|
|
75
75
|
const seqsHashByStartEndStrandName = {};
|
|
76
|
-
forEach(annotations,
|
|
76
|
+
forEach(annotations, a => {
|
|
77
77
|
const hash = `${ignoreStartAndEnd ? "" : a.start}&${
|
|
78
78
|
ignoreStartAndEnd ? "" : a.end
|
|
79
79
|
}&${ignoreStrand ? "" : a.strand}&${ignoreName ? "" : a.name}`;
|
|
@@ -88,7 +88,7 @@ class RemoveDuplicatesDialog extends React.Component {
|
|
|
88
88
|
render() {
|
|
89
89
|
const { duplicatesToRemoveSelectedEntities, hideModal, type } = this.props;
|
|
90
90
|
|
|
91
|
-
const selectedIds = this.state.dups.map(
|
|
91
|
+
const selectedIds = this.state.dups.map(d => d.id);
|
|
92
92
|
// const sequenceLength = sequenceData.sequence.length;
|
|
93
93
|
// const isCirc = (this.state || {}).circular;
|
|
94
94
|
return (
|
|
@@ -162,7 +162,7 @@ class RemoveDuplicatesDialog extends React.Component {
|
|
|
162
162
|
intent="primary"
|
|
163
163
|
onClick={() => {
|
|
164
164
|
this.props[camelCase(`delete_${type}`).slice(0, -1)](
|
|
165
|
-
duplicatesToRemoveSelectedEntities.map(
|
|
165
|
+
duplicatesToRemoveSelectedEntities.map(d => d.id)
|
|
166
166
|
);
|
|
167
167
|
window.toastr.success(
|
|
168
168
|
`Successfully Deleted ${
|
|
@@ -40,7 +40,7 @@ export default compose(
|
|
|
40
40
|
class SelectDialog extends React.Component {
|
|
41
41
|
updateTempHighlight =
|
|
42
42
|
({ isStart, isEnd } = {}) =>
|
|
43
|
-
|
|
43
|
+
val => {
|
|
44
44
|
const { selectionLayerUpdate, from, to, invalid } = this.props;
|
|
45
45
|
if (invalid) return;
|
|
46
46
|
selectionLayerUpdate(
|
|
@@ -80,7 +80,7 @@ export default compose(
|
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
82
|
<form
|
|
83
|
-
onSubmit={handleSubmit(
|
|
83
|
+
onSubmit={handleSubmit(data => {
|
|
84
84
|
if (onSubmit) onSubmit(data);
|
|
85
85
|
hideModal();
|
|
86
86
|
tryToRefocusEditor();
|
|
@@ -143,7 +143,7 @@ export default compose(
|
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
|
|
146
|
-
const normalizeToInt =
|
|
146
|
+
const normalizeToInt = val => {
|
|
147
147
|
const int = Math.round(val);
|
|
148
148
|
const normalizedVal = `${int >= 0 ? int : 1}`;
|
|
149
149
|
return normalizedVal;
|
|
@@ -48,12 +48,12 @@ export default class UncontrolledSliderWithPlusMinusBtns extends React.Component
|
|
|
48
48
|
|
|
49
49
|
const stepSize = this.props.stepSize || (max - min) / 10;
|
|
50
50
|
if (bindOutsideChangeHelper) {
|
|
51
|
-
bindOutsideChangeHelper.triggerChange =
|
|
51
|
+
bindOutsideChangeHelper.triggerChange = fn => {
|
|
52
52
|
const valToPass =
|
|
53
53
|
isNumber(value) && !isNaN(value) ? value : initialValue;
|
|
54
54
|
return fn({
|
|
55
55
|
value: valToPass,
|
|
56
|
-
changeValue:
|
|
56
|
+
changeValue: newVal => {
|
|
57
57
|
const newnew = clamp(newVal, min, max);
|
|
58
58
|
this.setState({ value: newnew });
|
|
59
59
|
this.props.onChange && this.props.onChange(newnew);
|
|
@@ -65,7 +65,7 @@ export default class UncontrolledSliderWithPlusMinusBtns extends React.Component
|
|
|
65
65
|
return (
|
|
66
66
|
<div
|
|
67
67
|
className={`${className} ${smallSlider ? "small-slider" : ""}`}
|
|
68
|
-
onClick={
|
|
68
|
+
onClick={e => {
|
|
69
69
|
onClick && onClick(e);
|
|
70
70
|
preventDefaultStopPropagation(e);
|
|
71
71
|
}}
|
|
@@ -100,10 +100,10 @@ export default class UncontrolledSliderWithPlusMinusBtns extends React.Component
|
|
|
100
100
|
/>
|
|
101
101
|
<Slider
|
|
102
102
|
{...{ ...rest, value }}
|
|
103
|
-
onRelease={
|
|
103
|
+
onRelease={newVal =>
|
|
104
104
|
this.props.onRelease && this.props.onRelease(newVal)
|
|
105
105
|
}
|
|
106
|
-
onChange={
|
|
106
|
+
onChange={value => {
|
|
107
107
|
this.setState({ value });
|
|
108
108
|
this.props.onChange && this.props.onChange(value);
|
|
109
109
|
}}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import withEditorProps from "../withEditorProps";
|
|
3
|
-
import {
|
|
4
|
-
TgSelect,
|
|
5
|
-
getKeyedTagsAndTagOptions
|
|
6
|
-
} from "@teselagen/ui";
|
|
3
|
+
import { TgSelect, getKeyedTagsAndTagOptions } from "@teselagen/ui";
|
|
7
4
|
import { flatMap } from "lodash";
|
|
8
5
|
import { uniqBy } from "lodash";
|
|
9
6
|
|
|
@@ -30,7 +27,7 @@ function PartToolDropdown({
|
|
|
30
27
|
|
|
31
28
|
const tags = uniqBy(
|
|
32
29
|
flatMap(sequenceData.parts, ({ tags }) => {
|
|
33
|
-
return flatMap(tags,
|
|
30
|
+
return flatMap(tags, t => {
|
|
34
31
|
const tag = keyedTags[t];
|
|
35
32
|
if (!tag) return [];
|
|
36
33
|
return tag;
|
|
@@ -15,7 +15,7 @@ export function withHoveredIdFromContext(Component) {
|
|
|
15
15
|
return function HoveredIdComponent(props) {
|
|
16
16
|
return (
|
|
17
17
|
<HoveredIdContext.Consumer>
|
|
18
|
-
{
|
|
18
|
+
{contexts => <Component {...props} {...contexts} />}
|
|
19
19
|
</HoveredIdContext.Consumer>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
@@ -65,7 +65,7 @@ export default compose(
|
|
|
65
65
|
hoveredAnnotationActions)
|
|
66
66
|
),
|
|
67
67
|
withHandlers({
|
|
68
|
-
onMouseOver:
|
|
68
|
+
onMouseOver: props => e => {
|
|
69
69
|
const { editorName, id, hoveredAnnotationUpdate } = props;
|
|
70
70
|
const isIdHashmap = typeof id === "object";
|
|
71
71
|
const idToPass = isIdHashmap ? Object.keys(id)[0] : id;
|
|
@@ -79,7 +79,7 @@ export default compose(
|
|
|
79
79
|
hoveredAnnotationUpdate &&
|
|
80
80
|
hoveredAnnotationUpdate(idToPass, { editorName });
|
|
81
81
|
},
|
|
82
|
-
onMouseLeave:
|
|
82
|
+
onMouseLeave: props => e => {
|
|
83
83
|
hoveredAnnEasyStore.hoveredAnn = undefined;
|
|
84
84
|
const { editorName, hoveredAnnotationClear } = props;
|
|
85
85
|
e.stopPropagation();
|
package/src/redux/alignments.js
CHANGED
|
@@ -45,7 +45,7 @@ const defaultVisibilities = {
|
|
|
45
45
|
const defaultVisibilityTypes = Object.keys(defaultVisibilities);
|
|
46
46
|
|
|
47
47
|
try {
|
|
48
|
-
defaultVisibilityTypes.forEach(
|
|
48
|
+
defaultVisibilityTypes.forEach(type => {
|
|
49
49
|
const newVal = JSON.parse(window.localStorage.getItem(type));
|
|
50
50
|
if (newVal)
|
|
51
51
|
defaultVisibilities[type] = {
|
|
@@ -75,7 +75,7 @@ const highlightRangeProps = {
|
|
|
75
75
|
ignoreGaps: true
|
|
76
76
|
};
|
|
77
77
|
function addHighlightedDifferences(alignmentTracks) {
|
|
78
|
-
return alignmentTracks.map(
|
|
78
|
+
return alignmentTracks.map(track => {
|
|
79
79
|
if (track.isUnmapped) {
|
|
80
80
|
return track;
|
|
81
81
|
}
|
|
@@ -92,7 +92,7 @@ function addHighlightedDifferences(alignmentTracks) {
|
|
|
92
92
|
matchHighlightRanges,
|
|
93
93
|
additionalSelectionLayers: matchHighlightRanges
|
|
94
94
|
.filter(({ isMatch }) => !isMatch)
|
|
95
|
-
.map(
|
|
95
|
+
.map(range => {
|
|
96
96
|
return { ...range, ...highlightRangeProps };
|
|
97
97
|
}),
|
|
98
98
|
mismatches
|
|
@@ -120,7 +120,7 @@ export default (state = {}, { payload = {}, type }) => {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
if (type === "UPDATE_ALIGNMENT_VIEW_VISIBILITY") {
|
|
123
|
-
defaultVisibilityTypes.forEach(
|
|
123
|
+
defaultVisibilityTypes.forEach(type => {
|
|
124
124
|
if (
|
|
125
125
|
(type.startsWith("pairwise_") && payload.pairwiseAlignments) ||
|
|
126
126
|
(!type.startsWith("pairwise_") && !payload.pairwiseAlignments)
|
|
@@ -239,7 +239,7 @@ export default (state = {}, { payload = {}, type }) => {
|
|
|
239
239
|
payloadToUse.alignmentTracks,
|
|
240
240
|
payload.alignmentType
|
|
241
241
|
);
|
|
242
|
-
(payloadToUse.pairwiseAlignments || []).forEach(
|
|
242
|
+
(payloadToUse.pairwiseAlignments || []).forEach(alignment => {
|
|
243
243
|
const error = alignment;
|
|
244
244
|
if (error) {
|
|
245
245
|
hasError = error;
|
|
@@ -310,7 +310,7 @@ function checkForIssues(alignmentTracks, alignmentType) {
|
|
|
310
310
|
|
|
311
311
|
const alignmentTrackLength = alignmentTracks[0].alignmentData.sequence.length;
|
|
312
312
|
let hasError;
|
|
313
|
-
alignmentTracks.some(
|
|
313
|
+
alignmentTracks.some(track => {
|
|
314
314
|
if (track.alignmentData.sequence.length !== alignmentTrackLength) {
|
|
315
315
|
console.error("incorrect length", alignmentTracks);
|
|
316
316
|
|
|
@@ -69,7 +69,7 @@ export const resetPartIndividualToHide = createAction(
|
|
|
69
69
|
// ------------------------------------
|
|
70
70
|
const annotationVisibility = createMergedDefaultStateReducer(
|
|
71
71
|
{
|
|
72
|
-
[resetPartIndividualToHide]:
|
|
72
|
+
[resetPartIndividualToHide]: state => {
|
|
73
73
|
return {
|
|
74
74
|
...state,
|
|
75
75
|
partIndividualToHide: {}
|
|
@@ -94,7 +94,7 @@ const annotationVisibility = createMergedDefaultStateReducer(
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
},
|
|
97
|
-
[resetFeatureIndividualToHide]:
|
|
97
|
+
[resetFeatureIndividualToHide]: state => {
|
|
98
98
|
return {
|
|
99
99
|
...state,
|
|
100
100
|
featureIndividualToHide: {}
|
|
@@ -119,7 +119,7 @@ const annotationVisibility = createMergedDefaultStateReducer(
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
},
|
|
122
|
-
[resetPrimerIndividualToHide]:
|
|
122
|
+
[resetPrimerIndividualToHide]: state => {
|
|
123
123
|
return {
|
|
124
124
|
...state,
|
|
125
125
|
primerIndividualToHide: {}
|
|
@@ -144,7 +144,7 @@ const annotationVisibility = createMergedDefaultStateReducer(
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
},
|
|
147
|
-
[resetFeatureTypesToHide]:
|
|
147
|
+
[resetFeatureTypesToHide]: state => {
|
|
148
148
|
return {
|
|
149
149
|
...state,
|
|
150
150
|
featureTypesToHide: {}
|
|
@@ -19,7 +19,7 @@ export default createMergedDefaultStateReducer(
|
|
|
19
19
|
[updateFeatureLengthsToHide]: (state, payload) => {
|
|
20
20
|
return { ...state, ...payload };
|
|
21
21
|
},
|
|
22
|
-
[toggleFeatureLengthsToHide]:
|
|
22
|
+
[toggleFeatureLengthsToHide]: state => {
|
|
23
23
|
return { ...state, enabled: !state["enabled"] };
|
|
24
24
|
}
|
|
25
25
|
},
|