@opencloning/ui 1.4.9 → 1.4.11
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,25 @@
|
|
|
1
1
|
# @opencloning/ui
|
|
2
2
|
|
|
3
|
+
## 1.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#644](https://github.com/manulera/OpenCloning_frontend/pull/644) [`27744a3`](https://github.com/manulera/OpenCloning_frontend/commit/27744a3e5cebd6d41cb11a76f3d4d367f5a4edc8) Thanks [@manulera](https://github.com/manulera)! - Fix graphToMSA
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @opencloning/store@1.4.11
|
|
11
|
+
- @opencloning/utils@1.4.11
|
|
12
|
+
|
|
13
|
+
## 1.4.10
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#642](https://github.com/manulera/OpenCloning_frontend/pull/642) [`3028e98`](https://github.com/manulera/OpenCloning_frontend/commit/3028e98b60be89288327cc1b6dac87cb2479a3c7) Thanks [@manulera](https://github.com/manulera)! - When downloading from assembler, if name is too long change to id_construct
|
|
18
|
+
|
|
19
|
+
- Updated dependencies []:
|
|
20
|
+
- @opencloning/store@1.4.10
|
|
21
|
+
- @opencloning/utils@1.4.10
|
|
22
|
+
|
|
3
23
|
## 1.4.9
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencloning/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@emotion/styled": "^11.14.0",
|
|
26
26
|
"@mui/icons-material": "^5.15.17",
|
|
27
27
|
"@mui/material": "^5.15.17",
|
|
28
|
-
"@opencloning/store": "1.4.
|
|
29
|
-
"@opencloning/utils": "1.4.
|
|
28
|
+
"@opencloning/store": "1.4.11",
|
|
29
|
+
"@opencloning/utils": "1.4.11",
|
|
30
30
|
"@teselagen/bio-parsers": "^0.4.34",
|
|
31
31
|
"@teselagen/ove": "^0.8.34",
|
|
32
32
|
"@teselagen/range-utils": "^0.3.20",
|
|
@@ -168,7 +168,10 @@ export function getFilesToExportFromAssembler({requestedAssemblies, expandedAsse
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
for (let i = 0; i < requestedAssemblies.length; i++) {
|
|
171
|
-
|
|
171
|
+
let name = `${String(i + 1).padStart(3, '0')}_${assemblyNames[i].slice(1).join('+')}`;
|
|
172
|
+
if (name.length > 255) {
|
|
173
|
+
name = `${String(i + 1).padStart(3, '0')}_construct`;
|
|
174
|
+
}
|
|
172
175
|
const requestedAssembly = requestedAssemblies[i];
|
|
173
176
|
const jsonContent = formatStateForJsonExport({...requestedAssembly, appInfo});
|
|
174
177
|
files2Export.push({
|
|
@@ -285,8 +285,8 @@ const dummyData = {
|
|
|
285
285
|
|
|
286
286
|
|
|
287
287
|
|
|
288
|
-
describe('
|
|
289
|
-
it('returns
|
|
288
|
+
describe('getFilesToExportFromAssembler', () => {
|
|
289
|
+
it('returns the correct files', () => {
|
|
290
290
|
const files = getFilesToExportFromAssembler(dummyData);
|
|
291
291
|
expect(files[0].name).toBe('assemblies.tsv');
|
|
292
292
|
expect(files[0].content).toBe('Assembly\tCategory 1\tCategory 2\tCategory 3\n1\tp1\tp5\tp7\n2\tp1\tp2\tp3');
|
|
@@ -310,4 +310,15 @@ describe('getZipFileFromAssemblies', () => {
|
|
|
310
310
|
|
|
311
311
|
|
|
312
312
|
})
|
|
313
|
+
it('changes name if file names are too long', () => {
|
|
314
|
+
const dummyData2 = {
|
|
315
|
+
...dummyData,
|
|
316
|
+
plasmids: dummyData.plasmids.map(plasmid => ({...plasmid, plasmid_name: 'p1'.repeat(100)})),
|
|
317
|
+
}
|
|
318
|
+
const files = getFilesToExportFromAssembler(dummyData2);
|
|
319
|
+
expect(files[2].name).toBe('001_construct.json');
|
|
320
|
+
expect(files[3].name).toBe('001_construct.gbk');
|
|
321
|
+
expect(files[4].name).toBe('002_construct.json');
|
|
322
|
+
expect(files[5].name).toBe('002_construct.gbk');
|
|
323
|
+
})
|
|
313
324
|
})
|
|
@@ -144,7 +144,12 @@ function minimumCoveringRows(msa) {
|
|
|
144
144
|
|
|
145
145
|
export function graphToMSA(graph) {
|
|
146
146
|
if (graph.nodes().length === 0) return [];
|
|
147
|
-
const
|
|
147
|
+
const firstNodeLeftOverhang = graph.nodes()[0].split('-')[0];
|
|
148
|
+
const nodesToRemove = graph.nodes().filter(node => node.split('-')[0] === firstNodeLeftOverhang);
|
|
149
|
+
let newGraph = graph;
|
|
150
|
+
for (const node of nodesToRemove) {
|
|
151
|
+
newGraph = openCycleAtNode(newGraph, node);
|
|
152
|
+
}
|
|
148
153
|
return minimumCoveringRows(dagToMSA(newGraph));
|
|
149
154
|
}
|
|
150
155
|
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Version placeholder - replaced at publish time via prepack script
|
|
2
|
-
export const version = "1.4.
|
|
2
|
+
export const version = "1.4.11";
|