@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.
- package/dist/chunks/{chunk-UGD6ZMOF.js → chunk-2T3SRIFH.js} +1 -2
- package/dist/chunks/chunk-6EJIU6IA.js +42 -0
- package/dist/chunks/{chunk-MAPRJ2H2.js → chunk-BZKEMAWC.js} +1 -1
- package/dist/chunks/{chunk-6UFS3EWI.js → chunk-EPWYRSHH.js} +1 -1
- package/dist/chunks/{chunk-YZ5CCEDH.js → chunk-JVLURPFW.js} +1 -0
- package/dist/chunks/chunk-LYJ4US66.js +664 -0
- package/dist/chunks/{chunk-2WA4EY25.js → chunk-MQSOTYVF.js} +8 -8
- package/dist/chunks/{chunk-KREASK3Z.js → chunk-OY3CDWFN.js} +1 -1
- package/dist/chunks/{chunk-O4TGF4WS.js → chunk-UNOE2NDN.js} +155 -129
- package/dist/chunks/{chunk-AWCMVPVP.js → chunk-Y7UR3MDE.js} +1 -1
- package/dist/cli/figure.js +22 -11
- package/dist/figure.js +8 -8
- package/dist/index.js +17 -16
- package/dist/layout/deletionRoutes.js +3 -1
- package/dist/layout/stressEngine.js +5 -5
- package/dist/layout/stressPlacement.js +7 -0
- package/dist/layout/walkRowDraw.js +1 -1
- package/dist/layout/walkStrip.js +2 -2
- package/dist/layoutEngines.js +10 -2
- package/dist/pipeline.js +2 -2
- package/dist/types/cli/figure.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/layout/deletionRoutes.d.ts +1 -0
- package/dist/types/layout/stressEngine.d.ts +19 -11
- package/dist/types/layout/stressPlacement.d.ts +5 -0
- package/dist/types/layoutEngines.d.ts +12 -0
- package/dist/types/pipeline.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/viewport.js +3 -3
- package/package.json +1 -1
- 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 >=
|
|
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
|
+
};
|