@teselagen/sequence-utils 0.3.19 → 0.3.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/bioData.d.ts +1 -1
- package/index.js +11 -6
- package/index.mjs +11 -6
- package/index.umd.js +11 -6
- package/package.json +1 -1
- package/src/bioData.js +1 -1
- package/src/filterSequenceString.js +6 -0
- package/src/filterSequenceString.test.js +1 -1
- package/src/tidyUpSequenceData.test.js +7 -7
package/bioData.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const protein_letters: "ACDEFGHIKLMNPQRSTVWY";
|
|
2
2
|
export const protein_letters_withUandX: "ACDEFGHIKLMNPQRSTVWYUX";
|
|
3
|
-
export const extended_protein_letters: "ACDEFGHIKLMNPQRSTVWYBXZJUO";
|
|
3
|
+
export const extended_protein_letters: "ACDEFGHIKLMNPQRSTVWYBXZJUO*";
|
|
4
4
|
export const ambiguous_dna_letters: "GATCRYWSMKHBVDN";
|
|
5
5
|
export const unambiguous_dna_letters: "GATC";
|
|
6
6
|
export const ambiguous_rna_letters: "GAUCRYWSMKHBVDN";
|
package/index.js
CHANGED
|
@@ -822,7 +822,7 @@ lodash.exports;
|
|
|
822
822
|
return new LodashWrapper(value);
|
|
823
823
|
}
|
|
824
824
|
__name(lodash2, "lodash");
|
|
825
|
-
var baseCreate = function() {
|
|
825
|
+
var baseCreate = /* @__PURE__ */ function() {
|
|
826
826
|
function object() {
|
|
827
827
|
}
|
|
828
828
|
__name(object, "object");
|
|
@@ -4447,7 +4447,7 @@ lodash.exports;
|
|
|
4447
4447
|
var gte = createRelationalOperation(function(value, other) {
|
|
4448
4448
|
return value >= other;
|
|
4449
4449
|
});
|
|
4450
|
-
var isArguments = baseIsArguments(function() {
|
|
4450
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
4451
4451
|
return arguments;
|
|
4452
4452
|
}()) ? baseIsArguments : function(value) {
|
|
4453
4453
|
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
@@ -6000,7 +6000,7 @@ lodash.exports;
|
|
|
6000
6000
|
var lodashExports = lodash.exports;
|
|
6001
6001
|
const protein_letters = "ACDEFGHIKLMNPQRSTVWY";
|
|
6002
6002
|
const protein_letters_withUandX = "ACDEFGHIKLMNPQRSTVWYUX";
|
|
6003
|
-
const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO";
|
|
6003
|
+
const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO*";
|
|
6004
6004
|
const ambiguous_dna_letters = "GATCRYWSMKHBVDN";
|
|
6005
6005
|
const unambiguous_dna_letters = "GATC";
|
|
6006
6006
|
const ambiguous_rna_letters = "GAUCRYWSMKHBVDN";
|
|
@@ -7922,7 +7922,7 @@ __name(requireEmpty, "requireEmpty");
|
|
|
7922
7922
|
throw new TypeError("Cannot call a class as a function");
|
|
7923
7923
|
}
|
|
7924
7924
|
}, "classCallCheck");
|
|
7925
|
-
var createClass = function() {
|
|
7925
|
+
var createClass = /* @__PURE__ */ function() {
|
|
7926
7926
|
function defineProperties(target, props) {
|
|
7927
7927
|
for (var i = 0; i < props.length; i++) {
|
|
7928
7928
|
var descriptor = props[i];
|
|
@@ -7984,7 +7984,7 @@ __name(requireEmpty, "requireEmpty");
|
|
|
7984
7984
|
}
|
|
7985
7985
|
return call && (typeof call === "object" || typeof call === "function") ? call : self2;
|
|
7986
7986
|
}, "possibleConstructorReturn");
|
|
7987
|
-
var slicedToArray = function() {
|
|
7987
|
+
var slicedToArray = /* @__PURE__ */ function() {
|
|
7988
7988
|
function sliceIterator(arr, i) {
|
|
7989
7989
|
var _arr = [];
|
|
7990
7990
|
var _n = true;
|
|
@@ -12384,7 +12384,12 @@ function filterSequenceString(sequenceString = "", {
|
|
|
12384
12384
|
});
|
|
12385
12385
|
if (sequenceString.length !== sanitizedVal.length) {
|
|
12386
12386
|
warnings.push(
|
|
12387
|
-
`${name ? `Sequence ${name}: ` : ""}Invalid character(s) detected and removed: ${lodashExports.uniq(invalidChars).
|
|
12387
|
+
`${name ? `Sequence ${name}: ` : ""}Invalid character(s) detected and removed: ${lodashExports.uniq(invalidChars).map((c) => {
|
|
12388
|
+
if (c === " ") {
|
|
12389
|
+
return "space";
|
|
12390
|
+
}
|
|
12391
|
+
return c;
|
|
12392
|
+
}).slice(0, 100).join(", ")} `
|
|
12388
12393
|
);
|
|
12389
12394
|
}
|
|
12390
12395
|
showWarnings(warnings);
|
package/index.mjs
CHANGED
|
@@ -820,7 +820,7 @@ lodash.exports;
|
|
|
820
820
|
return new LodashWrapper(value);
|
|
821
821
|
}
|
|
822
822
|
__name(lodash2, "lodash");
|
|
823
|
-
var baseCreate = function() {
|
|
823
|
+
var baseCreate = /* @__PURE__ */ function() {
|
|
824
824
|
function object() {
|
|
825
825
|
}
|
|
826
826
|
__name(object, "object");
|
|
@@ -4445,7 +4445,7 @@ lodash.exports;
|
|
|
4445
4445
|
var gte = createRelationalOperation(function(value, other) {
|
|
4446
4446
|
return value >= other;
|
|
4447
4447
|
});
|
|
4448
|
-
var isArguments = baseIsArguments(function() {
|
|
4448
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
4449
4449
|
return arguments;
|
|
4450
4450
|
}()) ? baseIsArguments : function(value) {
|
|
4451
4451
|
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
@@ -5998,7 +5998,7 @@ lodash.exports;
|
|
|
5998
5998
|
var lodashExports = lodash.exports;
|
|
5999
5999
|
const protein_letters = "ACDEFGHIKLMNPQRSTVWY";
|
|
6000
6000
|
const protein_letters_withUandX = "ACDEFGHIKLMNPQRSTVWYUX";
|
|
6001
|
-
const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO";
|
|
6001
|
+
const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO*";
|
|
6002
6002
|
const ambiguous_dna_letters = "GATCRYWSMKHBVDN";
|
|
6003
6003
|
const unambiguous_dna_letters = "GATC";
|
|
6004
6004
|
const ambiguous_rna_letters = "GAUCRYWSMKHBVDN";
|
|
@@ -7920,7 +7920,7 @@ __name(requireEmpty, "requireEmpty");
|
|
|
7920
7920
|
throw new TypeError("Cannot call a class as a function");
|
|
7921
7921
|
}
|
|
7922
7922
|
}, "classCallCheck");
|
|
7923
|
-
var createClass = function() {
|
|
7923
|
+
var createClass = /* @__PURE__ */ function() {
|
|
7924
7924
|
function defineProperties(target, props) {
|
|
7925
7925
|
for (var i = 0; i < props.length; i++) {
|
|
7926
7926
|
var descriptor = props[i];
|
|
@@ -7982,7 +7982,7 @@ __name(requireEmpty, "requireEmpty");
|
|
|
7982
7982
|
}
|
|
7983
7983
|
return call && (typeof call === "object" || typeof call === "function") ? call : self2;
|
|
7984
7984
|
}, "possibleConstructorReturn");
|
|
7985
|
-
var slicedToArray = function() {
|
|
7985
|
+
var slicedToArray = /* @__PURE__ */ function() {
|
|
7986
7986
|
function sliceIterator(arr, i) {
|
|
7987
7987
|
var _arr = [];
|
|
7988
7988
|
var _n = true;
|
|
@@ -12382,7 +12382,12 @@ function filterSequenceString(sequenceString = "", {
|
|
|
12382
12382
|
});
|
|
12383
12383
|
if (sequenceString.length !== sanitizedVal.length) {
|
|
12384
12384
|
warnings.push(
|
|
12385
|
-
`${name ? `Sequence ${name}: ` : ""}Invalid character(s) detected and removed: ${lodashExports.uniq(invalidChars).
|
|
12385
|
+
`${name ? `Sequence ${name}: ` : ""}Invalid character(s) detected and removed: ${lodashExports.uniq(invalidChars).map((c) => {
|
|
12386
|
+
if (c === " ") {
|
|
12387
|
+
return "space";
|
|
12388
|
+
}
|
|
12389
|
+
return c;
|
|
12390
|
+
}).slice(0, 100).join(", ")} `
|
|
12386
12391
|
);
|
|
12387
12392
|
}
|
|
12388
12393
|
showWarnings(warnings);
|
package/index.umd.js
CHANGED
|
@@ -824,7 +824,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
824
824
|
return new LodashWrapper(value);
|
|
825
825
|
}
|
|
826
826
|
__name(lodash2, "lodash");
|
|
827
|
-
var baseCreate = function() {
|
|
827
|
+
var baseCreate = /* @__PURE__ */ function() {
|
|
828
828
|
function object() {
|
|
829
829
|
}
|
|
830
830
|
__name(object, "object");
|
|
@@ -4449,7 +4449,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4449
4449
|
var gte = createRelationalOperation(function(value, other) {
|
|
4450
4450
|
return value >= other;
|
|
4451
4451
|
});
|
|
4452
|
-
var isArguments = baseIsArguments(function() {
|
|
4452
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
4453
4453
|
return arguments;
|
|
4454
4454
|
}()) ? baseIsArguments : function(value) {
|
|
4455
4455
|
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
@@ -6002,7 +6002,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
6002
6002
|
var lodashExports = lodash.exports;
|
|
6003
6003
|
const protein_letters = "ACDEFGHIKLMNPQRSTVWY";
|
|
6004
6004
|
const protein_letters_withUandX = "ACDEFGHIKLMNPQRSTVWYUX";
|
|
6005
|
-
const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO";
|
|
6005
|
+
const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO*";
|
|
6006
6006
|
const ambiguous_dna_letters = "GATCRYWSMKHBVDN";
|
|
6007
6007
|
const unambiguous_dna_letters = "GATC";
|
|
6008
6008
|
const ambiguous_rna_letters = "GAUCRYWSMKHBVDN";
|
|
@@ -7924,7 +7924,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7924
7924
|
throw new TypeError("Cannot call a class as a function");
|
|
7925
7925
|
}
|
|
7926
7926
|
}, "classCallCheck");
|
|
7927
|
-
var createClass = function() {
|
|
7927
|
+
var createClass = /* @__PURE__ */ function() {
|
|
7928
7928
|
function defineProperties(target, props) {
|
|
7929
7929
|
for (var i = 0; i < props.length; i++) {
|
|
7930
7930
|
var descriptor = props[i];
|
|
@@ -7986,7 +7986,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7986
7986
|
}
|
|
7987
7987
|
return call && (typeof call === "object" || typeof call === "function") ? call : self2;
|
|
7988
7988
|
}, "possibleConstructorReturn");
|
|
7989
|
-
var slicedToArray = function() {
|
|
7989
|
+
var slicedToArray = /* @__PURE__ */ function() {
|
|
7990
7990
|
function sliceIterator(arr, i) {
|
|
7991
7991
|
var _arr = [];
|
|
7992
7992
|
var _n = true;
|
|
@@ -12386,7 +12386,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
12386
12386
|
});
|
|
12387
12387
|
if (sequenceString.length !== sanitizedVal.length) {
|
|
12388
12388
|
warnings.push(
|
|
12389
|
-
`${name ? `Sequence ${name}: ` : ""}Invalid character(s) detected and removed: ${lodashExports.uniq(invalidChars).
|
|
12389
|
+
`${name ? `Sequence ${name}: ` : ""}Invalid character(s) detected and removed: ${lodashExports.uniq(invalidChars).map((c) => {
|
|
12390
|
+
if (c === " ") {
|
|
12391
|
+
return "space";
|
|
12392
|
+
}
|
|
12393
|
+
return c;
|
|
12394
|
+
}).slice(0, 100).join(", ")} `
|
|
12390
12395
|
);
|
|
12391
12396
|
}
|
|
12392
12397
|
showWarnings(warnings);
|
package/package.json
CHANGED
package/src/bioData.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export const protein_letters = "ACDEFGHIKLMNPQRSTVWY";
|
|
4
4
|
export const protein_letters_withUandX = "ACDEFGHIKLMNPQRSTVWYUX";
|
|
5
|
-
export const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO";
|
|
5
|
+
export const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO*";
|
|
6
6
|
export const ambiguous_dna_letters = "GATCRYWSMKHBVDN";
|
|
7
7
|
export const unambiguous_dna_letters = "GATC";
|
|
8
8
|
export const ambiguous_rna_letters = "GAUCRYWSMKHBVDN";
|
|
@@ -81,6 +81,12 @@ export default function filterSequenceString(
|
|
|
81
81
|
`${
|
|
82
82
|
name ? `Sequence ${name}: ` : ""
|
|
83
83
|
}Invalid character(s) detected and removed: ${uniq(invalidChars)
|
|
84
|
+
.map(c => {
|
|
85
|
+
if (c === " ") {
|
|
86
|
+
return "space";
|
|
87
|
+
}
|
|
88
|
+
return c;
|
|
89
|
+
})
|
|
84
90
|
.slice(0, 100)
|
|
85
91
|
.join(", ")} `
|
|
86
92
|
);
|
|
@@ -65,18 +65,18 @@ describe("tidyUpSequenceData", () => {
|
|
|
65
65
|
res.should.containSubset({
|
|
66
66
|
aminoAcidDataForEachBaseOfDNA: [],
|
|
67
67
|
isProtein: true,
|
|
68
|
-
size:
|
|
69
|
-
proteinSize:
|
|
70
|
-
sequence: "
|
|
71
|
-
proteinSequence: "gagiuhwgagalasjglj",
|
|
68
|
+
size: 57, //size should refer to the DNA length
|
|
69
|
+
proteinSize: 19, //proteinSize should refer to the amino acid length
|
|
70
|
+
sequence: "ggngcnggnathtgacaytggggngcnggngcnytngcnwsnhtnggnytnhtntrr", //degenerate sequence
|
|
71
|
+
proteinSequence: "gagiuhwgagalasjglj*",
|
|
72
72
|
circular: false,
|
|
73
73
|
features: [
|
|
74
74
|
{ start: 9, end: 32, forward: true },
|
|
75
|
-
{ start: 30, end:
|
|
75
|
+
{ start: 30, end: 56, forward: true },
|
|
76
76
|
{
|
|
77
77
|
name: "iDon'tFit",
|
|
78
|
-
start:
|
|
79
|
-
end:
|
|
78
|
+
start: 54,
|
|
79
|
+
end: 56,
|
|
80
80
|
forward: true
|
|
81
81
|
}
|
|
82
82
|
]
|