@teselagen/sequence-utils 0.3.7 → 0.3.9

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.
Files changed (108) hide show
  1. package/README.md +89 -0
  2. package/bioData.d.ts +1 -339
  3. package/filterSequenceString.d.ts +26 -1
  4. package/index.d.ts +7 -8
  5. package/index.js +329 -413
  6. package/index.mjs +329 -413
  7. package/index.umd.js +329 -413
  8. package/package.json +1 -2
  9. package/src/addGapsToSeqReads.js +2 -2
  10. package/src/adjustAnnotationsToInsert.js +3 -3
  11. package/src/adjustBpsToReplaceOrInsert.js +3 -3
  12. package/src/adjustBpsToReplaceOrInsert.test.js +0 -1
  13. package/src/aminoAcidToDnaRna.test.js +1 -1
  14. package/src/annotateSingleSeq.js +1 -1
  15. package/src/annotateSingleSeq.test.js +1 -4
  16. package/src/autoAnnotate.js +5 -2
  17. package/src/autoAnnotate.test.js +6 -30
  18. package/src/bioData.js +1 -366
  19. package/src/calculateNebTa.js +1 -1
  20. package/src/calculateNebTm.js +1 -1
  21. package/src/calculatePercentGC.js +2 -2
  22. package/src/calculateTm.js +19 -102
  23. package/src/computeDigestFragments.js +7 -4
  24. package/src/computeDigestFragments.test.js +1 -1
  25. package/src/condensePairwiseAlignmentDifferences.js +1 -1
  26. package/src/convertAACaretPositionOrRangeToDna.js +1 -1
  27. package/src/convertDnaCaretPositionOrRangeToAA.js +1 -1
  28. package/src/cutSequenceByRestrictionEnzyme.js +3 -3
  29. package/src/cutSequenceByRestrictionEnzyme.test.js +0 -1
  30. package/src/degenerateDnaToAminoAcidMap.js +1 -1
  31. package/src/degenerateRnaToAminoAcidMap.js +1 -1
  32. package/src/deleteSequenceDataAtRange.js +1 -1
  33. package/src/deleteSequenceDataAtRange.test.js +23 -9
  34. package/src/diffUtils.js +4 -4
  35. package/src/diffUtils.test.js +2 -2
  36. package/src/doesEnzymeChopOutsideOfRecognitionSite.js +1 -1
  37. package/src/doesEnzymeChopOutsideOfRecognitionSite.test.js +0 -2
  38. package/src/featureTypesAndColors.js +5 -5
  39. package/src/featureTypesAndColors.test.js +1 -1
  40. package/src/filterSequenceString.js +111 -16
  41. package/src/filterSequenceString.test.js +62 -3
  42. package/src/findNearestRangeOfSequenceOverlapToPosition.js +1 -1
  43. package/src/findOrfsInPlasmid.js +1 -1
  44. package/src/findSequenceMatches.js +9 -10
  45. package/src/generateAnnotations.js +1 -1
  46. package/src/generateSequenceData.js +1 -1
  47. package/src/generateSequenceData.test.js +1 -1
  48. package/src/getAllInsertionsInSeqReads.js +1 -1
  49. package/src/getAminoAcidDataForEachBaseOfDna.js +2 -2
  50. package/src/getAminoAcidDataForEachBaseOfDna.test.js +0 -2
  51. package/src/getAminoAcidFromSequenceTriplet.js +1 -1
  52. package/src/getAminoAcidStringFromSequenceString.js +1 -1
  53. package/src/getCodonRangeForAASliver.js +1 -1
  54. package/src/getComplementAminoAcidStringFromSequenceString.js +2 -5
  55. package/src/getComplementSequenceAndAnnotations.js +1 -2
  56. package/src/getComplementSequenceString.js +5 -3
  57. package/src/getComplementSequenceString.test.js +6 -6
  58. package/src/getCutsiteType.js +1 -1
  59. package/src/getCutsitesFromSequence.js +1 -1
  60. package/src/getDegenerateDnaStringFromAAString.js +1 -1
  61. package/src/getDegenerateRnaStringFromAAString.js +1 -1
  62. package/src/getDigestFragmentsForCutsites.js +5 -2
  63. package/src/getDigestFragmentsForRestrictionEnzymes.js +2 -2
  64. package/src/getInsertBetweenVals.js +2 -2
  65. package/src/getLeftAndRightOfSequenceInRangeGivenPosition.js +2 -2
  66. package/src/getLeftAndRightOfSequenceInRangeGivenPosition.test.js +0 -2
  67. package/src/getMassOfAaString.js +4 -1
  68. package/src/getMassofAaString.test.js +9 -8
  69. package/src/getOrfsFromSequence.js +1 -2
  70. package/src/getOrfsFromSequence.test.js +1 -3
  71. package/src/getOverlapBetweenTwoSequences.js +3 -3
  72. package/src/getOverlapBetweenTwoSequences.test.js +1 -1
  73. package/src/getPossiblePartsFromSequenceAndEnzymes.js +2 -2
  74. package/src/getReverseAminoAcidStringFromSequenceString.js +1 -1
  75. package/src/getReverseComplementAminoAcidStringFromSequenceString.js +9 -6
  76. package/src/getReverseComplementAnnotation.js +1 -1
  77. package/src/getReverseComplementSequenceAndAnnotations.js +2 -3
  78. package/src/getReverseComplementSequenceString.js +1 -2
  79. package/src/getReverseSequenceString.js +1 -1
  80. package/src/getSequenceDataBetweenRange.js +7 -4
  81. package/src/getSequenceDataBetweenRange.test.js +0 -1
  82. package/src/getVirtualDigest.js +6 -3
  83. package/src/guessIfSequenceIsDnaAndNotProtein.js +2 -2
  84. package/src/index.js +79 -80
  85. package/src/index.test.js +5 -4
  86. package/src/insertGapsIntoRefSeq.js +1 -1
  87. package/src/insertSequenceDataAtPosition.test.js +4 -2
  88. package/src/insertSequenceDataAtPositionOrRange.js +5 -5
  89. package/src/insertSequenceDataAtPositionOrRange.test.js +3 -17
  90. package/src/isEnzymeType2S.js +1 -1
  91. package/src/mapAnnotationsToRows.js +3 -3
  92. package/src/mapAnnotationsToRows.test.js +1 -3
  93. package/src/prepareCircularViewData.js +5 -5
  94. package/src/prepareCircularViewData.test.js +1 -1
  95. package/src/prepareRowData.js +1 -2
  96. package/src/prepareRowData.test.js +1 -3
  97. package/src/prepareRowData_output1.json +381 -381
  98. package/src/proteinAlphabet.js +31 -26
  99. package/src/rotateBpsToPosition.js +7 -11
  100. package/src/rotateBpsToPosition.test.js +6 -6
  101. package/src/rotateSequenceDataToPosition.js +4 -4
  102. package/src/shiftAnnotationsByLen.js +2 -2
  103. package/src/tidyUpAnnotation.js +8 -7
  104. package/src/tidyUpSequenceData.js +15 -18
  105. package/filterAminoAcidSequenceString.d.ts +0 -1
  106. package/filterAminoAcidSequenceString.test.d.ts +0 -1
  107. package/src/filterAminoAcidSequenceString.js +0 -13
  108. package/src/filterAminoAcidSequenceString.test.js +0 -22
package/src/bioData.js CHANGED
@@ -1,85 +1,15 @@
1
1
  //Adapted from biopython. Check the BIOPYTHON_LICENSE for licensing info
2
2
 
3
3
  export const protein_letters = "ACDEFGHIKLMNPQRSTVWY";
4
+ export const protein_letters_withUandX = "ACDEFGHIKLMNPQRSTVWYUX";
4
5
 
5
6
  export const extended_protein_letters = "ACDEFGHIKLMNPQRSTVWYBXZJUO.*-";
6
-
7
- // # B = "Asx"; aspartic acid or asparagine (D or N)
8
- // # X = "Xxx"; unknown or 'other' amino acid
9
- // # Z = "Glx"; glutamic acid or glutamine (E or Q)
10
- // # http://www.chem.qmul.ac.uk/iupac/AminoAcid/A2021.html#AA212
11
- // #
12
- // # J = "Xle"; leucine or isoleucine (L or I, used in NMR)
13
- // # Mentioned in http://www.chem.qmul.ac.uk/iubmb/newsletter/1999/item3.html
14
- // # Also the International Nucleotide Sequence Database Collaboration (INSDC)
15
- // # (i.e. GenBank, EMBL, DDBJ) adopted this in 2006
16
- // # http://www.ddbj.nig.ac.jp/insdc/icm2006-e.html
17
- // #
18
- // # Xle (J); Leucine or Isoleucine
19
- // # The residue abbreviations, Xle (the three-letter abbreviation) and J
20
- // # (the one-letter abbreviation) are reserved for the case that cannot
21
- // # experimentally distinguish leucine from isoleucine.
22
- // #
23
- // # U = "Sec"; selenocysteine
24
- // # http://www.chem.qmul.ac.uk/iubmb/newsletter/1999/item3.html
25
- // #
26
- // # O = "Pyl"; pyrrolysine
27
- // # http://www.chem.qmul.ac.uk/iubmb/newsletter/2009.html#item35
28
-
29
- export const protein_letters_1to3 = {
30
- A: "Ala",
31
- C: "Cys",
32
- D: "Asp",
33
- E: "Glu",
34
- F: "Phe",
35
- G: "Gly",
36
- H: "His",
37
- I: "Ile",
38
- K: "Lys",
39
- L: "Leu",
40
- M: "Met",
41
- N: "Asn",
42
- P: "Pro",
43
- Q: "Gln",
44
- R: "Arg",
45
- S: "Ser",
46
- T: "Thr",
47
- V: "Val",
48
- W: "Trp",
49
- Y: "Tyr",
50
- O: "Pyl",
51
- U: "Sec"
52
- };
53
-
54
- // module.exports.protein_letters_1to3_extended = dict(
55
- // list(protein_letters_1to3.items()) +
56
- // list(
57
- // {
58
- // B: "Asx",
59
- // X: "Xaa",
60
- // Z: "Glx",
61
- // J: "Xle",
62
- // U: "Sel",
63
- // O: "Pyl"
64
- // }.items()
65
- // )
66
- // );
67
-
68
7
  export const ambiguous_dna_letters = "GATCRYWSMKHBVDN";
69
-
70
8
  export const unambiguous_dna_letters = "GATC";
71
9
  export const ambiguous_rna_letters = "GAUCRYWSMKHBVDN";
72
10
  export const unambiguous_rna_letters = "GAUC";
73
-
74
- // # B == 5-bromouridine
75
- // # D == 5,6-dihydrouridine
76
- // # S == thiouridine
77
- // # W == wyosine
78
11
  export const extended_dna_letters = "GATCBDSW";
79
12
 
80
- // # are there extended forms?
81
- // # extended_rna_letters = "GAUCBDSW"
82
-
83
13
  export const ambiguous_dna_values = {
84
14
  ".": ".",
85
15
  A: "A",
@@ -100,180 +30,6 @@ export const ambiguous_dna_values = {
100
30
  N: "GATC"
101
31
  };
102
32
 
103
- export const ambiguous_rna_values = {
104
- ".": ".",
105
- A: "A",
106
- C: "C",
107
- G: "G",
108
- U: "U",
109
- M: "AC",
110
- R: "AG",
111
- W: "AU",
112
- S: "CG",
113
- Y: "CU",
114
- K: "GU",
115
- V: "ACG",
116
- H: "ACU",
117
- D: "AGU",
118
- B: "CGU",
119
- X: "GAUC",
120
- N: "GAUC"
121
- };
122
-
123
- export const ambiguous_dna_complement = {
124
- ".": ".",
125
- A: "T",
126
- C: "G",
127
- G: "C",
128
- T: "A",
129
- M: "K",
130
- R: "Y",
131
- W: "W",
132
- S: "S",
133
- Y: "R",
134
- K: "M",
135
- V: "B",
136
- H: "D",
137
- D: "H",
138
- B: "V",
139
- X: "X",
140
- N: "N"
141
- };
142
-
143
- export const ambiguous_rna_complement = {
144
- ".": ".",
145
- A: "U",
146
- C: "G",
147
- G: "C",
148
- U: "A",
149
- M: "K",
150
- R: "Y",
151
- W: "W",
152
- S: "S",
153
- Y: "R",
154
- K: "M",
155
- V: "B",
156
- H: "D",
157
- D: "H",
158
- B: "V",
159
- X: "X",
160
- N: "N"
161
- };
162
-
163
- // # Mass data taken from PubChem
164
-
165
- // # Average masses of monophosphate deoxy nucleotides
166
- export const unambiguous_dna_weights = {
167
- A: 331.2218,
168
- C: 307.1971,
169
- G: 347.2212,
170
- T: 322.2085
171
- };
172
-
173
- // # Monoisotopic masses of monophospate deoxy nucleotides
174
- export const monoisotopic_unambiguous_dna_weights = {
175
- A: 331.06817,
176
- C: 307.056936,
177
- G: 347.063084,
178
- T: 322.056602
179
- };
180
-
181
- // module.exports.unambiguous_dna_weight_ranges = _make_ranges(
182
- // unambiguous_dna_weights
183
- // );
184
-
185
- export const unambiguous_rna_weights = {
186
- A: 347.2212,
187
- C: 323.1965,
188
- G: 363.2206,
189
- U: 324.1813
190
- };
191
-
192
- export const monoisotopic_unambiguous_rna_weights = {
193
- A: 347.063084,
194
- C: 323.051851,
195
- G: 363.057999,
196
- U: 324.035867
197
- };
198
-
199
- // module.exports.unambiguous_rna_weight_ranges = _make_ranges(
200
- // unambiguous_rna_weights
201
- // );
202
-
203
- // def _make_ambiguous_ranges(mydict, weight_table):
204
- // range_d = {}
205
- // avg_d = {}
206
- // for letter, values in mydict.items():
207
- // # Following line is a quick hack to skip undefined weights for U and O
208
- // if len(values) == 1 and values[0] not in weight_table:
209
- // continue
210
-
211
- // weights = [weight_table.get(x) for x in values]
212
- // range_d[letter] = (min(weights), max(weights))
213
- // total_w = 0.0
214
- // for w in weights:
215
- // total_w = total_w + w
216
- // avg_d[letter] = total_w / len(weights)
217
- // return range_d, avg_d
218
-
219
- // ambiguous_dna_weight_ranges, avg_ambiguous_dna_weights = \
220
- // _make_ambiguous_ranges(ambiguous_dna_values,
221
- // unambiguous_dna_weights)
222
-
223
- // ambiguous_rna_weight_ranges, avg_ambiguous_rna_weights = \
224
- // _make_ambiguous_ranges(ambiguous_rna_values,
225
- // unambiguous_rna_weights)
226
-
227
- export const protein_weights = {
228
- A: 89.0932,
229
- C: 121.1582,
230
- D: 133.1027,
231
- E: 147.1293,
232
- F: 165.1891,
233
- G: 75.0666,
234
- H: 155.1546,
235
- I: 131.1729,
236
- K: 146.1876,
237
- L: 131.1729,
238
- M: 149.2113,
239
- N: 132.1179,
240
- O: 255.3134,
241
- P: 115.1305,
242
- Q: 146.1445,
243
- R: 174.201,
244
- S: 105.0926,
245
- T: 119.1192,
246
- U: 168.0532,
247
- V: 117.1463,
248
- W: 204.2252,
249
- Y: 181.1885
250
- };
251
-
252
- export const monoisotopic_protein_weights = {
253
- A: 89.047678,
254
- C: 121.019749,
255
- D: 133.037508,
256
- E: 147.053158,
257
- F: 165.078979,
258
- G: 75.032028,
259
- H: 155.069477,
260
- I: 131.094629,
261
- K: 146.105528,
262
- L: 131.094629,
263
- M: 149.051049,
264
- N: 132.053492,
265
- O: 255.158292,
266
- P: 115.063329,
267
- Q: 146.069142,
268
- R: 174.111676,
269
- S: 105.042593,
270
- T: 119.058243,
271
- U: 168.964203,
272
- V: 117.078979,
273
- W: 204.089878,
274
- Y: 181.073893
275
- };
276
-
277
33
  export const extended_protein_values = {
278
34
  A: "A",
279
35
  B: "ND",
@@ -308,124 +64,3 @@ export const extended_protein_values = {
308
64
  ".": "\\.\\.",
309
65
  "-": "\\-"
310
66
  };
311
-
312
- // protein_weight_ranges = _make_ranges(protein_weights)
313
-
314
- // extended_protein_weight_ranges, avg_extended_protein_weights = \
315
- // _make_ambiguous_ranges(extended_protein_values,
316
- // protein_weights)
317
-
318
- // # For Center of Mass Calculation.
319
- // # Taken from http://www.chem.qmul.ac.uk/iupac/AtWt/ & PyMol
320
- export const atom_weights = {
321
- H: 1.00794,
322
- D: 2.0141,
323
- He: 4.002602,
324
- Li: 6.941,
325
- Be: 9.012182,
326
- B: 10.811,
327
- C: 12.0107,
328
- N: 14.0067,
329
- O: 15.9994,
330
- F: 18.9984032,
331
- Ne: 20.1797,
332
- Na: 22.98977,
333
- Mg: 24.305,
334
- Al: 26.981538,
335
- Si: 28.0855,
336
- P: 30.973761,
337
- S: 32.065,
338
- Cl: 35.453,
339
- Ar: 39.948,
340
- K: 39.0983,
341
- Ca: 40.078,
342
- Sc: 44.95591,
343
- Ti: 47.867,
344
- V: 50.9415,
345
- Cr: 51.9961,
346
- Mn: 54.938049,
347
- Fe: 55.845,
348
- Co: 58.9332,
349
- Ni: 58.6934,
350
- Cu: 63.546,
351
- Zn: 65.39,
352
- Ga: 69.723,
353
- Ge: 72.64,
354
- As: 74.9216,
355
- Se: 78.96,
356
- Br: 79.904,
357
- Kr: 83.8,
358
- Rb: 85.4678,
359
- Sr: 87.62,
360
- Y: 88.90585,
361
- Zr: 91.224,
362
- Nb: 92.90638,
363
- Mo: 95.94,
364
- Tc: 98.0,
365
- Ru: 101.07,
366
- Rh: 102.9055,
367
- Pd: 106.42,
368
- Ag: 107.8682,
369
- Cd: 112.411,
370
- In: 114.818,
371
- Sn: 118.71,
372
- Sb: 121.76,
373
- Te: 127.6,
374
- I: 126.90447,
375
- Xe: 131.293,
376
- Cs: 132.90545,
377
- Ba: 137.327,
378
- La: 138.9055,
379
- Ce: 140.116,
380
- Pr: 140.90765,
381
- Nd: 144.24,
382
- Pm: 145.0,
383
- Sm: 150.36,
384
- Eu: 151.964,
385
- Gd: 157.25,
386
- Tb: 158.92534,
387
- Dy: 162.5,
388
- Ho: 164.93032,
389
- Er: 167.259,
390
- Tm: 168.93421,
391
- Yb: 173.04,
392
- Lu: 174.967,
393
- Hf: 178.49,
394
- Ta: 180.9479,
395
- W: 183.84,
396
- Re: 186.207,
397
- Os: 190.23,
398
- Ir: 192.217,
399
- Pt: 195.078,
400
- Au: 196.96655,
401
- Hg: 200.59,
402
- Tl: 204.3833,
403
- Pb: 207.2,
404
- Bi: 208.98038,
405
- Po: 208.98,
406
- At: 209.99,
407
- Rn: 222.02,
408
- Fr: 223.02,
409
- Ra: 226.03,
410
- Ac: 227.03,
411
- Th: 232.0381,
412
- Pa: 231.03588,
413
- U: 238.02891,
414
- Np: 237.05,
415
- Pu: 244.06,
416
- Am: 243.06,
417
- Cm: 247.07,
418
- Bk: 247.07,
419
- Cf: 251.08,
420
- Es: 252.08,
421
- Fm: 257.1,
422
- Md: 258.1,
423
- No: 259.1,
424
- Lr: 262.11,
425
- Rf: 261.11,
426
- Db: 262.11,
427
- Sg: 266.12,
428
- Bh: 264.12,
429
- Hs: 269.13,
430
- Mt: 268.14
431
- };
@@ -31,4 +31,4 @@ export default function calculateNebTa(
31
31
  } catch (err) {
32
32
  return `Error calculating annealing temperature: ${err}`;
33
33
  }
34
- };
34
+ }
@@ -124,4 +124,4 @@ export default function calculateNebTm(
124
124
  } catch (err) {
125
125
  return `Error calculating Tm for sequence ${sequence}: ${err}`;
126
126
  }
127
- };
127
+ }
@@ -1,3 +1,3 @@
1
1
  export default function calculatePercentGC(bps) {
2
- return (bps.match(/[cg]/gi) || []).length / bps.length * 100 || 0;
3
- };
2
+ return ((bps.match(/[cg]/gi) || []).length / bps.length) * 100 || 0;
3
+ }
@@ -23,12 +23,13 @@ const calcTmMethods = {
23
23
  * @param {Double} Na THe monovalent salt concentration. Defaults to 50e-3M.
24
24
  * @return {Double} Temperature for the given sequence, in Celsius.
25
25
  */
26
- calculateTemperature: function(sequence, type, A, R, C, Na) {
26
+ calculateTemperature: function (sequence, type, A, R, C, Na) {
27
27
  if (typeof type === "undefined") {
28
28
  type = this.TABLE_BRESLAUER;
29
29
  } else if (
30
30
  type != this.TABLE_BRESLAUER &&
31
- (type != this.TABLE_UNIFIED && type != this.TABLE_SUGIMOTO)
31
+ type != this.TABLE_UNIFIED &&
32
+ type != this.TABLE_SUGIMOTO
32
33
  ) {
33
34
  throw new Error("Invalid table type!");
34
35
  }
@@ -104,63 +105,21 @@ const calcTmMethods = {
104
105
  * @param {String} type Algorithm to get table for.
105
106
  * @return {Number[]} deltaH table for given algorithm.
106
107
  */
107
- getDeltaHTable: function(type) {
108
+ getDeltaHTable: function (type) {
108
109
  if (type == this.TABLE_BRESLAUER) {
109
110
  return [
110
- 9.1,
111
- 8.6,
112
- 6.5,
113
- 7.8,
114
- 9.1,
115
- 6.0,
116
- 5.6,
117
- 5.8,
118
- 11.0,
119
- 5.8,
120
- 7.8,
121
- 11.9,
122
- 11.0,
123
- 5.6,
124
- 6.5,
125
- 11.1
111
+ 9.1, 8.6, 6.5, 7.8, 9.1, 6.0, 5.6, 5.8, 11.0, 5.8, 7.8, 11.9, 11.0, 5.6,
112
+ 6.5, 11.1
126
113
  ];
127
114
  } else if (type == this.TABLE_SUGIMOTO) {
128
115
  return [
129
- 8.0,
130
- 5.6,
131
- 6.5,
132
- 7.8,
133
- 8.0,
134
- 5.6,
135
- 5.6,
136
- 5.8,
137
- 10.9,
138
- 8.2,
139
- 6.6,
140
- 11.8,
141
- 10.9,
142
- 6.6,
143
- 9.4,
144
- 11.9
116
+ 8.0, 5.6, 6.5, 7.8, 8.0, 5.6, 5.6, 5.8, 10.9, 8.2, 6.6, 11.8, 10.9, 6.6,
117
+ 9.4, 11.9
145
118
  ];
146
119
  } else if (type == this.TABLE_UNIFIED) {
147
120
  return [
148
- 7.9,
149
- 7.2,
150
- 8.4,
151
- 7.8,
152
- 7.9,
153
- 7.2,
154
- 8.2,
155
- 8.5,
156
- 8.0,
157
- 8.5,
158
- 7.8,
159
- 10.6,
160
- 8.0,
161
- 8.2,
162
- 8.4,
163
- 9.8
121
+ 7.9, 7.2, 8.4, 7.8, 7.9, 7.2, 8.2, 8.5, 8.0, 8.5, 7.8, 10.6, 8.0, 8.2,
122
+ 8.4, 9.8
164
123
  ];
165
124
  } else {
166
125
  return null;
@@ -173,63 +132,21 @@ const calcTmMethods = {
173
132
  * @param {String} type Algorithm to get table for.
174
133
  * @return {Number[]} deltaS table for given algorithm.
175
134
  */
176
- getDeltaSTable: function(type) {
135
+ getDeltaSTable: function (type) {
177
136
  if (type == this.TABLE_BRESLAUER) {
178
137
  return [
179
- 24.0,
180
- 23.9,
181
- 17.3,
182
- 20.8,
183
- 24.0,
184
- 16.9,
185
- 13.5,
186
- 12.9,
187
- 26.6,
188
- 12.9,
189
- 20.8,
190
- 27.8,
191
- 26.6,
192
- 13.5,
193
- 17.3,
194
- 26.7
138
+ 24.0, 23.9, 17.3, 20.8, 24.0, 16.9, 13.5, 12.9, 26.6, 12.9, 20.8, 27.8,
139
+ 26.6, 13.5, 17.3, 26.7
195
140
  ];
196
141
  } else if (type == this.TABLE_SUGIMOTO) {
197
142
  return [
198
- 21.9,
199
- 15.2,
200
- 17.3,
201
- 20.8,
202
- 21.9,
203
- 15.2,
204
- 13.5,
205
- 12.9,
206
- 28.4,
207
- 25.5,
208
- 23.5,
209
- 29.0,
210
- 28.4,
211
- 16.4,
212
- 25.5,
213
- 29.0
143
+ 21.9, 15.2, 17.3, 20.8, 21.9, 15.2, 13.5, 12.9, 28.4, 25.5, 23.5, 29.0,
144
+ 28.4, 16.4, 25.5, 29.0
214
145
  ];
215
146
  } else if (type == this.TABLE_UNIFIED) {
216
147
  return [
217
- 22.2,
218
- 20.4,
219
- 22.4,
220
- 21.0,
221
- 22.2,
222
- 21.3,
223
- 22.2,
224
- 22.7,
225
- 19.9,
226
- 22.7,
227
- 21.0,
228
- 27.2,
229
- 19.9,
230
- 22.2,
231
- 22.4,
232
- 24.4
148
+ 22.2, 20.4, 22.4, 21.0, 22.2, 21.3, 22.2, 22.7, 19.9, 22.7, 21.0, 27.2,
149
+ 19.9, 22.2, 22.4, 24.4
233
150
  ];
234
151
  } else {
235
152
  return null;
@@ -245,7 +162,7 @@ const calcTmMethods = {
245
162
  * @param {String} target The string to search for.
246
163
  * @return {Int} Number of occurrences of target in sequence, with repeats.
247
164
  */
248
- calculateReps: function(sequence, target) {
165
+ calculateReps: function (sequence, target) {
249
166
  const sequenceLength = sequence.length;
250
167
 
251
168
  if (sequenceLength == 0) {
@@ -281,7 +198,7 @@ const calcTmMethods = {
281
198
  * @param {String} target The string to search for.
282
199
  * @return {Int} Number of occurrences of target in sequence.
283
200
  */
284
- calculateNumberOfOccurrences: function(sequence, target) {
201
+ calculateNumberOfOccurrences: function (sequence, target) {
285
202
  const sequenceLength = sequence.length;
286
203
 
287
204
  if (sequenceLength == 0) {
@@ -1,6 +1,9 @@
1
1
  import shortid from "shortid";
2
- import {flatMap, cloneDeep} from "lodash";
3
- import {normalizePositionByRangeLength, getRangeLength} from "@teselagen/range-utils";
2
+ import { flatMap, cloneDeep } from "lodash";
3
+ import {
4
+ normalizePositionByRangeLength,
5
+ getRangeLength
6
+ } from "@teselagen/range-utils";
4
7
  import getCutsitesFromSequence from "./getCutsitesFromSequence";
5
8
 
6
9
  function computeDigestFragments({
@@ -175,5 +178,5 @@ function getDigestFragsForSeqAndEnzymes({
175
178
  });
176
179
  }
177
180
 
178
- export {computeDigestFragments};
179
- export {getDigestFragsForSeqAndEnzymes};
181
+ export { computeDigestFragments };
182
+ export { getDigestFragsForSeqAndEnzymes };
@@ -1,4 +1,4 @@
1
- import {getDigestFragsForSeqAndEnzymes} from "./computeDigestFragments.js";
1
+ import { getDigestFragsForSeqAndEnzymes } from "./computeDigestFragments.js";
2
2
  import aliasedEnzymesByName from "./aliasedEnzymesByName.js";
3
3
 
4
4
  describe("computeDigestFragments", () => {
@@ -82,4 +82,4 @@ export default function condensePairwiseAlignmentDifferences(
82
82
  }
83
83
  }
84
84
  return overviewMinimapTrack.join("");
85
- };
85
+ }
@@ -9,7 +9,7 @@ export default function convertAACaretPositionOrRangeToDna(rangeOrCaret) {
9
9
  } else {
10
10
  return convertAACaretPositionToDnaCaretPosition(rangeOrCaret);
11
11
  }
12
- };
12
+ }
13
13
 
14
14
  function convertAACaretPositionToDnaCaretPosition(caret) {
15
15
  return caret * 3;
@@ -9,7 +9,7 @@ export default function convertDnaCaretPositionOrRangeToAA(rangeOrCaret) {
9
9
  } else {
10
10
  return convertDnaCaretPositionToAACaretPosition(rangeOrCaret);
11
11
  }
12
- };
12
+ }
13
13
 
14
14
  function convertDnaCaretPositionToAACaretPosition(caret) {
15
15
  return Math.floor(caret / 3);
@@ -1,11 +1,11 @@
1
- import {assign} from "lodash";
1
+ import { assign } from "lodash";
2
2
  import shortid from "shortid";
3
3
  import getReverseComplementSequenceString from "./getReverseComplementSequenceString";
4
4
 
5
5
  import {
6
6
  getSequenceWithinRange,
7
7
  normalizePositionByRangeLength,
8
- reversePositionInRange,
8
+ reversePositionInRange
9
9
  } from "@teselagen/range-utils";
10
10
 
11
11
  export default function cutSequenceByRestrictionEnzyme(
@@ -98,7 +98,7 @@ export default function cutSequenceByRestrictionEnzyme(
98
98
  forward: false
99
99
  });
100
100
  }
101
- };
101
+ }
102
102
 
103
103
  function cutSequence(
104
104
  forwardRegExpPattern,
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable no-unused-expressions */
2
2
 
3
-
4
3
  import chai from "chai";
5
4
  import cutSequenceByRestrictionEnzyme from "./cutSequenceByRestrictionEnzyme.js";
6
5
  import enzymeList from "./aliasedEnzymesByName";
@@ -1,4 +1,4 @@
1
- import {invert} from "lodash";
1
+ import { invert } from "lodash";
2
2
  import aminoAcidToDegenerateDnaMap from "./aminoAcidToDegenerateDnaMap";
3
3
 
4
4
  const degenerateDnaToAminoAcidMap = invert(aminoAcidToDegenerateDnaMap);
@@ -1,4 +1,4 @@
1
- import {invert} from "lodash";
1
+ import { invert } from "lodash";
2
2
  import aminoAcidToDegenerateRnaMap from "./aminoAcidToDegenerateRnaMap";
3
3
 
4
4
  const degenerateRnaToAminoAcidMap = invert(aminoAcidToDegenerateRnaMap);
@@ -2,4 +2,4 @@ import insertSequenceDataAtPositionOrRange from "./insertSequenceDataAtPositionO
2
2
 
3
3
  export default function deleteSequenceDataAtRange(sequenceData, range) {
4
4
  return insertSequenceDataAtPositionOrRange({}, sequenceData, range);
5
- };
5
+ }