@opencloning/utils 1.5.0 → 1.5.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @opencloning/utils
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#651](https://github.com/manulera/OpenCloning_frontend/pull/651) [`b5c89e2`](https://github.com/manulera/OpenCloning_frontend/commit/b5c89e23aa1065319cb07a9ac48a26693dd0a21a) Thanks [@manulera](https://github.com/manulera)! - Allow primer design of Gibson and similar assembly methods to include fragments that are not amplified. Similar to what the NEBuilder planner does, where not all products are amplified. Perhaps in the future it would be useful to also allow the option to restore the restriction sites on the edge.
8
+
9
+ - Updated dependencies [[`b5c89e2`](https://github.com/manulera/OpenCloning_frontend/commit/b5c89e23aa1065319cb07a9ac48a26693dd0a21a)]:
10
+ - @opencloning/store@1.5.1
11
+
3
12
  ## 1.5.0
4
13
 
5
14
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencloning/utils",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "main": "./src/utils/index.js",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "directory": "packages/utils"
29
29
  },
30
30
  "dependencies": {
31
- "@opencloning/store": "1.5.0",
31
+ "@opencloning/store": "1.5.1",
32
32
  "@teselagen/bio-parsers": "^0.4.34",
33
33
  "@teselagen/sequence-utils": "^0.3.42",
34
34
  "@zip.js/zip.js": "^2.7.62",
@@ -36,22 +36,43 @@ export function joinSequencesIntoSingleSequence(sequences, locations, orientatio
36
36
  }
37
37
  }
38
38
 
39
+ const isSpacer = [];
39
40
  for (let i = 0; i < sequences.length; i++) {
40
41
  sequences2join.push(sequences[i]);
42
+ isSpacer.push(false);
41
43
  locations2join.push(locations[i]);
42
44
  orientations2join.push(orientations[i]);
43
45
  if (spacerSequences[i]) {
44
46
  sequences2join.push(spacerSequences[i]);
47
+ isSpacer.push(true);
45
48
  locations2join.push({ start: 0, end: spacerSequences[i].sequence.length - 1 });
46
49
  orientations2join.push('forward');
47
50
  }
48
51
  }
49
52
 
53
+ let partIndex = 1;
50
54
  const fragments = sequences2join.map((sequence, index) => {
51
- const seq = getSequenceDataBetweenRange(sequence, locations2join[index]);
55
+ let seq = getSequenceDataBetweenRange(sequence, locations2join[index]);
52
56
  if (orientations2join[index] === 'reverse') {
53
- return getReverseComplementSequenceAndAnnotations(seq);
57
+ seq = getReverseComplementSequenceAndAnnotations(seq);
54
58
  }
59
+ let partName = `Part ${partIndex}`;
60
+ if (isSpacer[index]) {
61
+ partName = `Spacer`;
62
+ } else {
63
+ partIndex++;
64
+ }
65
+
66
+ const part = {
67
+ start: 0,
68
+ end: seq.sequence.length,
69
+ name: partName,
70
+ id: index,
71
+ forward: true,
72
+ strand: 1,
73
+ type: "misc_feature",
74
+ }
75
+ seq.parts.push(part);
55
76
  return seq;
56
77
  });
57
78
  // Concatenate all fragments