@jbrowse/bandage-core 7.1.0 → 7.2.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.
Files changed (32) hide show
  1. package/dist/chunks/{chunk-UGD6ZMOF.js → chunk-2T3SRIFH.js} +1 -2
  2. package/dist/chunks/chunk-6EJIU6IA.js +42 -0
  3. package/dist/chunks/{chunk-MAPRJ2H2.js → chunk-BZKEMAWC.js} +1 -1
  4. package/dist/chunks/{chunk-6UFS3EWI.js → chunk-EPWYRSHH.js} +1 -1
  5. package/dist/chunks/{chunk-YZ5CCEDH.js → chunk-JVLURPFW.js} +1 -0
  6. package/dist/chunks/chunk-LYJ4US66.js +664 -0
  7. package/dist/chunks/{chunk-2WA4EY25.js → chunk-MQSOTYVF.js} +8 -8
  8. package/dist/chunks/{chunk-KREASK3Z.js → chunk-OY3CDWFN.js} +1 -1
  9. package/dist/chunks/{chunk-O4TGF4WS.js → chunk-UNOE2NDN.js} +155 -129
  10. package/dist/chunks/{chunk-AWCMVPVP.js → chunk-Y7UR3MDE.js} +1 -1
  11. package/dist/cli/figure.js +22 -11
  12. package/dist/figure.js +8 -8
  13. package/dist/index.js +17 -16
  14. package/dist/layout/deletionRoutes.js +3 -1
  15. package/dist/layout/stressEngine.js +5 -5
  16. package/dist/layout/stressPlacement.js +7 -0
  17. package/dist/layout/walkRowDraw.js +1 -1
  18. package/dist/layout/walkStrip.js +2 -2
  19. package/dist/layoutEngines.js +10 -2
  20. package/dist/pipeline.js +2 -2
  21. package/dist/types/cli/figure.d.ts +1 -1
  22. package/dist/types/index.d.ts +3 -3
  23. package/dist/types/layout/deletionRoutes.d.ts +1 -0
  24. package/dist/types/layout/stressEngine.d.ts +19 -11
  25. package/dist/types/layout/stressPlacement.d.ts +5 -0
  26. package/dist/types/layoutEngines.d.ts +12 -0
  27. package/dist/types/pipeline.d.ts +1 -1
  28. package/dist/types/version.d.ts +1 -1
  29. package/dist/version.js +1 -1
  30. package/dist/viewport.js +3 -3
  31. package/package.json +1 -1
  32. package/dist/chunks/chunk-L53SXJZI.js +0 -22
@@ -25,7 +25,6 @@ var GENE_INK = "#1c1c22";
25
25
  var BAR_PX = 12;
26
26
  var GAP_PX = 4;
27
27
  var LABELLED_ROW_PX = 12;
28
- var READOUT_ROW_PX = 14;
29
28
  var MIN_TILED_BAR_PX = 6;
30
29
  var MIN_TILE_PX = 3;
31
30
  function kb(bp) {
@@ -278,7 +277,7 @@ function rowPitch(count, room, minRowPx = 0) {
278
277
  rowPx,
279
278
  barPx: rowPx <= 3 ? rowPx : Math.max(3, Math.round(rowPx * 0.6)),
280
279
  labelled: rowPx >= LABELLED_ROW_PX,
281
- readouts: rowPx >= READOUT_ROW_PX
280
+ readouts: rowPx >= LABELLED_ROW_PX
282
281
  };
283
282
  }
284
283
  function coalesceRuns(runs, pxPerBp) {
@@ -0,0 +1,42 @@
1
+ import {
2
+ stressLayout
3
+ } from "./chunk-UNOE2NDN.js";
4
+ import {
5
+ loadBandage
6
+ } from "./chunk-7XHHVYG7.js";
7
+
8
+ // src/layoutEngines.ts
9
+ var LAYOUT_ENGINES = [
10
+ {
11
+ value: "fmmm",
12
+ label: "Bandage (FMMM)",
13
+ description: "Bandage's force-directed layout: OGDF's fast multipole multilevel method, compiled to wasm."
14
+ },
15
+ {
16
+ value: "stress",
17
+ label: "Stress (experimental)",
18
+ description: "Stress layout by stochastic gradient descent in plain JS: distances along the graph become distances on the page, so the reference reads straight and a repeat loop reads as a ring."
19
+ }
20
+ ];
21
+ var LAYOUT_ENGINE_VALUES = LAYOUT_ENGINES.map((e) => e.value);
22
+ function isLayoutEngineKind(value) {
23
+ return LAYOUT_ENGINE_VALUES.includes(value);
24
+ }
25
+ var layoutEngine = async (request) => {
26
+ if (request.options.engine === "stress") {
27
+ const start2 = performance.now();
28
+ const result2 = stressLayout(request);
29
+ return { result: result2, duration: performance.now() - start2 };
30
+ }
31
+ const bandage = await loadBandage();
32
+ const start = performance.now();
33
+ const result = bandage.computeLayout(request.graph, request.options);
34
+ return { result, duration: performance.now() - start };
35
+ };
36
+
37
+ export {
38
+ LAYOUT_ENGINES,
39
+ LAYOUT_ENGINE_VALUES,
40
+ isLayoutEngineKind,
41
+ layoutEngine
42
+ };
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "7.1.0";
2
+ var version = "7.2.1";
3
3
 
4
4
  export {
5
5
  version
@@ -14,7 +14,7 @@ import {
14
14
  routeNodes,
15
15
  takeRoutes,
16
16
  withDeletionRoutes
17
- } from "./chunk-YZ5CCEDH.js";
17
+ } from "./chunk-JVLURPFW.js";
18
18
  import {
19
19
  anchorGraph
20
20
  } from "./chunk-ST2IBUAN.js";
@@ -73,6 +73,7 @@ function takeRoutes(positions, routes) {
73
73
  }
74
74
 
75
75
  export {
76
+ ROUTE_ID,
76
77
  withDeletionRoutes,
77
78
  routeNodes,
78
79
  takeRoutes