@teselagen/ove 0.8.19 → 0.8.21
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 +327 -45
- package/index.es.js +327 -45
- package/index.umd.js +327 -45
- package/ove.css +46 -0
- package/package.json +3 -3
- package/redux/temporaryAnnotations.d.ts +6 -0
- package/selectors/featuresSelector.d.ts +1 -1
- package/selectors/partsSelector.d.ts +1 -1
- package/selectors/primersSelector.d.ts +1 -1
- package/selectors/temporaryAnnotationsSelector.d.ts +2 -0
- package/src/StatusBar/MeltingTemp.js +16 -5
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +23 -11
- package/src/redux/index.js +3 -1
- package/src/redux/temporaryAnnotations.js +23 -0
- package/src/selectors/featuresSelector.js +8 -3
- package/src/selectors/partsSelector.js +9 -3
- package/src/selectors/primersSelector.js +9 -3
- package/src/selectors/temporaryAnnotationsSelector.js +1 -0
- package/src/updateEditor.js +5 -1
package/index.cjs.js
CHANGED
|
@@ -17289,7 +17289,8 @@ function rowClick(e, rowInfo, entities, {
|
|
|
17289
17289
|
onMultiRowSelect,
|
|
17290
17290
|
noDeselectAll,
|
|
17291
17291
|
onRowSelect,
|
|
17292
|
-
change
|
|
17292
|
+
change,
|
|
17293
|
+
getCheckboxGroupId
|
|
17293
17294
|
}) {
|
|
17294
17295
|
const entity = rowInfo.original;
|
|
17295
17296
|
onRowClick(e, entity, rowInfo);
|
|
@@ -17361,6 +17362,38 @@ function rowClick(e, rowInfo, entities, {
|
|
|
17361
17362
|
}
|
|
17362
17363
|
}
|
|
17363
17364
|
}
|
|
17365
|
+
if (getCheckboxGroupId) {
|
|
17366
|
+
const clickedRowId = rowId;
|
|
17367
|
+
const clickedEntity = entity;
|
|
17368
|
+
const clickedGroupId = getCheckboxGroupId(clickedEntity, rowInfo.index);
|
|
17369
|
+
if (!newIdMap[clickedRowId] && clickedGroupId) {
|
|
17370
|
+
entities.forEach((e2, i) => {
|
|
17371
|
+
if (getCheckboxGroupId(e2, i) === clickedGroupId) {
|
|
17372
|
+
const id2 = getIdOrCodeOrIndex(e2, i);
|
|
17373
|
+
delete newIdMap[id2];
|
|
17374
|
+
}
|
|
17375
|
+
});
|
|
17376
|
+
}
|
|
17377
|
+
const selectedGroupIds = /* @__PURE__ */ new Set();
|
|
17378
|
+
entities.forEach((e2, i) => {
|
|
17379
|
+
const id2 = getIdOrCodeOrIndex(e2, i);
|
|
17380
|
+
if (newIdMap[id2]) {
|
|
17381
|
+
const gid = getCheckboxGroupId(e2, i);
|
|
17382
|
+
if (gid) selectedGroupIds.add(gid);
|
|
17383
|
+
}
|
|
17384
|
+
});
|
|
17385
|
+
if (selectedGroupIds.size > 0) {
|
|
17386
|
+
entities.forEach((e2, i) => {
|
|
17387
|
+
const gid = getCheckboxGroupId(e2, i);
|
|
17388
|
+
if (gid && selectedGroupIds.has(gid)) {
|
|
17389
|
+
const id2 = getIdOrCodeOrIndex(e2, i);
|
|
17390
|
+
if (!newIdMap[id2]) {
|
|
17391
|
+
newIdMap[id2] = { entity: e2, time: Date.now() };
|
|
17392
|
+
}
|
|
17393
|
+
}
|
|
17394
|
+
});
|
|
17395
|
+
}
|
|
17396
|
+
}
|
|
17364
17397
|
finalizeSelection({
|
|
17365
17398
|
idMap: newIdMap,
|
|
17366
17399
|
entities,
|
|
@@ -51856,6 +51889,7 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
51856
51889
|
resetDefaultVisibility,
|
|
51857
51890
|
currentParams,
|
|
51858
51891
|
compact,
|
|
51892
|
+
hideExpandSubCompColumn,
|
|
51859
51893
|
editingCell,
|
|
51860
51894
|
editingCellSelectAll,
|
|
51861
51895
|
entities,
|
|
@@ -51903,7 +51937,8 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
51903
51937
|
withSort = true,
|
|
51904
51938
|
recordIdToIsVisibleMap,
|
|
51905
51939
|
setRecordIdToIsVisibleMap,
|
|
51906
|
-
withDisplayOptions
|
|
51940
|
+
withDisplayOptions,
|
|
51941
|
+
getCheckboxGroupId
|
|
51907
51942
|
}) => {
|
|
51908
51943
|
const dispatch = reactRedux.useDispatch();
|
|
51909
51944
|
const change = React.useCallback(
|
|
@@ -52151,6 +52186,14 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52151
52186
|
return /* @__PURE__ */ React.createElement("div", null);
|
|
52152
52187
|
}
|
|
52153
52188
|
const entity = entities[rowIndex];
|
|
52189
|
+
if (getCheckboxGroupId) {
|
|
52190
|
+
const currentGroupId = getCheckboxGroupId(entity, rowIndex);
|
|
52191
|
+
const previousEntity = entities[rowIndex - 1];
|
|
52192
|
+
const previousGroupId = previousEntity ? getCheckboxGroupId(previousEntity, rowIndex - 1) : void 0;
|
|
52193
|
+
if (currentGroupId && currentGroupId === previousGroupId) {
|
|
52194
|
+
return /* @__PURE__ */ React.createElement("div", null);
|
|
52195
|
+
}
|
|
52196
|
+
}
|
|
52154
52197
|
return /* @__PURE__ */ React.createElement(
|
|
52155
52198
|
core.Checkbox,
|
|
52156
52199
|
{
|
|
@@ -52169,7 +52212,8 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52169
52212
|
onMultiRowSelect,
|
|
52170
52213
|
noDeselectAll,
|
|
52171
52214
|
onRowSelect,
|
|
52172
|
-
change
|
|
52215
|
+
change,
|
|
52216
|
+
getCheckboxGroupId
|
|
52173
52217
|
});
|
|
52174
52218
|
}, "onClick"),
|
|
52175
52219
|
checked: isSelected
|
|
@@ -52190,7 +52234,8 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52190
52234
|
onRowSelect,
|
|
52191
52235
|
onSingleRowSelect,
|
|
52192
52236
|
reduxFormSelectedEntityIdMap,
|
|
52193
|
-
withCheckboxes
|
|
52237
|
+
withCheckboxes,
|
|
52238
|
+
getCheckboxGroupId
|
|
52194
52239
|
]
|
|
52195
52240
|
);
|
|
52196
52241
|
const finishCellEdit = React.useCallback(
|
|
@@ -52265,13 +52310,14 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52265
52310
|
);
|
|
52266
52311
|
}, "Header")
|
|
52267
52312
|
}), {
|
|
52313
|
+
show: !hideExpandSubCompColumn,
|
|
52268
52314
|
expander: true,
|
|
52269
52315
|
Expander: /* @__PURE__ */ __name(({ isExpanded, original: record }) => {
|
|
52270
52316
|
let shouldShow = true;
|
|
52271
52317
|
if (shouldShowSubComponent) {
|
|
52272
52318
|
shouldShow = shouldShowSubComponent(record);
|
|
52273
52319
|
}
|
|
52274
|
-
if (!shouldShow) return null;
|
|
52320
|
+
if (!shouldShow || hideExpandSubCompColumn) return null;
|
|
52275
52321
|
return /* @__PURE__ */ React.createElement(
|
|
52276
52322
|
core.Button,
|
|
52277
52323
|
{
|
|
@@ -56813,6 +56859,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56813
56859
|
minimalStyle,
|
|
56814
56860
|
mustClickCheckboxToSelect,
|
|
56815
56861
|
noDeselectAll,
|
|
56862
|
+
hideExpandSubCompColumn,
|
|
56816
56863
|
noFooter = isSimple ? !withPaging : false,
|
|
56817
56864
|
noFullscreenButton = isSimple,
|
|
56818
56865
|
noHeader = false,
|
|
@@ -56860,7 +56907,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56860
56907
|
withSort,
|
|
56861
56908
|
withTitle = !isSimple,
|
|
56862
56909
|
noExcessiveCheck,
|
|
56863
|
-
isEntityCountLoading
|
|
56910
|
+
isEntityCountLoading,
|
|
56911
|
+
getCheckboxGroupId
|
|
56864
56912
|
} = props;
|
|
56865
56913
|
const _entities = React.useMemo(
|
|
56866
56914
|
() => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
|
|
@@ -58397,6 +58445,15 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58397
58445
|
const isExpanded = expandedEntityIdMap[rowId];
|
|
58398
58446
|
const rowDisabled = isEntityDisabled(entity);
|
|
58399
58447
|
const dataId = entity.id || entity.code;
|
|
58448
|
+
let noGroupBorder = false;
|
|
58449
|
+
if (getCheckboxGroupId) {
|
|
58450
|
+
const currentGroupId = getCheckboxGroupId(entity, rowInfo.index);
|
|
58451
|
+
const nextEntity = entities[rowInfo.index + 1];
|
|
58452
|
+
const nextGroupId = nextEntity ? getCheckboxGroupId(nextEntity, rowInfo.index + 1) : void 0;
|
|
58453
|
+
if (currentGroupId && currentGroupId === nextGroupId) {
|
|
58454
|
+
noGroupBorder = true;
|
|
58455
|
+
}
|
|
58456
|
+
}
|
|
58400
58457
|
return {
|
|
58401
58458
|
onClick: /* @__PURE__ */ __name((e) => {
|
|
58402
58459
|
if (isCellEditable) return;
|
|
@@ -58423,7 +58480,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58423
58480
|
onMultiRowSelect,
|
|
58424
58481
|
noDeselectAll,
|
|
58425
58482
|
onRowSelect,
|
|
58426
|
-
change
|
|
58483
|
+
change,
|
|
58484
|
+
getCheckboxGroupId
|
|
58427
58485
|
});
|
|
58428
58486
|
}, "onClick"),
|
|
58429
58487
|
//row right click
|
|
@@ -58465,9 +58523,11 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58465
58523
|
{
|
|
58466
58524
|
disabled: rowDisabled,
|
|
58467
58525
|
selected: rowSelected && !withCheckboxes,
|
|
58468
|
-
"rt-tr-last-row": rowInfo.index === entities.length - 1
|
|
58526
|
+
"rt-tr-last-row": rowInfo.index === entities.length - 1,
|
|
58527
|
+
"no-group-border": noGroupBorder
|
|
58469
58528
|
}
|
|
58470
58529
|
),
|
|
58530
|
+
"data-test-selected": !!rowSelected,
|
|
58471
58531
|
"data-test-id": dataId === void 0 ? rowInfo.index : dataId,
|
|
58472
58532
|
"data-index": rowInfo.index,
|
|
58473
58533
|
"data-tip": typeof rowDisabled === "string" ? rowDisabled : void 0,
|
|
@@ -58498,7 +58558,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58498
58558
|
reduxFormSelectedEntityIdMap,
|
|
58499
58559
|
selectedCells,
|
|
58500
58560
|
showContextMenu2,
|
|
58501
|
-
withCheckboxes
|
|
58561
|
+
withCheckboxes,
|
|
58562
|
+
getCheckboxGroupId
|
|
58502
58563
|
]
|
|
58503
58564
|
);
|
|
58504
58565
|
const getTableCellProps = React.useCallback(
|
|
@@ -58811,6 +58872,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58811
58872
|
isSingleSelect,
|
|
58812
58873
|
isSelectionARectangle,
|
|
58813
58874
|
noDeselectAll,
|
|
58875
|
+
hideExpandSubCompColumn,
|
|
58814
58876
|
noSelect,
|
|
58815
58877
|
noUserSelect,
|
|
58816
58878
|
onDeselect,
|
|
@@ -58842,6 +58904,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58842
58904
|
withFilter,
|
|
58843
58905
|
withSort,
|
|
58844
58906
|
recordIdToIsVisibleMap,
|
|
58907
|
+
getCheckboxGroupId,
|
|
58845
58908
|
setRecordIdToIsVisibleMap
|
|
58846
58909
|
});
|
|
58847
58910
|
const scrollToTop = React.useCallback(
|
|
@@ -66966,9 +67029,19 @@ function AdvancedOptions({
|
|
|
66966
67029
|
content: content2,
|
|
66967
67030
|
label,
|
|
66968
67031
|
style: style2,
|
|
66969
|
-
isOpenByDefault
|
|
67032
|
+
isOpenByDefault,
|
|
67033
|
+
localStorageKey
|
|
66970
67034
|
}) {
|
|
66971
|
-
const [isOpen, setOpen] = React.useState(
|
|
67035
|
+
const [isOpen, setOpen] = React.useState(() => {
|
|
67036
|
+
if (localStorageKey) {
|
|
67037
|
+
if (window.localStorage.getItem(localStorageKey) === "true") {
|
|
67038
|
+
return true;
|
|
67039
|
+
} else if (window.localStorage.getItem(localStorageKey) === "false") {
|
|
67040
|
+
return false;
|
|
67041
|
+
}
|
|
67042
|
+
}
|
|
67043
|
+
return isOpenByDefault;
|
|
67044
|
+
});
|
|
66972
67045
|
if (!(content2 || children)) {
|
|
66973
67046
|
return null;
|
|
66974
67047
|
}
|
|
@@ -66976,20 +67049,28 @@ function AdvancedOptions({
|
|
|
66976
67049
|
"div",
|
|
66977
67050
|
{
|
|
66978
67051
|
onClick: /* @__PURE__ */ __name(() => {
|
|
66979
|
-
|
|
67052
|
+
const newIsOpen = !isOpen;
|
|
67053
|
+
setOpen(newIsOpen);
|
|
67054
|
+
if (localStorageKey) {
|
|
67055
|
+
window.localStorage.setItem(localStorageKey, newIsOpen);
|
|
67056
|
+
}
|
|
66980
67057
|
}, "onClick"),
|
|
66981
|
-
style: {
|
|
66982
|
-
|
|
67058
|
+
style: {
|
|
67059
|
+
cursor: "pointer",
|
|
67060
|
+
display: "flex",
|
|
67061
|
+
alignItems: "center",
|
|
67062
|
+
userSelect: "none"
|
|
67063
|
+
},
|
|
67064
|
+
className: `tg-toggle-advanced-options`
|
|
66983
67065
|
},
|
|
66984
|
-
label || "Advanced",
|
|
66985
|
-
" ",
|
|
66986
67066
|
/* @__PURE__ */ React.createElement(
|
|
66987
67067
|
core.Icon,
|
|
66988
67068
|
{
|
|
66989
67069
|
icon: isOpen ? "caret-down" : "caret-right",
|
|
66990
|
-
style: {
|
|
67070
|
+
style: { marginRight: 5 }
|
|
66991
67071
|
}
|
|
66992
|
-
)
|
|
67072
|
+
),
|
|
67073
|
+
/* @__PURE__ */ React.createElement("strong", null, label || "Advanced")
|
|
66993
67074
|
), isOpen && /* @__PURE__ */ React.createElement("div", { style: { marginTop: 10 } }, content2 || children));
|
|
66994
67075
|
}
|
|
66995
67076
|
__name(AdvancedOptions, "AdvancedOptions");
|
|
@@ -70283,6 +70364,7 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React.
|
|
|
70283
70364
|
topLeft: true,
|
|
70284
70365
|
topRight: true
|
|
70285
70366
|
},
|
|
70367
|
+
resizeHandleWrapperClass: "tg-dialog-resize-handle",
|
|
70286
70368
|
maxHeight: windowHeight,
|
|
70287
70369
|
maxWidth: windowWidth,
|
|
70288
70370
|
bounds: "window",
|
|
@@ -84349,6 +84431,160 @@ function calculateNebTm(sequence2, { monovalentCationConc = 0.05, primerConc = 5
|
|
|
84349
84431
|
}
|
|
84350
84432
|
}
|
|
84351
84433
|
__name(calculateNebTm, "calculateNebTm");
|
|
84434
|
+
const PRIMER3_PARAMS = {
|
|
84435
|
+
saltMonovalent: 50,
|
|
84436
|
+
// mM
|
|
84437
|
+
saltDivalent: 1.5,
|
|
84438
|
+
// mM
|
|
84439
|
+
dntpConc: 0.6,
|
|
84440
|
+
// mM
|
|
84441
|
+
dnaConc: 50,
|
|
84442
|
+
// nM
|
|
84443
|
+
R: 1.987
|
|
84444
|
+
// Gas constant (cal/K·mol)
|
|
84445
|
+
};
|
|
84446
|
+
const SANTA_LUCIA_NN = {
|
|
84447
|
+
AA: { dH: -7.9, dS: -22.2 },
|
|
84448
|
+
TT: { dH: -7.9, dS: -22.2 },
|
|
84449
|
+
AT: { dH: -7.2, dS: -20.4 },
|
|
84450
|
+
TA: { dH: -7.2, dS: -21.3 },
|
|
84451
|
+
CA: { dH: -8.5, dS: -22.7 },
|
|
84452
|
+
TG: { dH: -8.5, dS: -22.7 },
|
|
84453
|
+
GT: { dH: -8.4, dS: -22.4 },
|
|
84454
|
+
AC: { dH: -8.4, dS: -22.4 },
|
|
84455
|
+
CT: { dH: -7.8, dS: -21 },
|
|
84456
|
+
AG: { dH: -7.8, dS: -21 },
|
|
84457
|
+
GA: { dH: -8.2, dS: -22.2 },
|
|
84458
|
+
TC: { dH: -8.2, dS: -22.2 },
|
|
84459
|
+
CG: { dH: -10.6, dS: -27.2 },
|
|
84460
|
+
GC: { dH: -9.8, dS: -24.4 },
|
|
84461
|
+
GG: { dH: -8, dS: -19.9 },
|
|
84462
|
+
CC: { dH: -8, dS: -19.9 }
|
|
84463
|
+
};
|
|
84464
|
+
const SANTA_LUCIA_INIT = {
|
|
84465
|
+
GC: { dH: 0.1, dS: -2.8 },
|
|
84466
|
+
// initiation with terminal GC
|
|
84467
|
+
AT: { dH: 2.3, dS: 4.1 }
|
|
84468
|
+
// initiation with terminal AT
|
|
84469
|
+
};
|
|
84470
|
+
function getEffectiveMonovalentConc() {
|
|
84471
|
+
let effectiveMono = PRIMER3_PARAMS.saltMonovalent;
|
|
84472
|
+
{
|
|
84473
|
+
const freeMg = Math.max(
|
|
84474
|
+
0,
|
|
84475
|
+
PRIMER3_PARAMS.saltDivalent - PRIMER3_PARAMS.dntpConc
|
|
84476
|
+
);
|
|
84477
|
+
effectiveMono += 120 * Math.sqrt(freeMg);
|
|
84478
|
+
}
|
|
84479
|
+
return effectiveMono;
|
|
84480
|
+
}
|
|
84481
|
+
__name(getEffectiveMonovalentConc, "getEffectiveMonovalentConc");
|
|
84482
|
+
function applySaltCorrection(deltaS, nnPairs) {
|
|
84483
|
+
const effectiveMono = getEffectiveMonovalentConc();
|
|
84484
|
+
return deltaS + 0.368 * nnPairs * Math.log(effectiveMono / 1e3);
|
|
84485
|
+
}
|
|
84486
|
+
__name(applySaltCorrection, "applySaltCorrection");
|
|
84487
|
+
function isValidSequence(sequence2) {
|
|
84488
|
+
return /^[ATGCN]+$/.test(sequence2);
|
|
84489
|
+
}
|
|
84490
|
+
__name(isValidSequence, "isValidSequence");
|
|
84491
|
+
function calculateSantaLuciaTm(sequence2) {
|
|
84492
|
+
try {
|
|
84493
|
+
sequence2 = sequence2 == null ? void 0 : sequence2.toUpperCase().trim();
|
|
84494
|
+
if (!isValidSequence(sequence2)) {
|
|
84495
|
+
throw new Error("Invalid sequence: contains non-DNA characters");
|
|
84496
|
+
}
|
|
84497
|
+
if (sequence2.length < 2) {
|
|
84498
|
+
throw new Error("Sequence too short: minimum length is 2 bases");
|
|
84499
|
+
}
|
|
84500
|
+
let deltaH = 0;
|
|
84501
|
+
let deltaS = 0;
|
|
84502
|
+
for (let i = 0; i < sequence2.length - 1; i++) {
|
|
84503
|
+
const dinucleotide = sequence2.substring(i, i + 2);
|
|
84504
|
+
if (dinucleotide.includes("N")) {
|
|
84505
|
+
continue;
|
|
84506
|
+
}
|
|
84507
|
+
const params = SANTA_LUCIA_NN[dinucleotide];
|
|
84508
|
+
if (params) {
|
|
84509
|
+
deltaH += params.dH;
|
|
84510
|
+
deltaS += params.dS;
|
|
84511
|
+
}
|
|
84512
|
+
}
|
|
84513
|
+
const firstBase = sequence2[0];
|
|
84514
|
+
const lastBase = sequence2[sequence2.length - 1];
|
|
84515
|
+
if (firstBase === "G" || firstBase === "C") {
|
|
84516
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84517
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84518
|
+
} else {
|
|
84519
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84520
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84521
|
+
}
|
|
84522
|
+
if (lastBase === "G" || lastBase === "C") {
|
|
84523
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84524
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84525
|
+
} else {
|
|
84526
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84527
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84528
|
+
}
|
|
84529
|
+
const nnPairs = sequence2.length - 1;
|
|
84530
|
+
deltaS = applySaltCorrection(deltaS, nnPairs);
|
|
84531
|
+
const C = PRIMER3_PARAMS.dnaConc * 1e-9;
|
|
84532
|
+
const Tm = deltaH * 1e3 / (deltaS + PRIMER3_PARAMS.R * Math.log(C / 4));
|
|
84533
|
+
return Tm - 273.15;
|
|
84534
|
+
} catch (e) {
|
|
84535
|
+
return `Error calculating Tm for sequence ${sequence2}. ${e}`;
|
|
84536
|
+
}
|
|
84537
|
+
}
|
|
84538
|
+
__name(calculateSantaLuciaTm, "calculateSantaLuciaTm");
|
|
84539
|
+
function calculateEndStability(sequence2) {
|
|
84540
|
+
try {
|
|
84541
|
+
sequence2 = sequence2 == null ? void 0 : sequence2.toUpperCase().trim();
|
|
84542
|
+
if (!isValidSequence(sequence2)) {
|
|
84543
|
+
throw new Error("Invalid sequence: contains non-DNA characters");
|
|
84544
|
+
}
|
|
84545
|
+
if (sequence2.length < 5) {
|
|
84546
|
+
throw new Error(
|
|
84547
|
+
"Sequence too short: minimum length is 5 bases for end stability calculation"
|
|
84548
|
+
);
|
|
84549
|
+
}
|
|
84550
|
+
const last5Bases = sequence2.substring(sequence2.length - 5);
|
|
84551
|
+
let deltaH = 0;
|
|
84552
|
+
let deltaS = 0;
|
|
84553
|
+
for (let i = 0; i < 4; i++) {
|
|
84554
|
+
const dinucleotide = last5Bases.substring(i, i + 2);
|
|
84555
|
+
if (dinucleotide.includes("N")) {
|
|
84556
|
+
continue;
|
|
84557
|
+
}
|
|
84558
|
+
const params = SANTA_LUCIA_NN[dinucleotide];
|
|
84559
|
+
if (params) {
|
|
84560
|
+
deltaH += params.dH;
|
|
84561
|
+
deltaS += params.dS;
|
|
84562
|
+
}
|
|
84563
|
+
}
|
|
84564
|
+
const firstBase = last5Bases[0];
|
|
84565
|
+
const lastBase = last5Bases[last5Bases.length - 1];
|
|
84566
|
+
if (firstBase === "G" || firstBase === "C") {
|
|
84567
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84568
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84569
|
+
} else {
|
|
84570
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84571
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84572
|
+
}
|
|
84573
|
+
if (lastBase === "G" || lastBase === "C") {
|
|
84574
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84575
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84576
|
+
} else {
|
|
84577
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84578
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84579
|
+
}
|
|
84580
|
+
const T2 = 310.15;
|
|
84581
|
+
const deltaG = deltaH - T2 * deltaS / 1e3;
|
|
84582
|
+
return Math.round(Math.abs(deltaG) * 100) / 100;
|
|
84583
|
+
} catch (e) {
|
|
84584
|
+
return `Error calculating end stability for sequence ${sequence2}. ${e}`;
|
|
84585
|
+
}
|
|
84586
|
+
}
|
|
84587
|
+
__name(calculateEndStability, "calculateEndStability");
|
|
84352
84588
|
function convertAACaretPositionOrRangeToDna(rangeOrCaret) {
|
|
84353
84589
|
if (typeof rangeOrCaret === "object" && rangeOrCaret !== null) {
|
|
84354
84590
|
return convertAARangeToDnaRange(__spreadProps(__spreadValues({}, rangeOrCaret), {
|
|
@@ -97038,6 +97274,30 @@ const selectedPartTags$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
97038
97274
|
default: selectedPartTags,
|
|
97039
97275
|
updateSelectedPartTags
|
|
97040
97276
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
97277
|
+
const updateTemporaryAnnotations = createMetaAction(
|
|
97278
|
+
"TEMPORARY_ANNOTATIONS_UPDATE"
|
|
97279
|
+
);
|
|
97280
|
+
const temporaryAnnotations = createMergedDefaultStateReducer(
|
|
97281
|
+
{
|
|
97282
|
+
TEMPORARY_ANNOTATIONS_UPDATE: /* @__PURE__ */ __name((state2, payload) => {
|
|
97283
|
+
return __spreadValues(__spreadValues({}, state2), payload);
|
|
97284
|
+
}, "TEMPORARY_ANNOTATIONS_UPDATE"),
|
|
97285
|
+
VECTOR_EDITOR_UPDATE: /* @__PURE__ */ __name((state2, payload) => {
|
|
97286
|
+
return __spreadValues(__spreadValues({}, state2), payload.temporaryAnnotations);
|
|
97287
|
+
}, "VECTOR_EDITOR_UPDATE")
|
|
97288
|
+
},
|
|
97289
|
+
{
|
|
97290
|
+
features: {},
|
|
97291
|
+
primers: {},
|
|
97292
|
+
parts: {},
|
|
97293
|
+
selectionLayer: {}
|
|
97294
|
+
}
|
|
97295
|
+
);
|
|
97296
|
+
const temporaryAnnotations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97297
|
+
__proto__: null,
|
|
97298
|
+
default: temporaryAnnotations,
|
|
97299
|
+
updateTemporaryAnnotations
|
|
97300
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
97041
97301
|
const vectorEditorMiddleware = /* @__PURE__ */ __name((store2) => (next) => (action2) => {
|
|
97042
97302
|
if (action2.meta && action2.meta.disregardUndo) {
|
|
97043
97303
|
return next(action2);
|
|
@@ -97153,7 +97413,8 @@ const subReducers = {
|
|
|
97153
97413
|
partLengthsToHide: partLengthsToHide$1,
|
|
97154
97414
|
primerLengthsToHide: primerLengthsToHide$1,
|
|
97155
97415
|
featureLengthsToHide: featureLengthsToHide$1,
|
|
97156
|
-
selectedPartTags: selectedPartTags$1
|
|
97416
|
+
selectedPartTags: selectedPartTags$1,
|
|
97417
|
+
temporaryAnnotations: temporaryAnnotations$1
|
|
97157
97418
|
};
|
|
97158
97419
|
const vectorEditorInitialize = createMetaAction("VECTOR_EDITOR_UPDATE");
|
|
97159
97420
|
const vectorEditorClear = createMetaAction("VECTOR_EDITOR_CLEAR");
|
|
@@ -97918,11 +98179,16 @@ const translationSearchMatchesSelector = createSelector(
|
|
|
97918
98179
|
return searchLayers;
|
|
97919
98180
|
}
|
|
97920
98181
|
);
|
|
97921
|
-
|
|
97922
|
-
|
|
98182
|
+
const temporaryAnnotationsSelector = /* @__PURE__ */ __name((editor) => editor.temporaryAnnotations, "temporaryAnnotationsSelector");
|
|
98183
|
+
function featuresRawSelector(sequenceData2, temporaryAnnotations2) {
|
|
98184
|
+
return __spreadValues(__spreadValues({}, sequenceData2.features), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.features);
|
|
97923
98185
|
}
|
|
97924
98186
|
__name(featuresRawSelector, "featuresRawSelector");
|
|
97925
|
-
const featuresSelector = createSelector(
|
|
98187
|
+
const featuresSelector = createSelector(
|
|
98188
|
+
sequenceDataSelector,
|
|
98189
|
+
temporaryAnnotationsSelector,
|
|
98190
|
+
featuresRawSelector
|
|
98191
|
+
);
|
|
97926
98192
|
function cdsFeaturesRawSelector(features2) {
|
|
97927
98193
|
return filter(features2, ({ type: type2 }) => type2 && type2.toUpperCase() === "CDS");
|
|
97928
98194
|
}
|
|
@@ -98202,11 +98468,15 @@ const filteredFeaturesSelector$1 = createSelector(
|
|
|
98202
98468
|
(state2) => state2.featureLengthsToHide,
|
|
98203
98469
|
filteredFeaturesSelector
|
|
98204
98470
|
);
|
|
98205
|
-
function primersRawSelector(sequenceData2) {
|
|
98206
|
-
return sequenceData2.primers;
|
|
98471
|
+
function primersRawSelector(sequenceData2, temporaryAnnotations2) {
|
|
98472
|
+
return __spreadValues(__spreadValues({}, sequenceData2.primers), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.primers);
|
|
98207
98473
|
}
|
|
98208
98474
|
__name(primersRawSelector, "primersRawSelector");
|
|
98209
|
-
const primersSelector = createSelector(
|
|
98475
|
+
const primersSelector = createSelector(
|
|
98476
|
+
sequenceDataSelector,
|
|
98477
|
+
temporaryAnnotationsSelector,
|
|
98478
|
+
primersRawSelector
|
|
98479
|
+
);
|
|
98210
98480
|
function filteredPrimersSelector(primers2, seqLen, primerIndividualToHide, lengthsToHide) {
|
|
98211
98481
|
return omitBy(primers2, (ann) => {
|
|
98212
98482
|
const hideIndividually = primerIndividualToHide[ann.id];
|
|
@@ -98221,11 +98491,15 @@ const filteredPrimersSelector$1 = createSelector(
|
|
|
98221
98491
|
(state2) => state2.primerLengthsToHide,
|
|
98222
98492
|
filteredPrimersSelector
|
|
98223
98493
|
);
|
|
98224
|
-
function partsRawSelector(sequenceData2) {
|
|
98225
|
-
return sequenceData2.parts;
|
|
98494
|
+
function partsRawSelector(sequenceData2, temporaryAnnotations2) {
|
|
98495
|
+
return __spreadValues(__spreadValues({}, sequenceData2.parts), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.parts);
|
|
98226
98496
|
}
|
|
98227
98497
|
__name(partsRawSelector, "partsRawSelector");
|
|
98228
|
-
const partsSelector = createSelector(
|
|
98498
|
+
const partsSelector = createSelector(
|
|
98499
|
+
sequenceDataSelector,
|
|
98500
|
+
temporaryAnnotationsSelector,
|
|
98501
|
+
partsRawSelector
|
|
98502
|
+
);
|
|
98229
98503
|
const tagsToBoldSelector = /* @__PURE__ */ __name((state2) => state2.selectedPartTags.parts, "tagsToBoldSelector");
|
|
98230
98504
|
function addWrappedAddons(anns, seqLen) {
|
|
98231
98505
|
return flatMap(anns, (ann) => {
|
|
@@ -99052,7 +99326,8 @@ function updateEditor(store2, editorName, initialValues2 = {}, extraMeta = {}, {
|
|
|
99052
99326
|
annotationVisibility: annotationVisibility2,
|
|
99053
99327
|
annotationsToSupport: annotationsToSupport2,
|
|
99054
99328
|
findTool: findTool2,
|
|
99055
|
-
justPassingPartialSeqData
|
|
99329
|
+
justPassingPartialSeqData,
|
|
99330
|
+
temporaryAnnotations: temporaryAnnotations2
|
|
99056
99331
|
} = initialValues2;
|
|
99057
99332
|
const currentEditor = store2.getState().VectorEditor[editorName] || {};
|
|
99058
99333
|
const isAlreadyProteinEditor = currentEditor.sequenceData && currentEditor.sequenceData.isProtein;
|
|
@@ -99174,12 +99449,14 @@ function updateEditor(store2, editorName, initialValues2 = {}, extraMeta = {}, {
|
|
|
99174
99449
|
};
|
|
99175
99450
|
}
|
|
99176
99451
|
}
|
|
99177
|
-
payload = __spreadValues(__spreadValues(__spreadValues({}, initialValues2), toSpread), sequenceData2 && {
|
|
99452
|
+
payload = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialValues2), toSpread), sequenceData2 && {
|
|
99178
99453
|
sequenceData: tidyUpSequenceData(sequenceData2, {
|
|
99179
99454
|
convertAnnotationsFromAAIndices,
|
|
99180
99455
|
//if we have sequence data coming in make sure to tidy it up for the user :)
|
|
99181
99456
|
annotationsAsObjects: true
|
|
99182
99457
|
})
|
|
99458
|
+
}), temporaryAnnotations2 && {
|
|
99459
|
+
temporaryAnnotations: temporaryAnnotations2
|
|
99183
99460
|
});
|
|
99184
99461
|
}
|
|
99185
99462
|
annotationTypes.forEach((t2) => {
|
|
@@ -116654,7 +116931,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
116654
116931
|
input.click();
|
|
116655
116932
|
}
|
|
116656
116933
|
__name(showFileDialog, "showFileDialog");
|
|
116657
|
-
const version = "0.8.
|
|
116934
|
+
const version = "0.8.20";
|
|
116658
116935
|
const packageJson = {
|
|
116659
116936
|
version
|
|
116660
116937
|
};
|
|
@@ -137354,7 +137631,7 @@ function MeltingTemp({
|
|
|
137354
137631
|
/* , setMonovalentCationConc */
|
|
137355
137632
|
] = React.useState(0.05);
|
|
137356
137633
|
const [tmType, setTmType] = useTmType();
|
|
137357
|
-
let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence2, {
|
|
137634
|
+
let tm = (tmType === "neb_tm" ? calculateNebTm : tmType === "default" ? calculateSantaLuciaTm : calculateTm)(sequence2, {
|
|
137358
137635
|
monovalentCationConc,
|
|
137359
137636
|
primerConc
|
|
137360
137637
|
});
|
|
@@ -137379,8 +137656,9 @@ function MeltingTemp({
|
|
|
137379
137656
|
{
|
|
137380
137657
|
label: "Choose Tm Type:",
|
|
137381
137658
|
options: [
|
|
137382
|
-
{ value: "default", label: "
|
|
137383
|
-
{ value: "
|
|
137659
|
+
{ value: "default", label: "Santa Lucia (Default)" },
|
|
137660
|
+
{ value: "breslauer", label: "Breslauer" },
|
|
137661
|
+
{ value: "neb_tm", label: "NEB Tm" }
|
|
137384
137662
|
],
|
|
137385
137663
|
onChange: /* @__PURE__ */ __name((e) => setTmType(e.target.value), "onChange"),
|
|
137386
137664
|
selectedValue: tmType
|
|
@@ -137394,7 +137672,7 @@ function MeltingTemp({
|
|
|
137394
137672
|
}
|
|
137395
137673
|
), hasWarning, /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("br", null), "Try using the Default Tm"))
|
|
137396
137674
|
},
|
|
137397
|
-
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InnerWrapper, null, "Melting Temp: ", Number(tm) || 0, "
|
|
137675
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InnerWrapper, null, "Melting Temp: ", Number(tm) || 0, "°C"), hasWarning && /* @__PURE__ */ React.createElement(
|
|
137398
137676
|
core.Icon,
|
|
137399
137677
|
{
|
|
137400
137678
|
style: { marginLeft: 5, marginRight: 5 },
|
|
@@ -137658,12 +137936,24 @@ const RenderBases = /* @__PURE__ */ __name((props) => {
|
|
|
137658
137936
|
)), /* @__PURE__ */ React.createElement(
|
|
137659
137937
|
MeltingTemp,
|
|
137660
137938
|
{
|
|
137661
|
-
InnerWrapper:
|
|
137939
|
+
InnerWrapper: TextInnerWrapper,
|
|
137662
137940
|
sequence: bases
|
|
137663
137941
|
}
|
|
137664
|
-
))
|
|
137942
|
+
), /* @__PURE__ */ React.createElement(TextInnerWrapper, null, "GC content: ", bases && calculatePercentGC(bases).toFixed(1), "%"), /* @__PURE__ */ React.createElement(TextInnerWrapper, null, "3' Stability: ", bases && calculateEndStability(bases), " kcal/mol"))
|
|
137665
137943
|
);
|
|
137666
137944
|
}, "RenderBases");
|
|
137945
|
+
const TextInnerWrapper = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React.createElement(
|
|
137946
|
+
"div",
|
|
137947
|
+
{
|
|
137948
|
+
className: "bp3-text-muted bp3-text-small",
|
|
137949
|
+
style: {
|
|
137950
|
+
marginBottom: 15,
|
|
137951
|
+
marginTop: -5,
|
|
137952
|
+
fontStyle: "italic"
|
|
137953
|
+
}
|
|
137954
|
+
},
|
|
137955
|
+
p2.children
|
|
137956
|
+
), "TextInnerWrapper");
|
|
137667
137957
|
const AddOrEditPrimerDialog = AddOrEditAnnotationDialog$1({
|
|
137668
137958
|
formName: "AddOrEditPrimerDialog",
|
|
137669
137959
|
getProps: /* @__PURE__ */ __name((props) => ({
|
|
@@ -137672,14 +137962,6 @@ const AddOrEditPrimerDialog = AddOrEditAnnotationDialog$1({
|
|
|
137672
137962
|
RenderBases
|
|
137673
137963
|
}), "getProps")
|
|
137674
137964
|
});
|
|
137675
|
-
const InnerWrapperMeltingTemp = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React.createElement(
|
|
137676
|
-
"div",
|
|
137677
|
-
{
|
|
137678
|
-
className: "bp3-text-muted bp3-text-small",
|
|
137679
|
-
style: { marginBottom: 15, marginTop: -5, fontStyle: "italic" }
|
|
137680
|
-
},
|
|
137681
|
-
p2.children
|
|
137682
|
-
), "InnerWrapperMeltingTemp");
|
|
137683
137965
|
const Dialogs = {
|
|
137684
137966
|
RenameSequenceDialog,
|
|
137685
137967
|
PrintDialog: PrintDialog$1,
|