@jbrowse/bandage-core 9.3.0 → 9.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/dist/bubbles/bubbleHalos.js +1 -1
- package/dist/bubbles/superbubbles.js +2 -2
- package/dist/chunks/{chunk-3FOOZ5VL.js → chunk-DRG4236Y.js} +10 -2
- package/dist/chunks/{chunk-BTMPPLDF.js → chunk-DW4ZNIZH.js} +1 -1
- package/dist/chunks/{chunk-UNOE2NDN.js → chunk-Q6FRNVDU.js} +3 -1
- package/dist/chunks/{chunk-ABOZYAN5.js → chunk-REM73HCU.js} +5 -3
- package/dist/chunks/{chunk-TL3TYSCP.js → chunk-T6EGLY2R.js} +2 -2
- package/dist/chunks/{chunk-ROYHPOYF.js → chunk-TF7H5LQS.js} +13 -6
- package/dist/chunks/{chunk-6EJIU6IA.js → chunk-VK6XMP6B.js} +2 -2
- package/dist/cli/figure.js +5 -5
- package/dist/figure.js +3 -3
- package/dist/index.js +7 -7
- package/dist/labelLayout.js +1 -1
- package/dist/layout/stressEngine.js +1 -1
- package/dist/layoutEngines.js +2 -2
- package/dist/types/bubbles/bubbleLine.d.ts +1 -0
- package/dist/types/layoutEngines.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphBubbles,
|
|
3
3
|
superbubblesFromGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-TF7H5LQS.js";
|
|
5
5
|
import "../chunks/chunk-VHW7FDHU.js";
|
|
6
|
-
import "../chunks/chunk-
|
|
6
|
+
import "../chunks/chunk-REM73HCU.js";
|
|
7
7
|
import "../chunks/chunk-XKWD2RY3.js";
|
|
8
8
|
import "../chunks/chunk-GOZYKNQ2.js";
|
|
9
9
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
@@ -21,6 +21,7 @@ var LEGEND_INSET_PX = 6;
|
|
|
21
21
|
var ROUTE_STACK = 8;
|
|
22
22
|
var GENE_PIN_DROP_PX = 18;
|
|
23
23
|
var GENE_STACK = 2;
|
|
24
|
+
var BUBBLE_STACK = 3;
|
|
24
25
|
var TOPMOST_BASELINE = LABEL_PX + LABEL_PAD;
|
|
25
26
|
function geneCoverageNote(pin) {
|
|
26
27
|
const length = pin.gene.end - pin.gene.start;
|
|
@@ -102,10 +103,17 @@ function layoutLabels(m) {
|
|
|
102
103
|
};
|
|
103
104
|
const byBubble = byExtent(
|
|
104
105
|
m.bubbleHalos.filter((h) => !h.tick),
|
|
105
|
-
(h) => h.members
|
|
106
|
+
(h) => h.whole ? -1 : h.members
|
|
106
107
|
);
|
|
107
108
|
const bubbles = placeLabels(
|
|
108
|
-
byBubble.map((h) => ({
|
|
109
|
+
byBubble.map((h) => ({
|
|
110
|
+
item: h,
|
|
111
|
+
...above(h, 6),
|
|
112
|
+
text: h.label,
|
|
113
|
+
// `0 bp–11 kb superbubble` where `…, 1198 segments, 5 routes` does not fit
|
|
114
|
+
fallback: h.label.includes(",") ? h.label.split(",")[0] : void 0,
|
|
115
|
+
stack: BUBBLE_STACK
|
|
116
|
+
})),
|
|
109
117
|
frame,
|
|
110
118
|
take
|
|
111
119
|
);
|
|
@@ -18,6 +18,7 @@ var UNTANGLE_LINKS = 3;
|
|
|
18
18
|
var UNTANGLE_PUSH = 0.3;
|
|
19
19
|
var SMOOTH_PASSES = 2;
|
|
20
20
|
var MAX_HOPS = 200;
|
|
21
|
+
var REFERENCE_HOPS = 20;
|
|
21
22
|
var EPS = 0.1;
|
|
22
23
|
var WARM = 0.5;
|
|
23
24
|
function flipped(strand, name) {
|
|
@@ -238,7 +239,8 @@ function stressLayout(request, opts = {}) {
|
|
|
238
239
|
let idx = c.indexOf[i];
|
|
239
240
|
let dir = rand() < 0.5 ? -1 : 1;
|
|
240
241
|
let remaining = length;
|
|
241
|
-
|
|
242
|
+
const maxHops = refIdx[comp[i]].length >= 2 ? REFERENCE_HOPS : MAX_HOPS;
|
|
243
|
+
for (let hops = 0; hops < maxHops; hops++) {
|
|
242
244
|
const points = count[chain];
|
|
243
245
|
const step = per[chain];
|
|
244
246
|
const toEnd = (dir > 0 ? points - 1 - idx : idx) * step;
|
|
@@ -88,6 +88,7 @@ function bubbleHalos(graph, bubbles, positions, walkLabel = (name) => name, repe
|
|
|
88
88
|
routes.push({ route, at, text: routeText(route, walkLabel) });
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
+
const whole = bubble.covering === true || coversGraph(nodeIds.length, graph.nodes.length);
|
|
91
92
|
halos.push({
|
|
92
93
|
bubble,
|
|
93
94
|
...classifyBubble(bubble, repeats),
|
|
@@ -95,9 +96,10 @@ function bubbleHalos(graph, bubbles, positions, walkLabel = (name) => name, repe
|
|
|
95
96
|
labelAt,
|
|
96
97
|
members: nodeIds.length,
|
|
97
98
|
nodeIds,
|
|
98
|
-
whole
|
|
99
|
-
//
|
|
100
|
-
|
|
99
|
+
whole,
|
|
100
|
+
// The drawing's own bubble keeps its name however small. A partial
|
|
101
|
+
// bubble's lengths are a floor, so it may be no small variant.
|
|
102
|
+
tick: !whole && !bubble.partial && bubble.longestAlleleLength < SMALL_VARIANT_BP,
|
|
101
103
|
routes
|
|
102
104
|
});
|
|
103
105
|
}
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
} from "./chunk-BR25DGIJ.js";
|
|
46
46
|
import {
|
|
47
47
|
version
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-DW4ZNIZH.js";
|
|
49
49
|
import {
|
|
50
50
|
walkRowLabels,
|
|
51
51
|
walkRowsExtent
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./chunk-RAKOB6IV.js";
|
|
63
63
|
import {
|
|
64
64
|
geneLabelCandidates
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-DRG4236Y.js";
|
|
66
66
|
import {
|
|
67
67
|
nodesUnderBox
|
|
68
68
|
} from "./chunk-FP4H7SFT.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-VHW7FDHU.js";
|
|
4
4
|
import {
|
|
5
5
|
coversGraph
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-REM73HCU.js";
|
|
7
7
|
import {
|
|
8
8
|
bubbleSegmentIds
|
|
9
9
|
} from "./chunk-XKWD2RY3.js";
|
|
@@ -259,11 +259,18 @@ function superbubblesFromGraph(graph, span) {
|
|
|
259
259
|
function graphBubbles(graph, span) {
|
|
260
260
|
const n = graph.nodes.length;
|
|
261
261
|
const reach = bubblesFromGraph(graph);
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
262
|
+
if (reach.length === 0) {
|
|
263
|
+
const inside = superbubblesFromGraph(graph, span);
|
|
264
|
+
return span ? [...inside, { ...span, covering: true }] : inside;
|
|
265
|
+
}
|
|
266
|
+
return reach.flatMap(
|
|
267
|
+
(b) => coversGraph(b.segmentCount - 2, n) ? [
|
|
268
|
+
...superbubblesFromGraph(
|
|
269
|
+
b.segmentCount === n ? graph : bubbleSubgraph(graph, bubbleSegmentIds(b)),
|
|
270
|
+
b
|
|
271
|
+
),
|
|
272
|
+
{ ...b, covering: true }
|
|
273
|
+
] : [b]
|
|
267
274
|
);
|
|
268
275
|
}
|
|
269
276
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stressLayout
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q6FRNVDU.js";
|
|
4
4
|
import {
|
|
5
5
|
loadBandage
|
|
6
6
|
} from "./chunk-7XHHVYG7.js";
|
|
@@ -14,7 +14,7 @@ var LAYOUT_ENGINES = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
value: "stress",
|
|
17
|
-
label: "Stress
|
|
17
|
+
label: "Stress",
|
|
18
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
19
|
}
|
|
20
20
|
];
|
package/dist/cli/figure.js
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
LAYOUT_ENGINE_VALUES,
|
|
9
9
|
isLayoutEngineKind,
|
|
10
10
|
layoutEngine
|
|
11
|
-
} from "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
11
|
+
} from "../chunks/chunk-VK6XMP6B.js";
|
|
12
|
+
import "../chunks/chunk-Q6FRNVDU.js";
|
|
13
13
|
import "../chunks/chunk-LYJ4US66.js";
|
|
14
14
|
import {
|
|
15
15
|
LAYOUT_MODES,
|
|
@@ -35,7 +35,7 @@ import "../chunks/chunk-LTUWJKHD.js";
|
|
|
35
35
|
import "../chunks/chunk-WSIFAZU7.js";
|
|
36
36
|
import {
|
|
37
37
|
figureSvg
|
|
38
|
-
} from "../chunks/chunk-
|
|
38
|
+
} from "../chunks/chunk-T6EGLY2R.js";
|
|
39
39
|
import "../chunks/chunk-UD5FOCI2.js";
|
|
40
40
|
import "../chunks/chunk-WBCOREDZ.js";
|
|
41
41
|
import "../chunks/chunk-4BYTEJGW.js";
|
|
@@ -54,7 +54,7 @@ import "../chunks/chunk-2LQ5BWT7.js";
|
|
|
54
54
|
import "../chunks/chunk-OXTR3BVF.js";
|
|
55
55
|
import "../chunks/chunk-BR25DGIJ.js";
|
|
56
56
|
import "../chunks/chunk-G2FD7S3C.js";
|
|
57
|
-
import "../chunks/chunk-
|
|
57
|
+
import "../chunks/chunk-DW4ZNIZH.js";
|
|
58
58
|
import "../chunks/chunk-3C5UXR2U.js";
|
|
59
59
|
import {
|
|
60
60
|
filterSamples,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
graphBackbone,
|
|
68
68
|
refNameBinding
|
|
69
69
|
} from "../chunks/chunk-RAKOB6IV.js";
|
|
70
|
-
import "../chunks/chunk-
|
|
70
|
+
import "../chunks/chunk-DRG4236Y.js";
|
|
71
71
|
import "../chunks/chunk-FP4H7SFT.js";
|
|
72
72
|
import "../chunks/chunk-MLSWIMZO.js";
|
|
73
73
|
import "../chunks/chunk-WFB5TXRA.js";
|
package/dist/figure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
figureSvg
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-T6EGLY2R.js";
|
|
4
4
|
import "./chunks/chunk-UD5FOCI2.js";
|
|
5
5
|
import "./chunks/chunk-WBCOREDZ.js";
|
|
6
6
|
import "./chunks/chunk-4BYTEJGW.js";
|
|
@@ -16,13 +16,13 @@ import "./chunks/chunk-2LQ5BWT7.js";
|
|
|
16
16
|
import "./chunks/chunk-OXTR3BVF.js";
|
|
17
17
|
import "./chunks/chunk-BR25DGIJ.js";
|
|
18
18
|
import "./chunks/chunk-G2FD7S3C.js";
|
|
19
|
-
import "./chunks/chunk-
|
|
19
|
+
import "./chunks/chunk-DW4ZNIZH.js";
|
|
20
20
|
import "./chunks/chunk-3C5UXR2U.js";
|
|
21
21
|
import "./chunks/chunk-MAUEPAMG.js";
|
|
22
22
|
import "./chunks/chunk-7GBL7SJY.js";
|
|
23
23
|
import "./chunks/chunk-PBENCR5L.js";
|
|
24
24
|
import "./chunks/chunk-RAKOB6IV.js";
|
|
25
|
-
import "./chunks/chunk-
|
|
25
|
+
import "./chunks/chunk-DRG4236Y.js";
|
|
26
26
|
import "./chunks/chunk-FP4H7SFT.js";
|
|
27
27
|
import "./chunks/chunk-MLSWIMZO.js";
|
|
28
28
|
import "./chunks/chunk-WFB5TXRA.js";
|
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
graphBubbles,
|
|
44
44
|
superbubblesFromGraph
|
|
45
|
-
} from "./chunks/chunk-
|
|
45
|
+
} from "./chunks/chunk-TF7H5LQS.js";
|
|
46
46
|
import {
|
|
47
47
|
bubbleSubgraph
|
|
48
48
|
} from "./chunks/chunk-VHW7FDHU.js";
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
} from "./chunks/chunk-BXEPA4KS.js";
|
|
55
55
|
import {
|
|
56
56
|
bubbleHalos
|
|
57
|
-
} from "./chunks/chunk-
|
|
57
|
+
} from "./chunks/chunk-REM73HCU.js";
|
|
58
58
|
import {
|
|
59
59
|
BUBBLE_KIND_COLORS,
|
|
60
60
|
BUBBLE_KIND_NAMES,
|
|
@@ -74,10 +74,10 @@ import {
|
|
|
74
74
|
import {
|
|
75
75
|
LAYOUT_ENGINES,
|
|
76
76
|
layoutEngine
|
|
77
|
-
} from "./chunks/chunk-
|
|
77
|
+
} from "./chunks/chunk-VK6XMP6B.js";
|
|
78
78
|
import {
|
|
79
79
|
stressLayout
|
|
80
|
-
} from "./chunks/chunk-
|
|
80
|
+
} from "./chunks/chunk-Q6FRNVDU.js";
|
|
81
81
|
import "./chunks/chunk-LYJ4US66.js";
|
|
82
82
|
import {
|
|
83
83
|
FORCE_LAYOUT_LABEL,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
} from "./chunks/chunk-AZFVORTC.js";
|
|
120
120
|
import {
|
|
121
121
|
figureSvg
|
|
122
|
-
} from "./chunks/chunk-
|
|
122
|
+
} from "./chunks/chunk-T6EGLY2R.js";
|
|
123
123
|
import {
|
|
124
124
|
WALK_STRIP_CEILING_PX,
|
|
125
125
|
cutsWholeWalks,
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
import "./chunks/chunk-G2FD7S3C.js";
|
|
220
220
|
import {
|
|
221
221
|
version
|
|
222
|
-
} from "./chunks/chunk-
|
|
222
|
+
} from "./chunks/chunk-DW4ZNIZH.js";
|
|
223
223
|
import {
|
|
224
224
|
walkRowLabels,
|
|
225
225
|
walkRowsExtent
|
|
@@ -255,7 +255,7 @@ import {
|
|
|
255
255
|
LEGEND_INSET_PX,
|
|
256
256
|
geneCoverageNote,
|
|
257
257
|
layoutLabels
|
|
258
|
-
} from "./chunks/chunk-
|
|
258
|
+
} from "./chunks/chunk-DRG4236Y.js";
|
|
259
259
|
import {
|
|
260
260
|
findHoveredEdge,
|
|
261
261
|
findHoveredNode
|
package/dist/labelLayout.js
CHANGED
package/dist/layoutEngines.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
LAYOUT_ENGINE_VALUES,
|
|
4
4
|
isLayoutEngineKind,
|
|
5
5
|
layoutEngine
|
|
6
|
-
} from "./chunks/chunk-
|
|
7
|
-
import "./chunks/chunk-
|
|
6
|
+
} from "./chunks/chunk-VK6XMP6B.js";
|
|
7
|
+
import "./chunks/chunk-Q6FRNVDU.js";
|
|
8
8
|
import "./chunks/chunk-LYJ4US66.js";
|
|
9
9
|
import "./chunks/chunk-7XHHVYG7.js";
|
|
10
10
|
import "./chunks/chunk-JVLURPFW.js";
|
|
@@ -5,7 +5,7 @@ export declare const LAYOUT_ENGINES: readonly [{
|
|
|
5
5
|
readonly description: "Bandage's force-directed layout: OGDF's fast multipole multilevel method, compiled to wasm.";
|
|
6
6
|
}, {
|
|
7
7
|
readonly value: "stress";
|
|
8
|
-
readonly label: "Stress
|
|
8
|
+
readonly label: "Stress";
|
|
9
9
|
readonly 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.";
|
|
10
10
|
}];
|
|
11
11
|
export type LayoutEngineKind = (typeof LAYOUT_ENGINES)[number]['value'];
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "9.
|
|
1
|
+
export declare const version = "9.5.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/bandage-core",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"description": "Pangenome graph layout and drawing with no host: GFA in, the Bandage force-directed engine and reference-anchored layouts, a Canvas2D renderer, hit testing and labels out",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|