@opencloning/utils 1.4.10 → 1.5.0
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 +18 -0
- package/package.json +4 -3
- package/src/utils/index.js +1 -0
- package/src/utils/normalizeSyntax.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @opencloning/utils
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#648](https://github.com/manulera/OpenCloning_frontend/pull/648) [`800ebcd`](https://github.com/manulera/OpenCloning_frontend/commit/800ebcd4ed610ad89d538e1d59314977aae40583) Thanks [@manulera](https://github.com/manulera)! - Multiple enzymes can be used in the Assembler
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @opencloning/store@1.5.0
|
|
13
|
+
|
|
14
|
+
## 1.4.11
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies []:
|
|
19
|
+
- @opencloning/store@1.4.11
|
|
20
|
+
|
|
3
21
|
## 1.4.10
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencloning/utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/utils/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"./ncbiRequests": "./src/utils/ncbiRequests.js",
|
|
20
20
|
"./other": "./src/utils/other.js",
|
|
21
21
|
"./transformCoords": "./src/utils/transformCoords.js",
|
|
22
|
-
"./selectedRegionUtils": "./src/utils/selectedRegionUtils.js"
|
|
22
|
+
"./selectedRegionUtils": "./src/utils/selectedRegionUtils.js",
|
|
23
|
+
"./normalizeSyntax": "./src/utils/normalizeSyntax.js"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"directory": "packages/utils"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@opencloning/store": "1.
|
|
31
|
+
"@opencloning/store": "1.5.0",
|
|
31
32
|
"@teselagen/bio-parsers": "^0.4.34",
|
|
32
33
|
"@teselagen/sequence-utils": "^0.3.42",
|
|
33
34
|
"@zip.js/zip.js": "^2.7.62",
|
package/src/utils/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes syntax data for assembly enzymes. Handles legacy assemblyEnzyme (string).
|
|
3
|
+
* @param {Object} syntax - Raw syntax object from JSON
|
|
4
|
+
* @returns {Object} syntax with assemblyEnzymes: string[]
|
|
5
|
+
*/
|
|
6
|
+
export function normalizeSyntaxEnzymes(syntax) {
|
|
7
|
+
if (!syntax) return syntax;
|
|
8
|
+
const enzymes = syntax.assemblyEnzymes ??
|
|
9
|
+
(syntax.assemblyEnzyme != null ? [syntax.assemblyEnzyme] : ['BsaI']);
|
|
10
|
+
return { ...syntax, assemblyEnzymes: Array.isArray(enzymes) ? enzymes : [enzymes] };
|
|
11
|
+
}
|