@teselagen/sequence-utils 0.3.26 → 0.3.27

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 CHANGED
@@ -9517,7 +9517,7 @@ const calcTmMethods = {
9517
9517
  * return - Temperature for the given sequence, in Celsius.
9518
9518
  */
9519
9519
  calculateTemperature: function(_sequence, { type, A, R, primerConc, monovalentCationConc } = {}) {
9520
- const sequence = _sequence.toLowerCase();
9520
+ const sequence = (_sequence || "").toLowerCase();
9521
9521
  if (typeof type === "undefined") {
9522
9522
  type = this.TABLE_BRESLAUER;
9523
9523
  } else if (type != this.TABLE_BRESLAUER && type != this.TABLE_UNIFIED && type != this.TABLE_SUGIMOTO) {
package/index.js CHANGED
@@ -9515,7 +9515,7 @@ const calcTmMethods = {
9515
9515
  * return - Temperature for the given sequence, in Celsius.
9516
9516
  */
9517
9517
  calculateTemperature: function(_sequence, { type, A, R, primerConc, monovalentCationConc } = {}) {
9518
- const sequence = _sequence.toLowerCase();
9518
+ const sequence = (_sequence || "").toLowerCase();
9519
9519
  if (typeof type === "undefined") {
9520
9520
  type = this.TABLE_BRESLAUER;
9521
9521
  } else if (type != this.TABLE_BRESLAUER && type != this.TABLE_UNIFIED && type != this.TABLE_SUGIMOTO) {
package/index.umd.cjs CHANGED
@@ -9519,7 +9519,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
9519
9519
  * return - Temperature for the given sequence, in Celsius.
9520
9520
  */
9521
9521
  calculateTemperature: function(_sequence, { type, A, R, primerConc, monovalentCationConc } = {}) {
9522
- const sequence = _sequence.toLowerCase();
9522
+ const sequence = (_sequence || "").toLowerCase();
9523
9523
  if (typeof type === "undefined") {
9524
9524
  type = this.TABLE_BRESLAUER;
9525
9525
  } else if (type != this.TABLE_BRESLAUER && type != this.TABLE_UNIFIED && type != this.TABLE_SUGIMOTO) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/sequence-utils",
3
- "version": "0.3.26",
3
+ "version": "0.3.27",
4
4
  "dependencies": {
5
5
  "@teselagen/range-utils": "0.3.7",
6
6
  "bson-objectid": "^2.0.4",
@@ -27,7 +27,7 @@ const calcTmMethods = {
27
27
  _sequence,
28
28
  { type, A, R, primerConc, monovalentCationConc } = {}
29
29
  ) {
30
- const sequence = _sequence.toLowerCase();
30
+ const sequence = (_sequence || "").toLowerCase();
31
31
  if (typeof type === "undefined") {
32
32
  // type = this.TABLE_SUGIMOTO ;
33
33
  // type = this.TABLE_UNIFIED;
@@ -90,35 +90,33 @@ describe("getReverseComplementSequenceAndAnnotations", () => {
90
90
  });
91
91
  });
92
92
  it("handles reverse complementing a feature with locations correctly", () => {
93
- const newSeq = getReverseComplementSequenceAndAnnotations(
94
- {
95
- sequence: "aaatttcccgttttttt",
96
- // 01234567890123456
97
- // fffffff
98
- // lll ll
99
- // after:
100
- // 65432109876543210
101
- // fffffff
102
- // ll lll
103
- circular: true,
104
- features: [
105
- {
106
- start: 1,
107
- end: 7,
108
- locations: [
109
- {
110
- start: 1,
111
- end: 3
112
- },
113
- {
114
- start: 6,
115
- end: 7
116
- }
117
- ]
118
- }
119
- ]
120
- },
121
- );
93
+ const newSeq = getReverseComplementSequenceAndAnnotations({
94
+ sequence: "aaatttcccgttttttt",
95
+ // 01234567890123456
96
+ // fffffff
97
+ // lll ll
98
+ // after:
99
+ // 65432109876543210
100
+ // fffffff
101
+ // ll lll
102
+ circular: true,
103
+ features: [
104
+ {
105
+ start: 1,
106
+ end: 7,
107
+ locations: [
108
+ {
109
+ start: 1,
110
+ end: 3
111
+ },
112
+ {
113
+ start: 6,
114
+ end: 7
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ });
122
120
  newSeq.should.containSubset({
123
121
  // sequence: "tttaaacggg",
124
122
  features: [