@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.es.js
CHANGED
|
@@ -17271,7 +17271,8 @@ function rowClick(e, rowInfo, entities, {
|
|
|
17271
17271
|
onMultiRowSelect,
|
|
17272
17272
|
noDeselectAll,
|
|
17273
17273
|
onRowSelect,
|
|
17274
|
-
change: change2
|
|
17274
|
+
change: change2,
|
|
17275
|
+
getCheckboxGroupId
|
|
17275
17276
|
}) {
|
|
17276
17277
|
const entity = rowInfo.original;
|
|
17277
17278
|
onRowClick(e, entity, rowInfo);
|
|
@@ -17343,6 +17344,38 @@ function rowClick(e, rowInfo, entities, {
|
|
|
17343
17344
|
}
|
|
17344
17345
|
}
|
|
17345
17346
|
}
|
|
17347
|
+
if (getCheckboxGroupId) {
|
|
17348
|
+
const clickedRowId = rowId;
|
|
17349
|
+
const clickedEntity = entity;
|
|
17350
|
+
const clickedGroupId = getCheckboxGroupId(clickedEntity, rowInfo.index);
|
|
17351
|
+
if (!newIdMap[clickedRowId] && clickedGroupId) {
|
|
17352
|
+
entities.forEach((e2, i) => {
|
|
17353
|
+
if (getCheckboxGroupId(e2, i) === clickedGroupId) {
|
|
17354
|
+
const id2 = getIdOrCodeOrIndex(e2, i);
|
|
17355
|
+
delete newIdMap[id2];
|
|
17356
|
+
}
|
|
17357
|
+
});
|
|
17358
|
+
}
|
|
17359
|
+
const selectedGroupIds = /* @__PURE__ */ new Set();
|
|
17360
|
+
entities.forEach((e2, i) => {
|
|
17361
|
+
const id2 = getIdOrCodeOrIndex(e2, i);
|
|
17362
|
+
if (newIdMap[id2]) {
|
|
17363
|
+
const gid = getCheckboxGroupId(e2, i);
|
|
17364
|
+
if (gid) selectedGroupIds.add(gid);
|
|
17365
|
+
}
|
|
17366
|
+
});
|
|
17367
|
+
if (selectedGroupIds.size > 0) {
|
|
17368
|
+
entities.forEach((e2, i) => {
|
|
17369
|
+
const gid = getCheckboxGroupId(e2, i);
|
|
17370
|
+
if (gid && selectedGroupIds.has(gid)) {
|
|
17371
|
+
const id2 = getIdOrCodeOrIndex(e2, i);
|
|
17372
|
+
if (!newIdMap[id2]) {
|
|
17373
|
+
newIdMap[id2] = { entity: e2, time: Date.now() };
|
|
17374
|
+
}
|
|
17375
|
+
}
|
|
17376
|
+
});
|
|
17377
|
+
}
|
|
17378
|
+
}
|
|
17346
17379
|
finalizeSelection({
|
|
17347
17380
|
idMap: newIdMap,
|
|
17348
17381
|
entities,
|
|
@@ -51838,6 +51871,7 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
51838
51871
|
resetDefaultVisibility,
|
|
51839
51872
|
currentParams,
|
|
51840
51873
|
compact,
|
|
51874
|
+
hideExpandSubCompColumn,
|
|
51841
51875
|
editingCell,
|
|
51842
51876
|
editingCellSelectAll,
|
|
51843
51877
|
entities,
|
|
@@ -51885,7 +51919,8 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
51885
51919
|
withSort = true,
|
|
51886
51920
|
recordIdToIsVisibleMap,
|
|
51887
51921
|
setRecordIdToIsVisibleMap,
|
|
51888
|
-
withDisplayOptions
|
|
51922
|
+
withDisplayOptions,
|
|
51923
|
+
getCheckboxGroupId
|
|
51889
51924
|
}) => {
|
|
51890
51925
|
const dispatch = useDispatch();
|
|
51891
51926
|
const change$1 = useCallback$1(
|
|
@@ -52133,6 +52168,14 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52133
52168
|
return /* @__PURE__ */ React__default.createElement("div", null);
|
|
52134
52169
|
}
|
|
52135
52170
|
const entity = entities[rowIndex];
|
|
52171
|
+
if (getCheckboxGroupId) {
|
|
52172
|
+
const currentGroupId = getCheckboxGroupId(entity, rowIndex);
|
|
52173
|
+
const previousEntity = entities[rowIndex - 1];
|
|
52174
|
+
const previousGroupId = previousEntity ? getCheckboxGroupId(previousEntity, rowIndex - 1) : void 0;
|
|
52175
|
+
if (currentGroupId && currentGroupId === previousGroupId) {
|
|
52176
|
+
return /* @__PURE__ */ React__default.createElement("div", null);
|
|
52177
|
+
}
|
|
52178
|
+
}
|
|
52136
52179
|
return /* @__PURE__ */ React__default.createElement(
|
|
52137
52180
|
Checkbox,
|
|
52138
52181
|
{
|
|
@@ -52151,7 +52194,8 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52151
52194
|
onMultiRowSelect,
|
|
52152
52195
|
noDeselectAll,
|
|
52153
52196
|
onRowSelect,
|
|
52154
|
-
change: change$1
|
|
52197
|
+
change: change$1,
|
|
52198
|
+
getCheckboxGroupId
|
|
52155
52199
|
});
|
|
52156
52200
|
}, "onClick"),
|
|
52157
52201
|
checked: isSelected
|
|
@@ -52172,7 +52216,8 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52172
52216
|
onRowSelect,
|
|
52173
52217
|
onSingleRowSelect,
|
|
52174
52218
|
reduxFormSelectedEntityIdMap,
|
|
52175
|
-
withCheckboxes
|
|
52219
|
+
withCheckboxes,
|
|
52220
|
+
getCheckboxGroupId
|
|
52176
52221
|
]
|
|
52177
52222
|
);
|
|
52178
52223
|
const finishCellEdit = useCallback$1(
|
|
@@ -52247,13 +52292,14 @@ const useColumns = /* @__PURE__ */ __name(({
|
|
|
52247
52292
|
);
|
|
52248
52293
|
}, "Header")
|
|
52249
52294
|
}), {
|
|
52295
|
+
show: !hideExpandSubCompColumn,
|
|
52250
52296
|
expander: true,
|
|
52251
52297
|
Expander: /* @__PURE__ */ __name(({ isExpanded, original: record }) => {
|
|
52252
52298
|
let shouldShow = true;
|
|
52253
52299
|
if (shouldShowSubComponent) {
|
|
52254
52300
|
shouldShow = shouldShowSubComponent(record);
|
|
52255
52301
|
}
|
|
52256
|
-
if (!shouldShow) return null;
|
|
52302
|
+
if (!shouldShow || hideExpandSubCompColumn) return null;
|
|
52257
52303
|
return /* @__PURE__ */ React__default.createElement(
|
|
52258
52304
|
Button,
|
|
52259
52305
|
{
|
|
@@ -56795,6 +56841,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56795
56841
|
minimalStyle,
|
|
56796
56842
|
mustClickCheckboxToSelect,
|
|
56797
56843
|
noDeselectAll,
|
|
56844
|
+
hideExpandSubCompColumn,
|
|
56798
56845
|
noFooter = isSimple ? !withPaging : false,
|
|
56799
56846
|
noFullscreenButton = isSimple,
|
|
56800
56847
|
noHeader = false,
|
|
@@ -56842,7 +56889,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56842
56889
|
withSort,
|
|
56843
56890
|
withTitle = !isSimple,
|
|
56844
56891
|
noExcessiveCheck,
|
|
56845
|
-
isEntityCountLoading
|
|
56892
|
+
isEntityCountLoading,
|
|
56893
|
+
getCheckboxGroupId
|
|
56846
56894
|
} = props;
|
|
56847
56895
|
const _entities = useMemo$1(
|
|
56848
56896
|
() => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
|
|
@@ -58379,6 +58427,15 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58379
58427
|
const isExpanded = expandedEntityIdMap[rowId];
|
|
58380
58428
|
const rowDisabled = isEntityDisabled(entity);
|
|
58381
58429
|
const dataId = entity.id || entity.code;
|
|
58430
|
+
let noGroupBorder = false;
|
|
58431
|
+
if (getCheckboxGroupId) {
|
|
58432
|
+
const currentGroupId = getCheckboxGroupId(entity, rowInfo.index);
|
|
58433
|
+
const nextEntity = entities[rowInfo.index + 1];
|
|
58434
|
+
const nextGroupId = nextEntity ? getCheckboxGroupId(nextEntity, rowInfo.index + 1) : void 0;
|
|
58435
|
+
if (currentGroupId && currentGroupId === nextGroupId) {
|
|
58436
|
+
noGroupBorder = true;
|
|
58437
|
+
}
|
|
58438
|
+
}
|
|
58382
58439
|
return {
|
|
58383
58440
|
onClick: /* @__PURE__ */ __name((e) => {
|
|
58384
58441
|
if (isCellEditable) return;
|
|
@@ -58405,7 +58462,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58405
58462
|
onMultiRowSelect,
|
|
58406
58463
|
noDeselectAll,
|
|
58407
58464
|
onRowSelect,
|
|
58408
|
-
change: change$1
|
|
58465
|
+
change: change$1,
|
|
58466
|
+
getCheckboxGroupId
|
|
58409
58467
|
});
|
|
58410
58468
|
}, "onClick"),
|
|
58411
58469
|
//row right click
|
|
@@ -58447,9 +58505,11 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58447
58505
|
{
|
|
58448
58506
|
disabled: rowDisabled,
|
|
58449
58507
|
selected: rowSelected && !withCheckboxes,
|
|
58450
|
-
"rt-tr-last-row": rowInfo.index === entities.length - 1
|
|
58508
|
+
"rt-tr-last-row": rowInfo.index === entities.length - 1,
|
|
58509
|
+
"no-group-border": noGroupBorder
|
|
58451
58510
|
}
|
|
58452
58511
|
),
|
|
58512
|
+
"data-test-selected": !!rowSelected,
|
|
58453
58513
|
"data-test-id": dataId === void 0 ? rowInfo.index : dataId,
|
|
58454
58514
|
"data-index": rowInfo.index,
|
|
58455
58515
|
"data-tip": typeof rowDisabled === "string" ? rowDisabled : void 0,
|
|
@@ -58480,7 +58540,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58480
58540
|
reduxFormSelectedEntityIdMap,
|
|
58481
58541
|
selectedCells,
|
|
58482
58542
|
showContextMenu2,
|
|
58483
|
-
withCheckboxes
|
|
58543
|
+
withCheckboxes,
|
|
58544
|
+
getCheckboxGroupId
|
|
58484
58545
|
]
|
|
58485
58546
|
);
|
|
58486
58547
|
const getTableCellProps = useCallback$1(
|
|
@@ -58793,6 +58854,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58793
58854
|
isSingleSelect,
|
|
58794
58855
|
isSelectionARectangle,
|
|
58795
58856
|
noDeselectAll,
|
|
58857
|
+
hideExpandSubCompColumn,
|
|
58796
58858
|
noSelect,
|
|
58797
58859
|
noUserSelect,
|
|
58798
58860
|
onDeselect,
|
|
@@ -58824,6 +58886,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
58824
58886
|
withFilter,
|
|
58825
58887
|
withSort,
|
|
58826
58888
|
recordIdToIsVisibleMap,
|
|
58889
|
+
getCheckboxGroupId,
|
|
58827
58890
|
setRecordIdToIsVisibleMap
|
|
58828
58891
|
});
|
|
58829
58892
|
const scrollToTop = useCallback$1(
|
|
@@ -66948,9 +67011,19 @@ function AdvancedOptions({
|
|
|
66948
67011
|
content: content2,
|
|
66949
67012
|
label,
|
|
66950
67013
|
style: style2,
|
|
66951
|
-
isOpenByDefault
|
|
67014
|
+
isOpenByDefault,
|
|
67015
|
+
localStorageKey
|
|
66952
67016
|
}) {
|
|
66953
|
-
const [isOpen, setOpen] = useState(
|
|
67017
|
+
const [isOpen, setOpen] = useState(() => {
|
|
67018
|
+
if (localStorageKey) {
|
|
67019
|
+
if (window.localStorage.getItem(localStorageKey) === "true") {
|
|
67020
|
+
return true;
|
|
67021
|
+
} else if (window.localStorage.getItem(localStorageKey) === "false") {
|
|
67022
|
+
return false;
|
|
67023
|
+
}
|
|
67024
|
+
}
|
|
67025
|
+
return isOpenByDefault;
|
|
67026
|
+
});
|
|
66954
67027
|
if (!(content2 || children)) {
|
|
66955
67028
|
return null;
|
|
66956
67029
|
}
|
|
@@ -66958,20 +67031,28 @@ function AdvancedOptions({
|
|
|
66958
67031
|
"div",
|
|
66959
67032
|
{
|
|
66960
67033
|
onClick: /* @__PURE__ */ __name(() => {
|
|
66961
|
-
|
|
67034
|
+
const newIsOpen = !isOpen;
|
|
67035
|
+
setOpen(newIsOpen);
|
|
67036
|
+
if (localStorageKey) {
|
|
67037
|
+
window.localStorage.setItem(localStorageKey, newIsOpen);
|
|
67038
|
+
}
|
|
66962
67039
|
}, "onClick"),
|
|
66963
|
-
style: {
|
|
66964
|
-
|
|
67040
|
+
style: {
|
|
67041
|
+
cursor: "pointer",
|
|
67042
|
+
display: "flex",
|
|
67043
|
+
alignItems: "center",
|
|
67044
|
+
userSelect: "none"
|
|
67045
|
+
},
|
|
67046
|
+
className: `tg-toggle-advanced-options`
|
|
66965
67047
|
},
|
|
66966
|
-
label || "Advanced",
|
|
66967
|
-
" ",
|
|
66968
67048
|
/* @__PURE__ */ React__default.createElement(
|
|
66969
67049
|
Icon,
|
|
66970
67050
|
{
|
|
66971
67051
|
icon: isOpen ? "caret-down" : "caret-right",
|
|
66972
|
-
style: {
|
|
67052
|
+
style: { marginRight: 5 }
|
|
66973
67053
|
}
|
|
66974
|
-
)
|
|
67054
|
+
),
|
|
67055
|
+
/* @__PURE__ */ React__default.createElement("strong", null, label || "Advanced")
|
|
66975
67056
|
), isOpen && /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10 } }, content2 || children));
|
|
66976
67057
|
}
|
|
66977
67058
|
__name(AdvancedOptions, "AdvancedOptions");
|
|
@@ -70265,6 +70346,7 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React_
|
|
|
70265
70346
|
topLeft: true,
|
|
70266
70347
|
topRight: true
|
|
70267
70348
|
},
|
|
70349
|
+
resizeHandleWrapperClass: "tg-dialog-resize-handle",
|
|
70268
70350
|
maxHeight: windowHeight,
|
|
70269
70351
|
maxWidth: windowWidth,
|
|
70270
70352
|
bounds: "window",
|
|
@@ -84331,6 +84413,160 @@ function calculateNebTm(sequence2, { monovalentCationConc = 0.05, primerConc = 5
|
|
|
84331
84413
|
}
|
|
84332
84414
|
}
|
|
84333
84415
|
__name(calculateNebTm, "calculateNebTm");
|
|
84416
|
+
const PRIMER3_PARAMS = {
|
|
84417
|
+
saltMonovalent: 50,
|
|
84418
|
+
// mM
|
|
84419
|
+
saltDivalent: 1.5,
|
|
84420
|
+
// mM
|
|
84421
|
+
dntpConc: 0.6,
|
|
84422
|
+
// mM
|
|
84423
|
+
dnaConc: 50,
|
|
84424
|
+
// nM
|
|
84425
|
+
R: 1.987
|
|
84426
|
+
// Gas constant (cal/K·mol)
|
|
84427
|
+
};
|
|
84428
|
+
const SANTA_LUCIA_NN = {
|
|
84429
|
+
AA: { dH: -7.9, dS: -22.2 },
|
|
84430
|
+
TT: { dH: -7.9, dS: -22.2 },
|
|
84431
|
+
AT: { dH: -7.2, dS: -20.4 },
|
|
84432
|
+
TA: { dH: -7.2, dS: -21.3 },
|
|
84433
|
+
CA: { dH: -8.5, dS: -22.7 },
|
|
84434
|
+
TG: { dH: -8.5, dS: -22.7 },
|
|
84435
|
+
GT: { dH: -8.4, dS: -22.4 },
|
|
84436
|
+
AC: { dH: -8.4, dS: -22.4 },
|
|
84437
|
+
CT: { dH: -7.8, dS: -21 },
|
|
84438
|
+
AG: { dH: -7.8, dS: -21 },
|
|
84439
|
+
GA: { dH: -8.2, dS: -22.2 },
|
|
84440
|
+
TC: { dH: -8.2, dS: -22.2 },
|
|
84441
|
+
CG: { dH: -10.6, dS: -27.2 },
|
|
84442
|
+
GC: { dH: -9.8, dS: -24.4 },
|
|
84443
|
+
GG: { dH: -8, dS: -19.9 },
|
|
84444
|
+
CC: { dH: -8, dS: -19.9 }
|
|
84445
|
+
};
|
|
84446
|
+
const SANTA_LUCIA_INIT = {
|
|
84447
|
+
GC: { dH: 0.1, dS: -2.8 },
|
|
84448
|
+
// initiation with terminal GC
|
|
84449
|
+
AT: { dH: 2.3, dS: 4.1 }
|
|
84450
|
+
// initiation with terminal AT
|
|
84451
|
+
};
|
|
84452
|
+
function getEffectiveMonovalentConc() {
|
|
84453
|
+
let effectiveMono = PRIMER3_PARAMS.saltMonovalent;
|
|
84454
|
+
{
|
|
84455
|
+
const freeMg = Math.max(
|
|
84456
|
+
0,
|
|
84457
|
+
PRIMER3_PARAMS.saltDivalent - PRIMER3_PARAMS.dntpConc
|
|
84458
|
+
);
|
|
84459
|
+
effectiveMono += 120 * Math.sqrt(freeMg);
|
|
84460
|
+
}
|
|
84461
|
+
return effectiveMono;
|
|
84462
|
+
}
|
|
84463
|
+
__name(getEffectiveMonovalentConc, "getEffectiveMonovalentConc");
|
|
84464
|
+
function applySaltCorrection(deltaS, nnPairs) {
|
|
84465
|
+
const effectiveMono = getEffectiveMonovalentConc();
|
|
84466
|
+
return deltaS + 0.368 * nnPairs * Math.log(effectiveMono / 1e3);
|
|
84467
|
+
}
|
|
84468
|
+
__name(applySaltCorrection, "applySaltCorrection");
|
|
84469
|
+
function isValidSequence(sequence2) {
|
|
84470
|
+
return /^[ATGCN]+$/.test(sequence2);
|
|
84471
|
+
}
|
|
84472
|
+
__name(isValidSequence, "isValidSequence");
|
|
84473
|
+
function calculateSantaLuciaTm(sequence2) {
|
|
84474
|
+
try {
|
|
84475
|
+
sequence2 = sequence2 == null ? void 0 : sequence2.toUpperCase().trim();
|
|
84476
|
+
if (!isValidSequence(sequence2)) {
|
|
84477
|
+
throw new Error("Invalid sequence: contains non-DNA characters");
|
|
84478
|
+
}
|
|
84479
|
+
if (sequence2.length < 2) {
|
|
84480
|
+
throw new Error("Sequence too short: minimum length is 2 bases");
|
|
84481
|
+
}
|
|
84482
|
+
let deltaH = 0;
|
|
84483
|
+
let deltaS = 0;
|
|
84484
|
+
for (let i = 0; i < sequence2.length - 1; i++) {
|
|
84485
|
+
const dinucleotide = sequence2.substring(i, i + 2);
|
|
84486
|
+
if (dinucleotide.includes("N")) {
|
|
84487
|
+
continue;
|
|
84488
|
+
}
|
|
84489
|
+
const params = SANTA_LUCIA_NN[dinucleotide];
|
|
84490
|
+
if (params) {
|
|
84491
|
+
deltaH += params.dH;
|
|
84492
|
+
deltaS += params.dS;
|
|
84493
|
+
}
|
|
84494
|
+
}
|
|
84495
|
+
const firstBase = sequence2[0];
|
|
84496
|
+
const lastBase = sequence2[sequence2.length - 1];
|
|
84497
|
+
if (firstBase === "G" || firstBase === "C") {
|
|
84498
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84499
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84500
|
+
} else {
|
|
84501
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84502
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84503
|
+
}
|
|
84504
|
+
if (lastBase === "G" || lastBase === "C") {
|
|
84505
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84506
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84507
|
+
} else {
|
|
84508
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84509
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84510
|
+
}
|
|
84511
|
+
const nnPairs = sequence2.length - 1;
|
|
84512
|
+
deltaS = applySaltCorrection(deltaS, nnPairs);
|
|
84513
|
+
const C = PRIMER3_PARAMS.dnaConc * 1e-9;
|
|
84514
|
+
const Tm = deltaH * 1e3 / (deltaS + PRIMER3_PARAMS.R * Math.log(C / 4));
|
|
84515
|
+
return Tm - 273.15;
|
|
84516
|
+
} catch (e) {
|
|
84517
|
+
return `Error calculating Tm for sequence ${sequence2}. ${e}`;
|
|
84518
|
+
}
|
|
84519
|
+
}
|
|
84520
|
+
__name(calculateSantaLuciaTm, "calculateSantaLuciaTm");
|
|
84521
|
+
function calculateEndStability(sequence2) {
|
|
84522
|
+
try {
|
|
84523
|
+
sequence2 = sequence2 == null ? void 0 : sequence2.toUpperCase().trim();
|
|
84524
|
+
if (!isValidSequence(sequence2)) {
|
|
84525
|
+
throw new Error("Invalid sequence: contains non-DNA characters");
|
|
84526
|
+
}
|
|
84527
|
+
if (sequence2.length < 5) {
|
|
84528
|
+
throw new Error(
|
|
84529
|
+
"Sequence too short: minimum length is 5 bases for end stability calculation"
|
|
84530
|
+
);
|
|
84531
|
+
}
|
|
84532
|
+
const last5Bases = sequence2.substring(sequence2.length - 5);
|
|
84533
|
+
let deltaH = 0;
|
|
84534
|
+
let deltaS = 0;
|
|
84535
|
+
for (let i = 0; i < 4; i++) {
|
|
84536
|
+
const dinucleotide = last5Bases.substring(i, i + 2);
|
|
84537
|
+
if (dinucleotide.includes("N")) {
|
|
84538
|
+
continue;
|
|
84539
|
+
}
|
|
84540
|
+
const params = SANTA_LUCIA_NN[dinucleotide];
|
|
84541
|
+
if (params) {
|
|
84542
|
+
deltaH += params.dH;
|
|
84543
|
+
deltaS += params.dS;
|
|
84544
|
+
}
|
|
84545
|
+
}
|
|
84546
|
+
const firstBase = last5Bases[0];
|
|
84547
|
+
const lastBase = last5Bases[last5Bases.length - 1];
|
|
84548
|
+
if (firstBase === "G" || firstBase === "C") {
|
|
84549
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84550
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84551
|
+
} else {
|
|
84552
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84553
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84554
|
+
}
|
|
84555
|
+
if (lastBase === "G" || lastBase === "C") {
|
|
84556
|
+
deltaH += SANTA_LUCIA_INIT.GC.dH;
|
|
84557
|
+
deltaS += SANTA_LUCIA_INIT.GC.dS;
|
|
84558
|
+
} else {
|
|
84559
|
+
deltaH += SANTA_LUCIA_INIT.AT.dH;
|
|
84560
|
+
deltaS += SANTA_LUCIA_INIT.AT.dS;
|
|
84561
|
+
}
|
|
84562
|
+
const T2 = 310.15;
|
|
84563
|
+
const deltaG = deltaH - T2 * deltaS / 1e3;
|
|
84564
|
+
return Math.round(Math.abs(deltaG) * 100) / 100;
|
|
84565
|
+
} catch (e) {
|
|
84566
|
+
return `Error calculating end stability for sequence ${sequence2}. ${e}`;
|
|
84567
|
+
}
|
|
84568
|
+
}
|
|
84569
|
+
__name(calculateEndStability, "calculateEndStability");
|
|
84334
84570
|
function convertAACaretPositionOrRangeToDna(rangeOrCaret) {
|
|
84335
84571
|
if (typeof rangeOrCaret === "object" && rangeOrCaret !== null) {
|
|
84336
84572
|
return convertAARangeToDnaRange(__spreadProps(__spreadValues({}, rangeOrCaret), {
|
|
@@ -97020,6 +97256,30 @@ const selectedPartTags$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
97020
97256
|
default: selectedPartTags,
|
|
97021
97257
|
updateSelectedPartTags
|
|
97022
97258
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
97259
|
+
const updateTemporaryAnnotations = createMetaAction(
|
|
97260
|
+
"TEMPORARY_ANNOTATIONS_UPDATE"
|
|
97261
|
+
);
|
|
97262
|
+
const temporaryAnnotations = createMergedDefaultStateReducer(
|
|
97263
|
+
{
|
|
97264
|
+
TEMPORARY_ANNOTATIONS_UPDATE: /* @__PURE__ */ __name((state2, payload) => {
|
|
97265
|
+
return __spreadValues(__spreadValues({}, state2), payload);
|
|
97266
|
+
}, "TEMPORARY_ANNOTATIONS_UPDATE"),
|
|
97267
|
+
VECTOR_EDITOR_UPDATE: /* @__PURE__ */ __name((state2, payload) => {
|
|
97268
|
+
return __spreadValues(__spreadValues({}, state2), payload.temporaryAnnotations);
|
|
97269
|
+
}, "VECTOR_EDITOR_UPDATE")
|
|
97270
|
+
},
|
|
97271
|
+
{
|
|
97272
|
+
features: {},
|
|
97273
|
+
primers: {},
|
|
97274
|
+
parts: {},
|
|
97275
|
+
selectionLayer: {}
|
|
97276
|
+
}
|
|
97277
|
+
);
|
|
97278
|
+
const temporaryAnnotations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97279
|
+
__proto__: null,
|
|
97280
|
+
default: temporaryAnnotations,
|
|
97281
|
+
updateTemporaryAnnotations
|
|
97282
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
97023
97283
|
const vectorEditorMiddleware = /* @__PURE__ */ __name((store2) => (next) => (action2) => {
|
|
97024
97284
|
if (action2.meta && action2.meta.disregardUndo) {
|
|
97025
97285
|
return next(action2);
|
|
@@ -97135,7 +97395,8 @@ const subReducers = {
|
|
|
97135
97395
|
partLengthsToHide: partLengthsToHide$1,
|
|
97136
97396
|
primerLengthsToHide: primerLengthsToHide$1,
|
|
97137
97397
|
featureLengthsToHide: featureLengthsToHide$1,
|
|
97138
|
-
selectedPartTags: selectedPartTags$1
|
|
97398
|
+
selectedPartTags: selectedPartTags$1,
|
|
97399
|
+
temporaryAnnotations: temporaryAnnotations$1
|
|
97139
97400
|
};
|
|
97140
97401
|
const vectorEditorInitialize = createMetaAction("VECTOR_EDITOR_UPDATE");
|
|
97141
97402
|
const vectorEditorClear = createMetaAction("VECTOR_EDITOR_CLEAR");
|
|
@@ -97900,11 +98161,16 @@ const translationSearchMatchesSelector = createSelector(
|
|
|
97900
98161
|
return searchLayers;
|
|
97901
98162
|
}
|
|
97902
98163
|
);
|
|
97903
|
-
|
|
97904
|
-
|
|
98164
|
+
const temporaryAnnotationsSelector = /* @__PURE__ */ __name((editor) => editor.temporaryAnnotations, "temporaryAnnotationsSelector");
|
|
98165
|
+
function featuresRawSelector(sequenceData2, temporaryAnnotations2) {
|
|
98166
|
+
return __spreadValues(__spreadValues({}, sequenceData2.features), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.features);
|
|
97905
98167
|
}
|
|
97906
98168
|
__name(featuresRawSelector, "featuresRawSelector");
|
|
97907
|
-
const featuresSelector = createSelector(
|
|
98169
|
+
const featuresSelector = createSelector(
|
|
98170
|
+
sequenceDataSelector,
|
|
98171
|
+
temporaryAnnotationsSelector,
|
|
98172
|
+
featuresRawSelector
|
|
98173
|
+
);
|
|
97908
98174
|
function cdsFeaturesRawSelector(features2) {
|
|
97909
98175
|
return filter(features2, ({ type: type2 }) => type2 && type2.toUpperCase() === "CDS");
|
|
97910
98176
|
}
|
|
@@ -98184,11 +98450,15 @@ const filteredFeaturesSelector$1 = createSelector(
|
|
|
98184
98450
|
(state2) => state2.featureLengthsToHide,
|
|
98185
98451
|
filteredFeaturesSelector
|
|
98186
98452
|
);
|
|
98187
|
-
function primersRawSelector(sequenceData2) {
|
|
98188
|
-
return sequenceData2.primers;
|
|
98453
|
+
function primersRawSelector(sequenceData2, temporaryAnnotations2) {
|
|
98454
|
+
return __spreadValues(__spreadValues({}, sequenceData2.primers), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.primers);
|
|
98189
98455
|
}
|
|
98190
98456
|
__name(primersRawSelector, "primersRawSelector");
|
|
98191
|
-
const primersSelector = createSelector(
|
|
98457
|
+
const primersSelector = createSelector(
|
|
98458
|
+
sequenceDataSelector,
|
|
98459
|
+
temporaryAnnotationsSelector,
|
|
98460
|
+
primersRawSelector
|
|
98461
|
+
);
|
|
98192
98462
|
function filteredPrimersSelector(primers2, seqLen, primerIndividualToHide, lengthsToHide) {
|
|
98193
98463
|
return omitBy(primers2, (ann) => {
|
|
98194
98464
|
const hideIndividually = primerIndividualToHide[ann.id];
|
|
@@ -98203,11 +98473,15 @@ const filteredPrimersSelector$1 = createSelector(
|
|
|
98203
98473
|
(state2) => state2.primerLengthsToHide,
|
|
98204
98474
|
filteredPrimersSelector
|
|
98205
98475
|
);
|
|
98206
|
-
function partsRawSelector(sequenceData2) {
|
|
98207
|
-
return sequenceData2.parts;
|
|
98476
|
+
function partsRawSelector(sequenceData2, temporaryAnnotations2) {
|
|
98477
|
+
return __spreadValues(__spreadValues({}, sequenceData2.parts), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.parts);
|
|
98208
98478
|
}
|
|
98209
98479
|
__name(partsRawSelector, "partsRawSelector");
|
|
98210
|
-
const partsSelector = createSelector(
|
|
98480
|
+
const partsSelector = createSelector(
|
|
98481
|
+
sequenceDataSelector,
|
|
98482
|
+
temporaryAnnotationsSelector,
|
|
98483
|
+
partsRawSelector
|
|
98484
|
+
);
|
|
98211
98485
|
const tagsToBoldSelector = /* @__PURE__ */ __name((state2) => state2.selectedPartTags.parts, "tagsToBoldSelector");
|
|
98212
98486
|
function addWrappedAddons(anns, seqLen) {
|
|
98213
98487
|
return flatMap(anns, (ann) => {
|
|
@@ -99034,7 +99308,8 @@ function updateEditor(store2, editorName, initialValues2 = {}, extraMeta = {}, {
|
|
|
99034
99308
|
annotationVisibility: annotationVisibility2,
|
|
99035
99309
|
annotationsToSupport: annotationsToSupport2,
|
|
99036
99310
|
findTool: findTool2,
|
|
99037
|
-
justPassingPartialSeqData
|
|
99311
|
+
justPassingPartialSeqData,
|
|
99312
|
+
temporaryAnnotations: temporaryAnnotations2
|
|
99038
99313
|
} = initialValues2;
|
|
99039
99314
|
const currentEditor = store2.getState().VectorEditor[editorName] || {};
|
|
99040
99315
|
const isAlreadyProteinEditor = currentEditor.sequenceData && currentEditor.sequenceData.isProtein;
|
|
@@ -99156,12 +99431,14 @@ function updateEditor(store2, editorName, initialValues2 = {}, extraMeta = {}, {
|
|
|
99156
99431
|
};
|
|
99157
99432
|
}
|
|
99158
99433
|
}
|
|
99159
|
-
payload = __spreadValues(__spreadValues(__spreadValues({}, initialValues2), toSpread), sequenceData2 && {
|
|
99434
|
+
payload = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialValues2), toSpread), sequenceData2 && {
|
|
99160
99435
|
sequenceData: tidyUpSequenceData(sequenceData2, {
|
|
99161
99436
|
convertAnnotationsFromAAIndices,
|
|
99162
99437
|
//if we have sequence data coming in make sure to tidy it up for the user :)
|
|
99163
99438
|
annotationsAsObjects: true
|
|
99164
99439
|
})
|
|
99440
|
+
}), temporaryAnnotations2 && {
|
|
99441
|
+
temporaryAnnotations: temporaryAnnotations2
|
|
99165
99442
|
});
|
|
99166
99443
|
}
|
|
99167
99444
|
annotationTypes.forEach((t2) => {
|
|
@@ -116636,7 +116913,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
116636
116913
|
input.click();
|
|
116637
116914
|
}
|
|
116638
116915
|
__name(showFileDialog, "showFileDialog");
|
|
116639
|
-
const version = "0.8.
|
|
116916
|
+
const version = "0.8.20";
|
|
116640
116917
|
const packageJson = {
|
|
116641
116918
|
version
|
|
116642
116919
|
};
|
|
@@ -137336,7 +137613,7 @@ function MeltingTemp({
|
|
|
137336
137613
|
/* , setMonovalentCationConc */
|
|
137337
137614
|
] = React__default.useState(0.05);
|
|
137338
137615
|
const [tmType, setTmType] = useTmType();
|
|
137339
|
-
let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence2, {
|
|
137616
|
+
let tm = (tmType === "neb_tm" ? calculateNebTm : tmType === "default" ? calculateSantaLuciaTm : calculateTm)(sequence2, {
|
|
137340
137617
|
monovalentCationConc,
|
|
137341
137618
|
primerConc
|
|
137342
137619
|
});
|
|
@@ -137361,8 +137638,9 @@ function MeltingTemp({
|
|
|
137361
137638
|
{
|
|
137362
137639
|
label: "Choose Tm Type:",
|
|
137363
137640
|
options: [
|
|
137364
|
-
{ value: "default", label: "
|
|
137365
|
-
{ value: "
|
|
137641
|
+
{ value: "default", label: "Santa Lucia (Default)" },
|
|
137642
|
+
{ value: "breslauer", label: "Breslauer" },
|
|
137643
|
+
{ value: "neb_tm", label: "NEB Tm" }
|
|
137366
137644
|
],
|
|
137367
137645
|
onChange: /* @__PURE__ */ __name((e) => setTmType(e.target.value), "onChange"),
|
|
137368
137646
|
selectedValue: tmType
|
|
@@ -137376,7 +137654,7 @@ function MeltingTemp({
|
|
|
137376
137654
|
}
|
|
137377
137655
|
), hasWarning, /* @__PURE__ */ React__default.createElement("br", null), /* @__PURE__ */ React__default.createElement("br", null), "Try using the Default Tm"))
|
|
137378
137656
|
},
|
|
137379
|
-
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(InnerWrapper, null, "Melting Temp: ", Number(tm) || 0, "
|
|
137657
|
+
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(InnerWrapper, null, "Melting Temp: ", Number(tm) || 0, "°C"), hasWarning && /* @__PURE__ */ React__default.createElement(
|
|
137380
137658
|
Icon,
|
|
137381
137659
|
{
|
|
137382
137660
|
style: { marginLeft: 5, marginRight: 5 },
|
|
@@ -137640,12 +137918,24 @@ const RenderBases = /* @__PURE__ */ __name((props) => {
|
|
|
137640
137918
|
)), /* @__PURE__ */ React__default.createElement(
|
|
137641
137919
|
MeltingTemp,
|
|
137642
137920
|
{
|
|
137643
|
-
InnerWrapper:
|
|
137921
|
+
InnerWrapper: TextInnerWrapper,
|
|
137644
137922
|
sequence: bases
|
|
137645
137923
|
}
|
|
137646
|
-
))
|
|
137924
|
+
), /* @__PURE__ */ React__default.createElement(TextInnerWrapper, null, "GC content: ", bases && calculatePercentGC(bases).toFixed(1), "%"), /* @__PURE__ */ React__default.createElement(TextInnerWrapper, null, "3' Stability: ", bases && calculateEndStability(bases), " kcal/mol"))
|
|
137647
137925
|
);
|
|
137648
137926
|
}, "RenderBases");
|
|
137927
|
+
const TextInnerWrapper = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React__default.createElement(
|
|
137928
|
+
"div",
|
|
137929
|
+
{
|
|
137930
|
+
className: "bp3-text-muted bp3-text-small",
|
|
137931
|
+
style: {
|
|
137932
|
+
marginBottom: 15,
|
|
137933
|
+
marginTop: -5,
|
|
137934
|
+
fontStyle: "italic"
|
|
137935
|
+
}
|
|
137936
|
+
},
|
|
137937
|
+
p2.children
|
|
137938
|
+
), "TextInnerWrapper");
|
|
137649
137939
|
const AddOrEditPrimerDialog = AddOrEditAnnotationDialog$1({
|
|
137650
137940
|
formName: "AddOrEditPrimerDialog",
|
|
137651
137941
|
getProps: /* @__PURE__ */ __name((props) => ({
|
|
@@ -137654,14 +137944,6 @@ const AddOrEditPrimerDialog = AddOrEditAnnotationDialog$1({
|
|
|
137654
137944
|
RenderBases
|
|
137655
137945
|
}), "getProps")
|
|
137656
137946
|
});
|
|
137657
|
-
const InnerWrapperMeltingTemp = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React__default.createElement(
|
|
137658
|
-
"div",
|
|
137659
|
-
{
|
|
137660
|
-
className: "bp3-text-muted bp3-text-small",
|
|
137661
|
-
style: { marginBottom: 15, marginTop: -5, fontStyle: "italic" }
|
|
137662
|
-
},
|
|
137663
|
-
p2.children
|
|
137664
|
-
), "InnerWrapperMeltingTemp");
|
|
137665
137947
|
const Dialogs = {
|
|
137666
137948
|
RenameSequenceDialog,
|
|
137667
137949
|
PrintDialog: PrintDialog$1,
|