@teselagen/sequence-utils 0.3.18 → 0.3.19
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/calculateTm.d.ts +1 -1
- package/findOrfsInPlasmid.d.ts +11 -1
- package/getOrfsFromSequence.d.ts +16 -6
- package/index.js +8 -6
- package/index.mjs +8 -6
- package/index.umd.js +8 -6
- package/package.json +1 -1
- package/src/calculateTm.js +6 -6
- package/src/getComplementSequenceString.js +1 -2
- package/src/getOrfsFromSequence.js +5 -16
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
|
@@ -13026,12 +13026,12 @@ const calcTmMethods = {
|
|
|
13026
13026
|
// Monovalent salt concentration. 50mM is typical for PCR.
|
|
13027
13027
|
/**
|
|
13028
13028
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
13029
|
-
*
|
|
13030
|
-
*
|
|
13031
|
-
*
|
|
13032
|
-
*
|
|
13033
|
-
*
|
|
13034
|
-
*
|
|
13029
|
+
* sequence - The DNA sequence to use.
|
|
13030
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
13031
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
13032
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
13033
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
13034
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
13035
13035
|
*/
|
|
13036
13036
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
13037
13037
|
if (typeof type === "undefined") {
|
|
@@ -21541,6 +21541,8 @@ function getComplementAminoAcidStringFromSequenceString(sequenceString) {
|
|
|
21541
21541
|
}
|
|
21542
21542
|
__name(getComplementAminoAcidStringFromSequenceString, "getComplementAminoAcidStringFromSequenceString");
|
|
21543
21543
|
function getComplementSequenceString(sequence, isRna) {
|
|
21544
|
+
if (typeof sequence !== "string")
|
|
21545
|
+
return "";
|
|
21544
21546
|
let complementSeqString = "";
|
|
21545
21547
|
const complementMap = lodashExports.merge(
|
|
21546
21548
|
DNAComplementMap,
|
package/index.mjs
CHANGED
|
@@ -13024,12 +13024,12 @@ const calcTmMethods = {
|
|
|
13024
13024
|
// Monovalent salt concentration. 50mM is typical for PCR.
|
|
13025
13025
|
/**
|
|
13026
13026
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
13027
|
-
*
|
|
13028
|
-
*
|
|
13029
|
-
*
|
|
13030
|
-
*
|
|
13031
|
-
*
|
|
13032
|
-
*
|
|
13027
|
+
* sequence - The DNA sequence to use.
|
|
13028
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
13029
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
13030
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
13031
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
13032
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
13033
13033
|
*/
|
|
13034
13034
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
13035
13035
|
if (typeof type === "undefined") {
|
|
@@ -21539,6 +21539,8 @@ function getComplementAminoAcidStringFromSequenceString(sequenceString) {
|
|
|
21539
21539
|
}
|
|
21540
21540
|
__name(getComplementAminoAcidStringFromSequenceString, "getComplementAminoAcidStringFromSequenceString");
|
|
21541
21541
|
function getComplementSequenceString(sequence, isRna) {
|
|
21542
|
+
if (typeof sequence !== "string")
|
|
21543
|
+
return "";
|
|
21542
21544
|
let complementSeqString = "";
|
|
21543
21545
|
const complementMap = lodashExports.merge(
|
|
21544
21546
|
DNAComplementMap,
|
package/index.umd.js
CHANGED
|
@@ -13028,12 +13028,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13028
13028
|
// Monovalent salt concentration. 50mM is typical for PCR.
|
|
13029
13029
|
/**
|
|
13030
13030
|
* Calculates temperature for DNA sequence using a given algorithm.
|
|
13031
|
-
*
|
|
13032
|
-
*
|
|
13033
|
-
*
|
|
13034
|
-
*
|
|
13035
|
-
*
|
|
13036
|
-
*
|
|
13031
|
+
* sequence - The DNA sequence to use.
|
|
13032
|
+
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
|
|
13033
|
+
* A - Helix initation for deltaS. Defaults to -10.8.
|
|
13034
|
+
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
|
|
13035
|
+
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
|
|
13036
|
+
* return - Temperature for the given sequence, in Celsius.
|
|
13037
13037
|
*/
|
|
13038
13038
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
13039
13039
|
if (typeof type === "undefined") {
|
|
@@ -21543,6 +21543,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
21543
21543
|
}
|
|
21544
21544
|
__name(getComplementAminoAcidStringFromSequenceString, "getComplementAminoAcidStringFromSequenceString");
|
|
21545
21545
|
function getComplementSequenceString(sequence, isRna) {
|
|
21546
|
+
if (typeof sequence !== "string")
|
|
21547
|
+
return "";
|
|
21546
21548
|
let complementSeqString = "";
|
|
21547
21549
|
const complementMap = lodashExports.merge(
|
|
21548
21550
|
DNAComplementMap,
|
package/package.json
CHANGED
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") {
|
|
@@ -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
|