@teselagen/ove 0.5.19 → 0.5.20

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 CHANGED
@@ -72085,7 +72085,11 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React$
72085
72085
  };
72086
72086
  __name(_ResizableDraggableDialog, "ResizableDraggableDialog");
72087
72087
  let ResizableDraggableDialog = _ResizableDraggableDialog;
72088
- function MenuItemLink({ text: text2, onClick, icon, navTo, active: active3 }) {
72088
+ function MenuItemLink({ text: text2, onClick, icon, navTo, active: active3, disabled }) {
72089
+ console.log(`navTo:`, navTo);
72090
+ if (disabled) {
72091
+ return /* @__PURE__ */ React$2.createElement("li", { className: core.Classes.POPOVER_DISMISS }, /* @__PURE__ */ React$2.createElement(core.MenuItem, { icon, disabled: true, text: text2 }));
72092
+ }
72089
72093
  const handleLinkClick = /* @__PURE__ */ __name((e2) => {
72090
72094
  e2.target.closest(`.${core.Classes.POPOVER_DISMISS}`).click();
72091
72095
  }, "handleLinkClick");
@@ -72134,6 +72138,7 @@ const EnhancedMenuItem = compose(
72134
72138
  if (navTo) {
72135
72139
  MenuItemComp = MenuItemLink;
72136
72140
  }
72141
+ console.log(`navTo:`, navTo);
72137
72142
  return /* @__PURE__ */ React$2.createElement(
72138
72143
  MenuItemComp,
72139
72144
  __spreadProps(__spreadValues(__spreadValues({
@@ -72234,7 +72239,10 @@ const DynamicMenuItem = /* @__PURE__ */ __name(({
72234
72239
  ].reduce((v2, f2) => f2(v2, context), def);
72235
72240
  let out;
72236
72241
  if (item.divider !== void 0) {
72237
- out = /* @__PURE__ */ React$2.createElement(core.MenuDivider, __spreadValues({}, item.divider ? { title: item.divider } : {}));
72242
+ out = /* @__PURE__ */ React$2.createElement(
72243
+ core.MenuDivider,
72244
+ __spreadValues({}, item.divider ? { title: item.divider, className: item.className } : {})
72245
+ );
72238
72246
  } else {
72239
72247
  const ItemComponent = item.component || EnhancedMenuItem;
72240
72248
  out = /* @__PURE__ */ React$2.createElement(
@@ -80985,9 +80993,9 @@ const calcTmMethods = {
80985
80993
  // Helix initiation for deltaS
80986
80994
  R: 1.987,
80987
80995
  // Gas constant (cal/(K*mol)).
80988
- C: 5e-7,
80996
+ primerConc: 5e-7,
80989
80997
  // Oligo concentration. 0.5uM is typical for PCR.
80990
- Na: 0.05,
80998
+ monovalentCationConc: 0.05,
80991
80999
  // Monovalent salt concentration. 50mM is typical for PCR.
80992
81000
  /**
80993
81001
  * Calculates temperature for DNA sequence using a given algorithm.
@@ -80995,10 +81003,11 @@ const calcTmMethods = {
80995
81003
  * type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
80996
81004
  * A - Helix initation for deltaS. Defaults to -10.8.
80997
81005
  * R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
80998
- * Na - THe monovalent salt concentration. Defaults to 50e-3M.
81006
+ * monovalentCationConc - THe monovalent salt concentration. Defaults to 50e-3M.
80999
81007
  * return - Temperature for the given sequence, in Celsius.
81000
81008
  */
81001
- calculateTemperature: function(sequence2, type2, A2, R2, C, Na) {
81009
+ calculateTemperature: function(_sequence, { type: type2, A: A2, R: R2, primerConc, monovalentCationConc } = {}) {
81010
+ const sequence2 = _sequence.toLowerCase();
81002
81011
  if (typeof type2 === "undefined") {
81003
81012
  type2 = this.TABLE_BRESLAUER;
81004
81013
  } else if (type2 != this.TABLE_BRESLAUER && type2 != this.TABLE_UNIFIED && type2 != this.TABLE_SUGIMOTO) {
@@ -81010,11 +81019,11 @@ const calcTmMethods = {
81010
81019
  if (!R2) {
81011
81020
  R2 = this.R;
81012
81021
  }
81013
- if (!C) {
81014
- C = this.C;
81022
+ if (!primerConc) {
81023
+ primerConc = this.primerConc;
81015
81024
  }
81016
- if (!Na) {
81017
- Na = this.Na;
81025
+ if (!monovalentCationConc) {
81026
+ monovalentCationConc = this.monovalentCationConc;
81018
81027
  }
81019
81028
  const sequenceLength = sequence2.length;
81020
81029
  if (sequenceLength == 0) {
@@ -81045,11 +81054,8 @@ const calcTmMethods = {
81045
81054
  sumDeltaH = sumDeltaH + neighbors[i] * deltaHTable[i];
81046
81055
  sumDeltaS = sumDeltaS + neighbors[i] * deltaSTable[i];
81047
81056
  }
81048
- const temperature = -1e3 * sumDeltaH / (A2 + -sumDeltaS + R2 * Math.log(C / 4)) - 273.15 + 16.6 * Math.LOG10E * Math.log(Na);
81049
- if (temperature < 0) {
81050
- return 0;
81051
- }
81052
- return temperature.toFixed(2);
81057
+ const temperature = -1e3 * sumDeltaH / (A2 + -sumDeltaS + R2 * Math.log(primerConc / 4)) - 273.15 + 16.6 * Math.LOG10E * Math.log(monovalentCationConc);
81058
+ return temperature;
81053
81059
  },
81054
81060
  /**
81055
81061
  * @private
@@ -81119,6 +81125,39 @@ const calcTmMethods = {
81119
81125
  return null;
81120
81126
  }
81121
81127
  },
81128
+ // "AA/TT": -7.9, 7.9
81129
+ // "AT/TA": -7.2, 7.2
81130
+ // "AC/TG": -8.4, 8.4
81131
+ // "AG/TC": -7.8, 7.8
81132
+ // "TT/AA": -7.9, 7.9
81133
+ // "TA/AT": -7.2, 7.2
81134
+ // "TG/AC": -8.5, 8.2
81135
+ // "TC/AG": -8.2, 8.5
81136
+ // "CC/GG": -8.0, 8.0
81137
+ // "CA/GT": -8.5, 8.5
81138
+ // "CT/GA": -7.8, 7.8
81139
+ // "CG/GC": -10.6, 10.6
81140
+ // "GG/CC": -8.0, 8.0
81141
+ // "GA/CT": -8.2, 8.2,
81142
+ // "GT/CA": -8.4, 8.4
81143
+ // "GC/CG": -9.8, 9.8
81144
+ // aa, at, ac, ag, tt, ta, tc, tg, cc, ca, ct, cg, gg, ga, gt, gc
81145
+ // "AA/TT": -22.2,22.2,
81146
+ // "AT/TA": -20.4,20.4,
81147
+ // "AC/TG": -22.4,22.4,
81148
+ // "AG/TC": -21.0,21.0,
81149
+ // "TT/AA": -22.2,22.2,
81150
+ // "TA/AT": -21.3,21.3,
81151
+ // "TC/AG": -22.2,22.2,
81152
+ // "TG/AC": -22.7,22.7,
81153
+ // "CC/GG": -19.9,19.9,
81154
+ // "CA/GT": -22.7,22.7,
81155
+ // "CT/GA": -21.0,21.0,
81156
+ // "CG/GC": -27.2,27.2,
81157
+ // "GG/CC": -19.9,19.9,
81158
+ // "GT/CA": -22.4,22.2,
81159
+ // "GA/CT": -22.2,22.4,
81160
+ // "GC/CG": -24.4,24.4
81122
81161
  /**
81123
81162
  * @private
81124
81163
  * Function to return deltaS table for given algorithm.
@@ -89720,7 +89759,7 @@ function condensePairwiseAlignmentDifferences(referenceSeq, alignedSeq) {
89720
89759
  return overviewMinimapTrack.join("");
89721
89760
  }
89722
89761
  __name(condensePairwiseAlignmentDifferences, "condensePairwiseAlignmentDifferences");
89723
- function calculateNebTm(sequence2, primerConc, { monovalentCationConc } = {}) {
89762
+ function calculateNebTm(sequence2, { monovalentCationConc = 0.05, primerConc = 5e-7 } = {}) {
89724
89763
  try {
89725
89764
  const checkForDegenerateBases = /[^atgc]/i.test(sequence2);
89726
89765
  if (checkForDegenerateBases) {
@@ -122372,7 +122411,7 @@ function showFileDialog({ multiple = false, onSelect }) {
122372
122411
  }
122373
122412
  __name(showFileDialog, "showFileDialog");
122374
122413
  const name = "@teselagen/ove";
122375
- const version = "0.5.18";
122414
+ const version = "0.5.19";
122376
122415
  const main = "./src/index.js";
122377
122416
  const type = "module";
122378
122417
  const exports$1 = {
@@ -138712,11 +138751,22 @@ function MeltingTemp({
138712
138751
  WrapperToUse = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React$2.createElement("div", null, p2.children), "WrapperToUse"),
138713
138752
  InnerWrapper = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React$2.createElement(core.Button, { minimal: true, small: true }, p2.children), "InnerWrapper")
138714
138753
  }) {
138754
+ const [
138755
+ primerConc
138756
+ /* , setPrimerConcentration */
138757
+ ] = React$2.useState(5e-7);
138758
+ const [
138759
+ monovalentCationConc
138760
+ /* , setMonovalentCationConc */
138761
+ ] = React$2.useState(0.05);
138715
138762
  const [tmType, setTmType] = useTmType();
138716
- const tm = ({
138717
- default: calculateTm,
138718
- neb_tm: calculateNebTm
138719
- }[tmType] || calculateTm)((sequence2 || "").toLowerCase());
138763
+ let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence2, {
138764
+ monovalentCationConc,
138765
+ primerConc
138766
+ });
138767
+ if (isNumber$6(tm)) {
138768
+ tm = tm.toFixed(1);
138769
+ }
138720
138770
  const hasWarning = isString$3(tm) && tm.length > 7 && tm;
138721
138771
  return /* @__PURE__ */ React$2.createElement(WrapperToUse, { dataTest: "veStatusBar-selection-tm" }, /* @__PURE__ */ React$2.createElement(
138722
138772
  core.Popover,
@@ -138727,7 +138777,7 @@ function MeltingTemp({
138727
138777
  {
138728
138778
  rel: "noopener noreferrer",
138729
138779
  target: "_blank",
138730
- href: "https://github.com/TeselaGen/@teselagen/sequence-utils"
138780
+ href: "https://github.com/TeselaGen/tg-oss/blob/master/packages/sequence-utils/src/calculateNebTm.js"
138731
138781
  },
138732
138782
  "algorithms"
138733
138783
  ), /* @__PURE__ */ React$2.createElement("br", null), /* @__PURE__ */ React$2.createElement("br", null), /* @__PURE__ */ React$2.createElement(
@@ -138735,8 +138785,8 @@ function MeltingTemp({
138735
138785
  {
138736
138786
  label: "Choose Tm Type:",
138737
138787
  options: [
138738
- { value: "default", label: "Default Tm" },
138739
- { value: "neb_tm", label: "NEB Tm" }
138788
+ { value: "default", label: "Default Tm (Breslauer)" },
138789
+ { value: "neb_tm", label: "NEB Tm (SantaLucia)" }
138740
138790
  ],
138741
138791
  onChange: (e2) => setTmType(e2.target.value),
138742
138792
  selectedValue: tmType
package/index.es.js CHANGED
@@ -72067,7 +72067,11 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React_
72067
72067
  };
72068
72068
  __name(_ResizableDraggableDialog, "ResizableDraggableDialog");
72069
72069
  let ResizableDraggableDialog = _ResizableDraggableDialog;
72070
- function MenuItemLink({ text: text2, onClick, icon, navTo, active: active3 }) {
72070
+ function MenuItemLink({ text: text2, onClick, icon, navTo, active: active3, disabled }) {
72071
+ console.log(`navTo:`, navTo);
72072
+ if (disabled) {
72073
+ return /* @__PURE__ */ React__default$1.createElement("li", { className: Classes.POPOVER_DISMISS }, /* @__PURE__ */ React__default$1.createElement(MenuItem, { icon, disabled: true, text: text2 }));
72074
+ }
72071
72075
  const handleLinkClick = /* @__PURE__ */ __name((e2) => {
72072
72076
  e2.target.closest(`.${Classes.POPOVER_DISMISS}`).click();
72073
72077
  }, "handleLinkClick");
@@ -72116,6 +72120,7 @@ const EnhancedMenuItem = compose(
72116
72120
  if (navTo) {
72117
72121
  MenuItemComp = MenuItemLink;
72118
72122
  }
72123
+ console.log(`navTo:`, navTo);
72119
72124
  return /* @__PURE__ */ React__default$1.createElement(
72120
72125
  MenuItemComp,
72121
72126
  __spreadProps(__spreadValues(__spreadValues({
@@ -72216,7 +72221,10 @@ const DynamicMenuItem = /* @__PURE__ */ __name(({
72216
72221
  ].reduce((v2, f2) => f2(v2, context), def);
72217
72222
  let out;
72218
72223
  if (item.divider !== void 0) {
72219
- out = /* @__PURE__ */ React__default$1.createElement(MenuDivider, __spreadValues({}, item.divider ? { title: item.divider } : {}));
72224
+ out = /* @__PURE__ */ React__default$1.createElement(
72225
+ MenuDivider,
72226
+ __spreadValues({}, item.divider ? { title: item.divider, className: item.className } : {})
72227
+ );
72220
72228
  } else {
72221
72229
  const ItemComponent = item.component || EnhancedMenuItem;
72222
72230
  out = /* @__PURE__ */ React__default$1.createElement(
@@ -80967,9 +80975,9 @@ const calcTmMethods = {
80967
80975
  // Helix initiation for deltaS
80968
80976
  R: 1.987,
80969
80977
  // Gas constant (cal/(K*mol)).
80970
- C: 5e-7,
80978
+ primerConc: 5e-7,
80971
80979
  // Oligo concentration. 0.5uM is typical for PCR.
80972
- Na: 0.05,
80980
+ monovalentCationConc: 0.05,
80973
80981
  // Monovalent salt concentration. 50mM is typical for PCR.
80974
80982
  /**
80975
80983
  * Calculates temperature for DNA sequence using a given algorithm.
@@ -80977,10 +80985,11 @@ const calcTmMethods = {
80977
80985
  * type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
80978
80986
  * A - Helix initation for deltaS. Defaults to -10.8.
80979
80987
  * R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
80980
- * Na - THe monovalent salt concentration. Defaults to 50e-3M.
80988
+ * monovalentCationConc - THe monovalent salt concentration. Defaults to 50e-3M.
80981
80989
  * return - Temperature for the given sequence, in Celsius.
80982
80990
  */
80983
- calculateTemperature: function(sequence2, type2, A2, R2, C, Na) {
80991
+ calculateTemperature: function(_sequence, { type: type2, A: A2, R: R2, primerConc, monovalentCationConc } = {}) {
80992
+ const sequence2 = _sequence.toLowerCase();
80984
80993
  if (typeof type2 === "undefined") {
80985
80994
  type2 = this.TABLE_BRESLAUER;
80986
80995
  } else if (type2 != this.TABLE_BRESLAUER && type2 != this.TABLE_UNIFIED && type2 != this.TABLE_SUGIMOTO) {
@@ -80992,11 +81001,11 @@ const calcTmMethods = {
80992
81001
  if (!R2) {
80993
81002
  R2 = this.R;
80994
81003
  }
80995
- if (!C) {
80996
- C = this.C;
81004
+ if (!primerConc) {
81005
+ primerConc = this.primerConc;
80997
81006
  }
80998
- if (!Na) {
80999
- Na = this.Na;
81007
+ if (!monovalentCationConc) {
81008
+ monovalentCationConc = this.monovalentCationConc;
81000
81009
  }
81001
81010
  const sequenceLength = sequence2.length;
81002
81011
  if (sequenceLength == 0) {
@@ -81027,11 +81036,8 @@ const calcTmMethods = {
81027
81036
  sumDeltaH = sumDeltaH + neighbors[i] * deltaHTable[i];
81028
81037
  sumDeltaS = sumDeltaS + neighbors[i] * deltaSTable[i];
81029
81038
  }
81030
- const temperature = -1e3 * sumDeltaH / (A2 + -sumDeltaS + R2 * Math.log(C / 4)) - 273.15 + 16.6 * Math.LOG10E * Math.log(Na);
81031
- if (temperature < 0) {
81032
- return 0;
81033
- }
81034
- return temperature.toFixed(2);
81039
+ const temperature = -1e3 * sumDeltaH / (A2 + -sumDeltaS + R2 * Math.log(primerConc / 4)) - 273.15 + 16.6 * Math.LOG10E * Math.log(monovalentCationConc);
81040
+ return temperature;
81035
81041
  },
81036
81042
  /**
81037
81043
  * @private
@@ -81101,6 +81107,39 @@ const calcTmMethods = {
81101
81107
  return null;
81102
81108
  }
81103
81109
  },
81110
+ // "AA/TT": -7.9, 7.9
81111
+ // "AT/TA": -7.2, 7.2
81112
+ // "AC/TG": -8.4, 8.4
81113
+ // "AG/TC": -7.8, 7.8
81114
+ // "TT/AA": -7.9, 7.9
81115
+ // "TA/AT": -7.2, 7.2
81116
+ // "TG/AC": -8.5, 8.2
81117
+ // "TC/AG": -8.2, 8.5
81118
+ // "CC/GG": -8.0, 8.0
81119
+ // "CA/GT": -8.5, 8.5
81120
+ // "CT/GA": -7.8, 7.8
81121
+ // "CG/GC": -10.6, 10.6
81122
+ // "GG/CC": -8.0, 8.0
81123
+ // "GA/CT": -8.2, 8.2,
81124
+ // "GT/CA": -8.4, 8.4
81125
+ // "GC/CG": -9.8, 9.8
81126
+ // aa, at, ac, ag, tt, ta, tc, tg, cc, ca, ct, cg, gg, ga, gt, gc
81127
+ // "AA/TT": -22.2,22.2,
81128
+ // "AT/TA": -20.4,20.4,
81129
+ // "AC/TG": -22.4,22.4,
81130
+ // "AG/TC": -21.0,21.0,
81131
+ // "TT/AA": -22.2,22.2,
81132
+ // "TA/AT": -21.3,21.3,
81133
+ // "TC/AG": -22.2,22.2,
81134
+ // "TG/AC": -22.7,22.7,
81135
+ // "CC/GG": -19.9,19.9,
81136
+ // "CA/GT": -22.7,22.7,
81137
+ // "CT/GA": -21.0,21.0,
81138
+ // "CG/GC": -27.2,27.2,
81139
+ // "GG/CC": -19.9,19.9,
81140
+ // "GT/CA": -22.4,22.2,
81141
+ // "GA/CT": -22.2,22.4,
81142
+ // "GC/CG": -24.4,24.4
81104
81143
  /**
81105
81144
  * @private
81106
81145
  * Function to return deltaS table for given algorithm.
@@ -89702,7 +89741,7 @@ function condensePairwiseAlignmentDifferences(referenceSeq, alignedSeq) {
89702
89741
  return overviewMinimapTrack.join("");
89703
89742
  }
89704
89743
  __name(condensePairwiseAlignmentDifferences, "condensePairwiseAlignmentDifferences");
89705
- function calculateNebTm(sequence2, primerConc, { monovalentCationConc } = {}) {
89744
+ function calculateNebTm(sequence2, { monovalentCationConc = 0.05, primerConc = 5e-7 } = {}) {
89706
89745
  try {
89707
89746
  const checkForDegenerateBases = /[^atgc]/i.test(sequence2);
89708
89747
  if (checkForDegenerateBases) {
@@ -122354,7 +122393,7 @@ function showFileDialog({ multiple = false, onSelect }) {
122354
122393
  }
122355
122394
  __name(showFileDialog, "showFileDialog");
122356
122395
  const name = "@teselagen/ove";
122357
- const version = "0.5.18";
122396
+ const version = "0.5.19";
122358
122397
  const main = "./src/index.js";
122359
122398
  const type = "module";
122360
122399
  const exports$1 = {
@@ -138694,11 +138733,22 @@ function MeltingTemp({
138694
138733
  WrapperToUse = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React__default$1.createElement("div", null, p2.children), "WrapperToUse"),
138695
138734
  InnerWrapper = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React__default$1.createElement(Button, { minimal: true, small: true }, p2.children), "InnerWrapper")
138696
138735
  }) {
138736
+ const [
138737
+ primerConc
138738
+ /* , setPrimerConcentration */
138739
+ ] = React__default$1.useState(5e-7);
138740
+ const [
138741
+ monovalentCationConc
138742
+ /* , setMonovalentCationConc */
138743
+ ] = React__default$1.useState(0.05);
138697
138744
  const [tmType, setTmType] = useTmType();
138698
- const tm = ({
138699
- default: calculateTm,
138700
- neb_tm: calculateNebTm
138701
- }[tmType] || calculateTm)((sequence2 || "").toLowerCase());
138745
+ let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence2, {
138746
+ monovalentCationConc,
138747
+ primerConc
138748
+ });
138749
+ if (isNumber$6(tm)) {
138750
+ tm = tm.toFixed(1);
138751
+ }
138702
138752
  const hasWarning = isString$3(tm) && tm.length > 7 && tm;
138703
138753
  return /* @__PURE__ */ React__default$1.createElement(WrapperToUse, { dataTest: "veStatusBar-selection-tm" }, /* @__PURE__ */ React__default$1.createElement(
138704
138754
  Popover,
@@ -138709,7 +138759,7 @@ function MeltingTemp({
138709
138759
  {
138710
138760
  rel: "noopener noreferrer",
138711
138761
  target: "_blank",
138712
- href: "https://github.com/TeselaGen/@teselagen/sequence-utils"
138762
+ href: "https://github.com/TeselaGen/tg-oss/blob/master/packages/sequence-utils/src/calculateNebTm.js"
138713
138763
  },
138714
138764
  "algorithms"
138715
138765
  ), /* @__PURE__ */ React__default$1.createElement("br", null), /* @__PURE__ */ React__default$1.createElement("br", null), /* @__PURE__ */ React__default$1.createElement(
@@ -138717,8 +138767,8 @@ function MeltingTemp({
138717
138767
  {
138718
138768
  label: "Choose Tm Type:",
138719
138769
  options: [
138720
- { value: "default", label: "Default Tm" },
138721
- { value: "neb_tm", label: "NEB Tm" }
138770
+ { value: "default", label: "Default Tm (Breslauer)" },
138771
+ { value: "neb_tm", label: "NEB Tm (SantaLucia)" }
138722
138772
  ],
138723
138773
  onChange: (e2) => setTmType(e2.target.value),
138724
138774
  selectedValue: tmType
package/index.umd.js CHANGED
@@ -101255,7 +101255,11 @@ ${latestSubscriptionCallbackError.current.stack}
101255
101255
  };
101256
101256
  __name(_ResizableDraggableDialog, "ResizableDraggableDialog");
101257
101257
  let ResizableDraggableDialog = _ResizableDraggableDialog;
101258
- function MenuItemLink({ text: text2, onClick, icon, navTo, active: active2 }) {
101258
+ function MenuItemLink({ text: text2, onClick, icon, navTo, active: active2, disabled }) {
101259
+ console.log(`navTo:`, navTo);
101260
+ if (disabled) {
101261
+ return /* @__PURE__ */ React$2.createElement("li", { className: POPOVER_DISMISS }, /* @__PURE__ */ React$2.createElement(MenuItem, { icon, disabled: true, text: text2 }));
101262
+ }
101259
101263
  const handleLinkClick = /* @__PURE__ */ __name((e2) => {
101260
101264
  e2.target.closest(`.${POPOVER_DISMISS}`).click();
101261
101265
  }, "handleLinkClick");
@@ -101304,6 +101308,7 @@ ${latestSubscriptionCallbackError.current.stack}
101304
101308
  if (navTo) {
101305
101309
  MenuItemComp = MenuItemLink;
101306
101310
  }
101311
+ console.log(`navTo:`, navTo);
101307
101312
  return /* @__PURE__ */ React$2.createElement(
101308
101313
  MenuItemComp,
101309
101314
  __spreadProps(__spreadValues(__spreadValues({
@@ -101404,7 +101409,10 @@ ${latestSubscriptionCallbackError.current.stack}
101404
101409
  ].reduce((v2, f2) => f2(v2, context), def);
101405
101410
  let out;
101406
101411
  if (item.divider !== void 0) {
101407
- out = /* @__PURE__ */ React$2.createElement(MenuDivider, __spreadValues({}, item.divider ? { title: item.divider } : {}));
101412
+ out = /* @__PURE__ */ React$2.createElement(
101413
+ MenuDivider,
101414
+ __spreadValues({}, item.divider ? { title: item.divider, className: item.className } : {})
101415
+ );
101408
101416
  } else {
101409
101417
  const ItemComponent = item.component || EnhancedMenuItem;
101410
101418
  out = /* @__PURE__ */ React$2.createElement(
@@ -110081,9 +110089,9 @@ ${latestSubscriptionCallbackError.current.stack}
110081
110089
  // Helix initiation for deltaS
110082
110090
  R: 1.987,
110083
110091
  // Gas constant (cal/(K*mol)).
110084
- C: 5e-7,
110092
+ primerConc: 5e-7,
110085
110093
  // Oligo concentration. 0.5uM is typical for PCR.
110086
- Na: 0.05,
110094
+ monovalentCationConc: 0.05,
110087
110095
  // Monovalent salt concentration. 50mM is typical for PCR.
110088
110096
  /**
110089
110097
  * Calculates temperature for DNA sequence using a given algorithm.
@@ -110091,10 +110099,11 @@ ${latestSubscriptionCallbackError.current.stack}
110091
110099
  * type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
110092
110100
  * A - Helix initation for deltaS. Defaults to -10.8.
110093
110101
  * R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
110094
- * Na - THe monovalent salt concentration. Defaults to 50e-3M.
110102
+ * monovalentCationConc - THe monovalent salt concentration. Defaults to 50e-3M.
110095
110103
  * return - Temperature for the given sequence, in Celsius.
110096
110104
  */
110097
- calculateTemperature: function(sequence2, type2, A2, R2, C2, Na2) {
110105
+ calculateTemperature: function(_sequence, { type: type2, A: A2, R: R2, primerConc, monovalentCationConc } = {}) {
110106
+ const sequence2 = _sequence.toLowerCase();
110098
110107
  if (typeof type2 === "undefined") {
110099
110108
  type2 = this.TABLE_BRESLAUER;
110100
110109
  } else if (type2 != this.TABLE_BRESLAUER && type2 != this.TABLE_UNIFIED && type2 != this.TABLE_SUGIMOTO) {
@@ -110106,11 +110115,11 @@ ${latestSubscriptionCallbackError.current.stack}
110106
110115
  if (!R2) {
110107
110116
  R2 = this.R;
110108
110117
  }
110109
- if (!C2) {
110110
- C2 = this.C;
110118
+ if (!primerConc) {
110119
+ primerConc = this.primerConc;
110111
110120
  }
110112
- if (!Na2) {
110113
- Na2 = this.Na;
110121
+ if (!monovalentCationConc) {
110122
+ monovalentCationConc = this.monovalentCationConc;
110114
110123
  }
110115
110124
  const sequenceLength = sequence2.length;
110116
110125
  if (sequenceLength == 0) {
@@ -110141,11 +110150,8 @@ ${latestSubscriptionCallbackError.current.stack}
110141
110150
  sumDeltaH = sumDeltaH + neighbors[i2] * deltaHTable[i2];
110142
110151
  sumDeltaS = sumDeltaS + neighbors[i2] * deltaSTable[i2];
110143
110152
  }
110144
- const temperature = -1e3 * sumDeltaH / (A2 + -sumDeltaS + R2 * Math.log(C2 / 4)) - 273.15 + 16.6 * Math.LOG10E * Math.log(Na2);
110145
- if (temperature < 0) {
110146
- return 0;
110147
- }
110148
- return temperature.toFixed(2);
110153
+ const temperature = -1e3 * sumDeltaH / (A2 + -sumDeltaS + R2 * Math.log(primerConc / 4)) - 273.15 + 16.6 * Math.LOG10E * Math.log(monovalentCationConc);
110154
+ return temperature;
110149
110155
  },
110150
110156
  /**
110151
110157
  * @private
@@ -110215,6 +110221,39 @@ ${latestSubscriptionCallbackError.current.stack}
110215
110221
  return null;
110216
110222
  }
110217
110223
  },
110224
+ // "AA/TT": -7.9, 7.9
110225
+ // "AT/TA": -7.2, 7.2
110226
+ // "AC/TG": -8.4, 8.4
110227
+ // "AG/TC": -7.8, 7.8
110228
+ // "TT/AA": -7.9, 7.9
110229
+ // "TA/AT": -7.2, 7.2
110230
+ // "TG/AC": -8.5, 8.2
110231
+ // "TC/AG": -8.2, 8.5
110232
+ // "CC/GG": -8.0, 8.0
110233
+ // "CA/GT": -8.5, 8.5
110234
+ // "CT/GA": -7.8, 7.8
110235
+ // "CG/GC": -10.6, 10.6
110236
+ // "GG/CC": -8.0, 8.0
110237
+ // "GA/CT": -8.2, 8.2,
110238
+ // "GT/CA": -8.4, 8.4
110239
+ // "GC/CG": -9.8, 9.8
110240
+ // aa, at, ac, ag, tt, ta, tc, tg, cc, ca, ct, cg, gg, ga, gt, gc
110241
+ // "AA/TT": -22.2,22.2,
110242
+ // "AT/TA": -20.4,20.4,
110243
+ // "AC/TG": -22.4,22.4,
110244
+ // "AG/TC": -21.0,21.0,
110245
+ // "TT/AA": -22.2,22.2,
110246
+ // "TA/AT": -21.3,21.3,
110247
+ // "TC/AG": -22.2,22.2,
110248
+ // "TG/AC": -22.7,22.7,
110249
+ // "CC/GG": -19.9,19.9,
110250
+ // "CA/GT": -22.7,22.7,
110251
+ // "CT/GA": -21.0,21.0,
110252
+ // "CG/GC": -27.2,27.2,
110253
+ // "GG/CC": -19.9,19.9,
110254
+ // "GT/CA": -22.4,22.2,
110255
+ // "GA/CT": -22.2,22.4,
110256
+ // "GC/CG": -24.4,24.4
110218
110257
  /**
110219
110258
  * @private
110220
110259
  * Function to return deltaS table for given algorithm.
@@ -118816,7 +118855,7 @@ ${latestSubscriptionCallbackError.current.stack}
118816
118855
  return overviewMinimapTrack.join("");
118817
118856
  }
118818
118857
  __name(condensePairwiseAlignmentDifferences, "condensePairwiseAlignmentDifferences");
118819
- function calculateNebTm(sequence2, primerConc, { monovalentCationConc } = {}) {
118858
+ function calculateNebTm(sequence2, { monovalentCationConc = 0.05, primerConc = 5e-7 } = {}) {
118820
118859
  try {
118821
118860
  const checkForDegenerateBases = /[^atgc]/i.test(sequence2);
118822
118861
  if (checkForDegenerateBases) {
@@ -150839,7 +150878,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
150839
150878
  }
150840
150879
  __name(showFileDialog, "showFileDialog");
150841
150880
  const name = "@teselagen/ove";
150842
- const version = "0.5.18";
150881
+ const version = "0.5.19";
150843
150882
  const main = "./src/index.js";
150844
150883
  const type = "module";
150845
150884
  const exports$1 = {
@@ -165574,11 +165613,22 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
165574
165613
  WrapperToUse = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React$2.createElement("div", null, p2.children), "WrapperToUse"),
165575
165614
  InnerWrapper = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React$2.createElement(Button, { minimal: true, small: true }, p2.children), "InnerWrapper")
165576
165615
  }) {
165616
+ const [
165617
+ primerConc
165618
+ /* , setPrimerConcentration */
165619
+ ] = React$2.useState(5e-7);
165620
+ const [
165621
+ monovalentCationConc
165622
+ /* , setMonovalentCationConc */
165623
+ ] = React$2.useState(0.05);
165577
165624
  const [tmType, setTmType] = useTmType();
165578
- const tm = ({
165579
- default: calculateTm,
165580
- neb_tm: calculateNebTm
165581
- }[tmType] || calculateTm)((sequence2 || "").toLowerCase());
165625
+ let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence2, {
165626
+ monovalentCationConc,
165627
+ primerConc
165628
+ });
165629
+ if (isNumber$6(tm)) {
165630
+ tm = tm.toFixed(1);
165631
+ }
165582
165632
  const hasWarning = isString$3(tm) && tm.length > 7 && tm;
165583
165633
  return /* @__PURE__ */ React$2.createElement(WrapperToUse, { dataTest: "veStatusBar-selection-tm" }, /* @__PURE__ */ React$2.createElement(
165584
165634
  Popover,
@@ -165589,7 +165639,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
165589
165639
  {
165590
165640
  rel: "noopener noreferrer",
165591
165641
  target: "_blank",
165592
- href: "https://github.com/TeselaGen/@teselagen/sequence-utils"
165642
+ href: "https://github.com/TeselaGen/tg-oss/blob/master/packages/sequence-utils/src/calculateNebTm.js"
165593
165643
  },
165594
165644
  "algorithms"
165595
165645
  ), /* @__PURE__ */ React$2.createElement("br", null), /* @__PURE__ */ React$2.createElement("br", null), /* @__PURE__ */ React$2.createElement(
@@ -165597,8 +165647,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
165597
165647
  {
165598
165648
  label: "Choose Tm Type:",
165599
165649
  options: [
165600
- { value: "default", label: "Default Tm" },
165601
- { value: "neb_tm", label: "NEB Tm" }
165650
+ { value: "default", label: "Default Tm (Breslauer)" },
165651
+ { value: "neb_tm", label: "NEB Tm (SantaLucia)" }
165602
165652
  ],
165603
165653
  onChange: (e2) => setTmType(e2.target.value),
165604
165654
  selectedValue: tmType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -10,12 +10,12 @@
10
10
  "./style.css": "./style.css"
11
11
  },
12
12
  "dependencies": {
13
- "@teselagen/sequence-utils": "0.3.24",
13
+ "@teselagen/sequence-utils": "0.3.25",
14
14
  "@teselagen/range-utils": "0.3.7",
15
- "@teselagen/ui": "0.4.16",
15
+ "@teselagen/ui": "0.4.17",
16
16
  "@teselagen/file-utils": "0.3.16",
17
17
  "@teselagen/bounce-loader": "0.3.11",
18
- "@teselagen/bio-parsers": "0.4.18",
18
+ "@teselagen/bio-parsers": "0.4.19",
19
19
  "@blueprintjs/core": "3.52.0",
20
20
  "@blueprintjs/datetime": "3.23.19",
21
21
  "@blueprintjs/icons": "3.33.0",
@@ -3,7 +3,7 @@ import { Button, Icon, Popover, RadioGroup } from "@blueprintjs/core";
3
3
 
4
4
  import { calculateTm, calculateNebTm } from "@teselagen/sequence-utils";
5
5
 
6
- import { isString } from "lodash-es";
6
+ import { isNumber, isString } from "lodash-es";
7
7
  import { popoverOverflowModifiers } from "@teselagen/ui";
8
8
  import useTmType from "../utils/useTmType";
9
9
 
@@ -16,13 +16,16 @@ export default function MeltingTemp({
16
16
  </Button>
17
17
  )
18
18
  }) {
19
+ const [primerConc/* , setPrimerConcentration */] = React.useState(0.0000005);
20
+ const [monovalentCationConc/* , setMonovalentCationConc */] = React.useState(0.05);
19
21
  const [tmType, setTmType] = useTmType();
20
- const tm = (
21
- {
22
- default: calculateTm,
23
- neb_tm: calculateNebTm
24
- }[tmType] || calculateTm
25
- )((sequence || "").toLowerCase());
22
+ let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence, {
23
+ monovalentCationConc,
24
+ primerConc
25
+ });
26
+ if (isNumber(tm)) {
27
+ tm = tm.toFixed(1);
28
+ }
26
29
  const hasWarning = isString(tm) && tm.length > 7 && tm;
27
30
  return (
28
31
  <WrapperToUse dataTest="veStatusBar-selection-tm">
@@ -34,7 +37,7 @@ export default function MeltingTemp({
34
37
  <a
35
38
  rel="noopener noreferrer"
36
39
  target="_blank"
37
- href="https://github.com/TeselaGen/@teselagen/sequence-utils"
40
+ href="https://github.com/TeselaGen/tg-oss/blob/master/packages/sequence-utils/src/calculateNebTm.js"
38
41
  >
39
42
  algorithms
40
43
  </a>
@@ -43,8 +46,8 @@ export default function MeltingTemp({
43
46
  <RadioGroup
44
47
  label="Choose Tm Type:"
45
48
  options={[
46
- { value: "default", label: "Default Tm" },
47
- { value: "neb_tm", label: "NEB Tm" }
49
+ { value: "default", label: "Default Tm (Breslauer)" },
50
+ { value: "neb_tm", label: "NEB Tm (SantaLucia)" }
48
51
  ]}
49
52
  onChange={e => setTmType(e.target.value)}
50
53
  selectedValue={tmType}