@teselagen/sequence-utils 0.3.18 → 0.3.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/bioData.d.ts +1 -1
- package/calculateTm.d.ts +1 -1
- package/findOrfsInPlasmid.d.ts +11 -1
- package/getOrfsFromSequence.d.ts +16 -6
- package/index.js +19 -12
- package/index.mjs +19 -12
- package/index.umd.js +19 -12
- package/package.json +1 -1
- package/src/bioData.js +1 -1
- package/src/calculateTm.js +6 -6
- package/src/filterSequenceString.js +6 -0
- package/src/filterSequenceString.test.js +1 -1
- package/src/getComplementSequenceString.js +1 -2
- package/src/getOrfsFromSequence.js +5 -16
- 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/calculateTm.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(sequence:
|
|
1
|
+
declare function _default(sequence: any, type: any, A: any, R: any, C: any, Na: any): string | 0;
|
|
2
2
|
export default _default;
|
package/findOrfsInPlasmid.d.ts
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export default function findOrfsInPlasmid(sequence: any, circular: any, minimumOrfSize: any, useAdditionalOrfStartCodons: any):
|
|
1
|
+
export default function findOrfsInPlasmid(sequence: any, circular: any, minimumOrfSize: any, useAdditionalOrfStartCodons: any): {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
length: number;
|
|
5
|
+
internalStartCodonIndices: never[];
|
|
6
|
+
frame: number;
|
|
7
|
+
forward: any;
|
|
8
|
+
annotationTypePlural: string;
|
|
9
|
+
isOrf: boolean;
|
|
10
|
+
id: any;
|
|
11
|
+
}[];
|
package/getOrfsFromSequence.d.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @private
|
|
3
3
|
* Finds ORFs in a given DNA forward in a given frame.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* frame - The frame to look in.
|
|
5
|
+
* sequence - The dna sequence.
|
|
6
|
+
* minimumOrfSize - The minimum length of ORF to return.
|
|
7
|
+
* forward - Should we find forward facing orfs or reverse facing orfs
|
|
8
|
+
* return - The list of ORFs found.
|
|
9
9
|
*/
|
|
10
|
-
export default function getOrfsFromSequence(options: any):
|
|
10
|
+
export default function getOrfsFromSequence(options: any): {
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
length: number;
|
|
14
|
+
internalStartCodonIndices: never[];
|
|
15
|
+
frame: number;
|
|
16
|
+
forward: any;
|
|
17
|
+
annotationTypePlural: string;
|
|
18
|
+
isOrf: boolean;
|
|
19
|
+
id: any;
|
|
20
|
+
}[];
|
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);
|
|
@@ -13026,12 +13031,12 @@ const calcTmMethods = {
|
|
|
13026
13031
|
// Monovalent salt concentration. 50mM is typical for PCR.
|
|
13027
13032
|
/**
|
|
13028
13033
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
13029
|
-
*
|
|
13030
|
-
*
|
|
13031
|
-
*
|
|
13032
|
-
*
|
|
13033
|
-
*
|
|
13034
|
-
*
|
|
13034
|
+
* sequence - The DNA sequence to use.
|
|
13035
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
13036
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
13037
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
13038
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
13039
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
13035
13040
|
*/
|
|
13036
13041
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
13037
13042
|
if (typeof type === "undefined") {
|
|
@@ -21541,6 +21546,8 @@ function getComplementAminoAcidStringFromSequenceString(sequenceString) {
|
|
|
21541
21546
|
}
|
|
21542
21547
|
__name(getComplementAminoAcidStringFromSequenceString, "getComplementAminoAcidStringFromSequenceString");
|
|
21543
21548
|
function getComplementSequenceString(sequence, isRna) {
|
|
21549
|
+
if (typeof sequence !== "string")
|
|
21550
|
+
return "";
|
|
21544
21551
|
let complementSeqString = "";
|
|
21545
21552
|
const complementMap = lodashExports.merge(
|
|
21546
21553
|
DNAComplementMap,
|
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);
|
|
@@ -13024,12 +13029,12 @@ const calcTmMethods = {
|
|
|
13024
13029
|
// Monovalent salt concentration. 50mM is typical for PCR.
|
|
13025
13030
|
/**
|
|
13026
13031
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
13027
|
-
*
|
|
13028
|
-
*
|
|
13029
|
-
*
|
|
13030
|
-
*
|
|
13031
|
-
*
|
|
13032
|
-
*
|
|
13032
|
+
* sequence - The DNA sequence to use.
|
|
13033
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
13034
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
13035
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
13036
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
13037
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
13033
13038
|
*/
|
|
13034
13039
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
13035
13040
|
if (typeof type === "undefined") {
|
|
@@ -21539,6 +21544,8 @@ function getComplementAminoAcidStringFromSequenceString(sequenceString) {
|
|
|
21539
21544
|
}
|
|
21540
21545
|
__name(getComplementAminoAcidStringFromSequenceString, "getComplementAminoAcidStringFromSequenceString");
|
|
21541
21546
|
function getComplementSequenceString(sequence, isRna) {
|
|
21547
|
+
if (typeof sequence !== "string")
|
|
21548
|
+
return "";
|
|
21542
21549
|
let complementSeqString = "";
|
|
21543
21550
|
const complementMap = lodashExports.merge(
|
|
21544
21551
|
DNAComplementMap,
|
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);
|
|
@@ -13028,12 +13033,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13028
13033
|
// Monovalent salt concentration. 50mM is typical for PCR.
|
|
13029
13034
|
/**
|
|
13030
13035
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
13031
|
-
*
|
|
13032
|
-
*
|
|
13033
|
-
*
|
|
13034
|
-
*
|
|
13035
|
-
*
|
|
13036
|
-
*
|
|
13036
|
+
* sequence - The DNA sequence to use.
|
|
13037
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
13038
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
13039
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
13040
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
13041
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
13037
13042
|
*/
|
|
13038
13043
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
13039
13044
|
if (typeof type === "undefined") {
|
|
@@ -21543,6 +21548,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
21543
21548
|
}
|
|
21544
21549
|
__name(getComplementAminoAcidStringFromSequenceString, "getComplementAminoAcidStringFromSequenceString");
|
|
21545
21550
|
function getComplementSequenceString(sequence, isRna) {
|
|
21551
|
+
if (typeof sequence !== "string")
|
|
21552
|
+
return "";
|
|
21546
21553
|
let complementSeqString = "";
|
|
21547
21554
|
const complementMap = lodashExports.merge(
|
|
21548
21555
|
DNAComplementMap,
|
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";
|
package/src/calculateTm.js
CHANGED
|
@@ -16,12 +16,12 @@ const calcTmMethods = {
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* sequence - The DNA sequence to use.
|
|
20
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
21
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
22
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
23
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
24
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
25
25
|
*/
|
|
26
26
|
calculateTemperature: function (sequence, type, A, R, C, Na) {
|
|
27
27
|
if (typeof type === "undefined") {
|
|
@@ -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
|
);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import DNAComplementMap from "./DNAComplementMap";
|
|
2
2
|
import { merge } from "lodash";
|
|
3
3
|
|
|
4
|
-
// ac.throw([ac.string,ac.bool],arguments);
|
|
5
4
|
export default function getComplementSequenceString(sequence, isRna) {
|
|
6
|
-
|
|
5
|
+
if (typeof sequence !== "string") return "";
|
|
7
6
|
let complementSeqString = "";
|
|
8
7
|
const complementMap = merge(
|
|
9
8
|
DNAComplementMap,
|
|
@@ -4,21 +4,13 @@ import getReverseComplementSequenceString from "./getReverseComplementSequenceSt
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
6
6
|
* Finds ORFs in a given DNA forward in a given frame.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* frame - The frame to look in.
|
|
8
|
+
* sequence - The dna sequence.
|
|
9
|
+
* minimumOrfSize - The minimum length of ORF to return.
|
|
10
|
+
* forward - Should we find forward facing orfs or reverse facing orfs
|
|
11
|
+
* return - The list of ORFs found.
|
|
12
12
|
*/
|
|
13
13
|
export default function getOrfsFromSequence(options) {
|
|
14
|
-
// ac.throw([ac.shape({
|
|
15
|
-
// sequence: ac.string,
|
|
16
|
-
// minimumOrfSize: ac.posInt,
|
|
17
|
-
// forward: ac.bool,
|
|
18
|
-
// circular: ac.bool
|
|
19
|
-
// })], arguments);
|
|
20
|
-
|
|
21
|
-
// const frame = options.frame;
|
|
22
14
|
let sequence = options.sequence;
|
|
23
15
|
const minimumOrfSize = options.minimumOrfSize;
|
|
24
16
|
const forward = options.forward;
|
|
@@ -38,7 +30,6 @@ export default function getOrfsFromSequence(options) {
|
|
|
38
30
|
const re = useAdditionalOrfStartCodons
|
|
39
31
|
? /(?=((?:A[TU]G|G[TU]G|C[TU]G)(?:.{3})*?(?:[TU]AG|[TU]AA|[TU]GA)))/gi
|
|
40
32
|
: /(?=((?:A[TU]G)(?:.{3})*?(?:[TU]AG|[TU]AA|[TU]GA)))/gi;
|
|
41
|
-
// const str = 'tatgaatgaatgffffffatgfftaaftaafatgfatgfffffsdfatgffatgfffstaafftaafffffffffffffffatgtaaataa\n\natgffftaaf\n\natgffatgftaafftaa\n\natgatgftaafftaa\n\natgatgtaataa\n\ntttttttttttttaatgatgfffffffffftaa';
|
|
42
33
|
let m;
|
|
43
34
|
const orfRanges = [];
|
|
44
35
|
//loop through orf hits!
|
|
@@ -103,8 +94,6 @@ export default function getOrfsFromSequence(options) {
|
|
|
103
94
|
} else {
|
|
104
95
|
orfEnds[orf.end] = index;
|
|
105
96
|
if (!forward) {
|
|
106
|
-
// if (originalSequenceLength - orf.end - 1 == 3657) {
|
|
107
|
-
// }
|
|
108
97
|
//this check needs to come after the above assignment of orfEnds
|
|
109
98
|
//flip the start and ends
|
|
110
99
|
const endHolder = orf.end; //temp variable
|
|
@@ -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
|
]
|