@jbrowse/bandage-core 10.0.1 → 10.2.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/README.md +3 -0
- package/dist/bubbles/popBubble.js +2 -2
- package/dist/bubbles/superbubbles.js +3 -3
- package/dist/chunks/{chunk-IFOZFVZK.js → chunk-4R6QNG23.js} +2 -2
- package/dist/chunks/{chunk-KJYSOHVN.js → chunk-5BGP5Z64.js} +1 -1
- package/dist/chunks/{chunk-B4645SM2.js → chunk-AFP3NWSL.js} +45 -16
- package/dist/chunks/{chunk-VOWI544A.js → chunk-ALDGONEI.js} +1 -1
- package/dist/chunks/{chunk-3XE3OUEN.js → chunk-C7MZJSPT.js} +1 -1
- package/dist/chunks/{chunk-AZJF2PZE.js → chunk-CPVZGVDL.js} +8 -8
- package/dist/chunks/{chunk-CFNFT4RA.js → chunk-CRTD2SBP.js} +1 -1
- package/dist/chunks/{chunk-IM4SJUPO.js → chunk-DK5P2YOL.js} +2 -2
- package/dist/chunks/{chunk-FLUQODT2.js → chunk-DT2GGH4D.js} +1 -1
- package/dist/chunks/{chunk-FFFYXMOP.js → chunk-EDR4CGCQ.js} +10 -10
- package/dist/chunks/{chunk-BEWLQADP.js → chunk-FNGIQF43.js} +1 -1
- package/dist/chunks/{chunk-OEPCRURR.js → chunk-GNTTI6LA.js} +1 -1
- package/dist/chunks/{chunk-HQ2AHRMH.js → chunk-IUDJKOLB.js} +1 -1
- package/dist/chunks/{chunk-QXAB2FLJ.js → chunk-IW6CYVX2.js} +1 -1
- package/dist/chunks/{chunk-QORSYW7J.js → chunk-L5WF4ZPS.js} +1 -1
- package/dist/chunks/{chunk-KY4LV2Z6.js → chunk-M3NPTHSE.js} +1 -1
- package/dist/chunks/{chunk-EMUUNWRU.js → chunk-M6LK4GII.js} +7 -1
- package/dist/chunks/{chunk-ZR7A7DKQ.js → chunk-MVFDSFV2.js} +1 -1
- package/dist/chunks/{chunk-FG762CCP.js → chunk-PKFMP65V.js} +2 -2
- package/dist/chunks/{chunk-QIVPRZ4H.js → chunk-R456ME6J.js} +2 -2
- package/dist/chunks/{chunk-A647OH7N.js → chunk-RIPAA7OK.js} +1 -1
- package/dist/chunks/{chunk-WI7ZHJ27.js → chunk-RPDXZLCG.js} +2 -2
- package/dist/chunks/{chunk-NP356MC2.js → chunk-SBMJNRTV.js} +1 -1
- package/dist/chunks/{chunk-4QTNXTGW.js → chunk-T6V4KI2L.js} +1 -1
- package/dist/chunks/{chunk-REE4GUDM.js → chunk-TWRLC3KK.js} +1 -1
- package/dist/chunks/{chunk-MSX3BDO4.js → chunk-XTCNEKO5.js} +2 -2
- package/dist/chunks/{chunk-VZNKA3K2.js → chunk-XYP6WL2N.js} +7 -3
- package/dist/chunks/{chunk-DCJC32QW.js → chunk-ZIUKZUPJ.js} +1 -1
- package/dist/cli/figure.js +18 -18
- package/dist/cli/fold.js +4 -4
- package/dist/figure.js +15 -15
- package/dist/figureData.js +15 -15
- package/dist/figureSettings.js +4 -4
- package/dist/foldVariants.js +1 -1
- package/dist/gfa/gfaConverter.js +2 -2
- package/dist/index.js +27 -27
- package/dist/layout/forceCache.js +4 -4
- package/dist/layout/trimToWindow.js +1 -1
- package/dist/layout/tubeMapLayout.js +3 -3
- package/dist/layout/walkRowDraw.js +5 -5
- package/dist/layout/walkRowLayout.js +3 -3
- package/dist/layout/walkRows.js +2 -2
- package/dist/layout/walkStrip.js +6 -6
- package/dist/layoutEngines.js +1 -1
- package/dist/layoutModes.js +6 -6
- package/dist/pathAnchoring.js +1 -1
- package/dist/pathColors.js +2 -2
- package/dist/pipeline.js +3 -3
- package/dist/referenceRampCss.js +4 -4
- package/dist/referenceStrip.js +4 -4
- package/dist/renderer/GeometryBuilder.js +3 -3
- package/dist/tubeMap/bundle.js +4 -4
- package/dist/tubeMap/coarsen.js +3 -3
- package/dist/tubeMap/draw.js +2 -2
- package/dist/tubeMap/nodeColors.js +4 -4
- package/dist/types/layoutEngines.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/viewport.js +4 -4
- package/dist/walkEncoding.js +4 -4
- package/dist/walkHighlight.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,9 @@ npm install @jbrowse/bandage-core
|
|
|
25
25
|
and the `bandage-figure` CLI makes one from a JSON spec with no browser:
|
|
26
26
|
`npx -p @jbrowse/bandage-core bandage-figure spec.json -o figure.svg`. See
|
|
27
27
|
[docs/figures.md](docs/figures.md)
|
|
28
|
+
- Coarse tier: the `bandage-fold` CLI folds every variant under a size into the
|
|
29
|
+
reference, so a graph track draws a whole chromosome. See
|
|
30
|
+
[docs/coarse-tier.md](docs/coarse-tier.md)
|
|
28
31
|
- Figure data: `figureData` returns what `figureSvg` would paint as columnar
|
|
29
32
|
tables, for another graphics system to draw;
|
|
30
33
|
[ggbandage](https://github.com/GMOD/ggbandage) draws them in ggplot2
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubbleSubgraph
|
|
3
|
-
} from "../chunks/chunk-
|
|
4
|
-
import "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-T6V4KI2L.js";
|
|
4
|
+
import "../chunks/chunk-M6LK4GII.js";
|
|
5
5
|
import "../chunks/chunk-RAEABQNW.js";
|
|
6
6
|
import "../chunks/chunk-BPLIXMH7.js";
|
|
7
7
|
import "../chunks/chunk-FYQWPEEY.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphBubbles,
|
|
3
3
|
superbubblesFromGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-FNGIQF43.js";
|
|
5
5
|
import "../chunks/chunk-CLOP7UVD.js";
|
|
6
|
-
import "../chunks/chunk-
|
|
6
|
+
import "../chunks/chunk-T6V4KI2L.js";
|
|
7
7
|
import "../chunks/chunk-EHUBJDDB.js";
|
|
8
8
|
import "../chunks/chunk-XKWD2RY3.js";
|
|
9
9
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
10
10
|
import "../chunks/chunk-HNQPEMYE.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
11
|
+
import "../chunks/chunk-M6LK4GII.js";
|
|
12
12
|
import "../chunks/chunk-RAEABQNW.js";
|
|
13
13
|
import "../chunks/chunk-BPLIXMH7.js";
|
|
14
14
|
import "../chunks/chunk-2CVHXFK7.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
hasTubeMapPaths,
|
|
7
7
|
tubeMapLayout,
|
|
8
8
|
tubeMapReferenceLayout
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DK5P2YOL.js";
|
|
10
10
|
import {
|
|
11
11
|
anchoredLayout
|
|
12
12
|
} from "./chunk-L3O7AWLI.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-HNQPEMYE.js";
|
|
16
16
|
import {
|
|
17
17
|
walkRowLayout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-C7MZJSPT.js";
|
|
19
19
|
import {
|
|
20
20
|
isBackbone,
|
|
21
21
|
isOffReference
|
|
@@ -10,7 +10,7 @@ function foldVariants(graph, belowBp) {
|
|
|
10
10
|
if (!(belowBp > 0) || graph.paths?.length || !graph.nodes.some((node) => isBackbone(node))) {
|
|
11
11
|
return graph;
|
|
12
12
|
}
|
|
13
|
-
const { nodes, edges } = graph;
|
|
13
|
+
const { nodes, edges } = readForward(graph);
|
|
14
14
|
const index = new Map(nodes.map((node, i) => [node.id, i]));
|
|
15
15
|
const sides = edges.map(forwardSides);
|
|
16
16
|
const links = linksAt(nodes.length, edges, sides, index);
|
|
@@ -47,7 +47,34 @@ function foldVariants(graph, belowBp) {
|
|
|
47
47
|
const skip = skipped(nodes[a], sides[k].from, nodes[b], sides[k].to);
|
|
48
48
|
return kept[a] && kept[b] && !(skip > 0 && skip < belowBp);
|
|
49
49
|
});
|
|
50
|
-
return mergeAlleleRuns({ ...graph, edges: keptEdges }, kept, allele);
|
|
50
|
+
return mergeAlleleRuns({ ...graph, nodes, edges: keptEdges }, kept, allele);
|
|
51
|
+
}
|
|
52
|
+
function readForward({ nodes, edges }) {
|
|
53
|
+
const reversed = new Set(
|
|
54
|
+
nodes.filter((node) => node.stable?.strand === "-").map((node) => node.id)
|
|
55
|
+
);
|
|
56
|
+
if (reversed.size === 0) {
|
|
57
|
+
return { nodes, edges };
|
|
58
|
+
}
|
|
59
|
+
const read = (id, strand) => {
|
|
60
|
+
const own = strand ?? ownStrand(id);
|
|
61
|
+
return reversed.has(id) ? complement(own) : own;
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
nodes: nodes.map(
|
|
65
|
+
(node) => reversed.has(node.id) ? { ...node, stable: { ...node.stable, strand: "+" } } : node
|
|
66
|
+
),
|
|
67
|
+
edges: edges.map(
|
|
68
|
+
(edge) => reversed.has(edge.from) || reversed.has(edge.to) ? {
|
|
69
|
+
...edge,
|
|
70
|
+
fromStrand: read(edge.from, edge.fromStrand),
|
|
71
|
+
toStrand: read(edge.to, edge.toStrand)
|
|
72
|
+
} : edge
|
|
73
|
+
)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function complement(strand) {
|
|
77
|
+
return strand === "+" ? "-" : "+";
|
|
51
78
|
}
|
|
52
79
|
function forwardSides(edge) {
|
|
53
80
|
return {
|
|
@@ -61,8 +88,9 @@ function linksAt(count, edges, sides, index) {
|
|
|
61
88
|
const a = index.get(edge.from);
|
|
62
89
|
const b = index.get(edge.to);
|
|
63
90
|
if (a !== void 0 && b !== void 0) {
|
|
64
|
-
|
|
65
|
-
links[
|
|
91
|
+
const { from, to } = sides[k];
|
|
92
|
+
links[a].push({ other: b, side: from, otherSide: to });
|
|
93
|
+
links[b].push({ other: a, side: to, otherSide: from });
|
|
66
94
|
}
|
|
67
95
|
});
|
|
68
96
|
return links;
|
|
@@ -74,11 +102,11 @@ function onOneSequence(a, b) {
|
|
|
74
102
|
}
|
|
75
103
|
function continues(a, aSide, b, bSide) {
|
|
76
104
|
const pair = onOneSequence(a, b);
|
|
77
|
-
if (!pair
|
|
105
|
+
if (!pair) {
|
|
78
106
|
return false;
|
|
79
107
|
}
|
|
80
108
|
const [sa, sb] = pair;
|
|
81
|
-
return sa.start + a.length === sb.start || sb.start + b.length === sa.start;
|
|
109
|
+
return aSide === "e" && bSide === "s" && sa.start + a.length === sb.start || bSide === "e" && aSide === "s" && sb.start + b.length === sa.start;
|
|
82
110
|
}
|
|
83
111
|
function skipped(a, aSide, b, bSide) {
|
|
84
112
|
const pair = onOneSequence(a, b);
|
|
@@ -86,10 +114,10 @@ function skipped(a, aSide, b, bSide) {
|
|
|
86
114
|
return 0;
|
|
87
115
|
}
|
|
88
116
|
const [sa, sb] = pair;
|
|
89
|
-
return Math.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
117
|
+
return Math.abs(position(sb, b, bSide) - position(sa, a, aSide));
|
|
118
|
+
}
|
|
119
|
+
function position({ start }, node, side) {
|
|
120
|
+
return side === "s" ? start : start + node.length;
|
|
93
121
|
}
|
|
94
122
|
function alleleOf(nodes, edges, sides, index) {
|
|
95
123
|
const parent = nodes.map((_, i) => i);
|
|
@@ -132,13 +160,14 @@ function alleleContent(group, nodes, links, allele) {
|
|
|
132
160
|
let oneSequence = true;
|
|
133
161
|
for (const i of group) {
|
|
134
162
|
length += nodes[i].length;
|
|
135
|
-
for (const { other } of links[i]) {
|
|
163
|
+
for (const { other, otherSide } of links[i]) {
|
|
136
164
|
const node = nodes[other];
|
|
137
165
|
if (allele[other] !== allele[i] && isBackbone(node)) {
|
|
138
166
|
refName ??= node.stable.refName;
|
|
139
167
|
oneSequence &&= node.stable.refName === refName;
|
|
140
|
-
|
|
141
|
-
|
|
168
|
+
const at = position(node.stable, node, otherSide);
|
|
169
|
+
lo = Math.min(lo, at);
|
|
170
|
+
hi = Math.max(hi, at);
|
|
142
171
|
}
|
|
143
172
|
}
|
|
144
173
|
}
|
|
@@ -173,7 +202,7 @@ function nearestOutside(i, side, links, allele, dist, nodes) {
|
|
|
173
202
|
let best;
|
|
174
203
|
for (const link of links[i]) {
|
|
175
204
|
const j = link.other;
|
|
176
|
-
if (link.side === side && allele[j] !== allele[i] && Number.isFinite(dist[j]) && (best === void 0 || dist[j] < dist[best] || dist[j] === dist[best] && nodes[j].
|
|
205
|
+
if (link.side === side && allele[j] !== allele[i] && Number.isFinite(dist[j]) && (best === void 0 || dist[j] < dist[best] || dist[j] === dist[best] && nodes[j].name < nodes[best].name)) {
|
|
177
206
|
best = j;
|
|
178
207
|
}
|
|
179
208
|
}
|
|
@@ -183,7 +212,7 @@ function distancesFromBackbone(nodes, links) {
|
|
|
183
212
|
const dist = new Float64Array(nodes.length).fill(Infinity);
|
|
184
213
|
const pred = new Int32Array(nodes.length).fill(-1);
|
|
185
214
|
const heap = new MinHeap(
|
|
186
|
-
([da, a], [db, b]) => da - db || cmp(nodes[a].
|
|
215
|
+
([da, a], [db, b]) => da - db || cmp(nodes[a].name, nodes[b].name)
|
|
187
216
|
);
|
|
188
217
|
nodes.forEach((node, i) => {
|
|
189
218
|
if (isBackbone(node)) {
|
|
@@ -205,7 +234,7 @@ function distancesFromBackbone(nodes, links) {
|
|
|
205
234
|
dist[other] = d;
|
|
206
235
|
pred[other] = i;
|
|
207
236
|
heap.push([d, other]);
|
|
208
|
-
} else if (d === dist[other] && cmp(nodes[i].
|
|
237
|
+
} else if (d === dist[other] && cmp(nodes[i].name, nodes[pred[other]].name) < 0) {
|
|
209
238
|
pred[other] = i;
|
|
210
239
|
}
|
|
211
240
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layoutEngine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DT2GGH4D.js";
|
|
4
4
|
import {
|
|
5
5
|
layoutModeByValue
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4R6QNG23.js";
|
|
7
7
|
import {
|
|
8
8
|
parseRegion
|
|
9
9
|
} from "./chunk-FLFBYSJO.js";
|
|
@@ -12,21 +12,21 @@ import {
|
|
|
12
12
|
} from "./chunk-LOCJN3BZ.js";
|
|
13
13
|
import {
|
|
14
14
|
version
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-M3NPTHSE.js";
|
|
16
16
|
import {
|
|
17
17
|
axisScaleOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L5WF4ZPS.js";
|
|
19
19
|
import {
|
|
20
20
|
facetLifts,
|
|
21
21
|
walkLift
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-R456ME6J.js";
|
|
23
23
|
import {
|
|
24
24
|
walkKey
|
|
25
25
|
} from "./chunk-2LQ5BWT7.js";
|
|
26
26
|
import {
|
|
27
27
|
buildGeometry,
|
|
28
28
|
computeReferenceRamp
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SBMJNRTV.js";
|
|
30
30
|
import {
|
|
31
31
|
abgrAlpha,
|
|
32
32
|
abgrBlue,
|
|
@@ -36,14 +36,14 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
pathLegend,
|
|
38
38
|
walkLabelsOf
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TWRLC3KK.js";
|
|
40
40
|
import {
|
|
41
41
|
drawingBounds,
|
|
42
42
|
engineSettingsOf,
|
|
43
43
|
fitTransform,
|
|
44
44
|
forceLayout,
|
|
45
45
|
loadGraph
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-XTCNEKO5.js";
|
|
47
47
|
import {
|
|
48
48
|
referenceLabel
|
|
49
49
|
} from "./chunk-RAKOB6IV.js";
|
|
@@ -13,7 +13,7 @@ var LAYOUT_ENGINES = [
|
|
|
13
13
|
{
|
|
14
14
|
value: "stress",
|
|
15
15
|
label: "Stress",
|
|
16
|
-
description: "
|
|
16
|
+
description: "Plain JS: the reference drawn straight and each variant placed against it, an allele as a lens, a repeat loop as a ring, a deletion as an arch; stress by stochastic gradient descent for components with no reference."
|
|
17
17
|
}
|
|
18
18
|
];
|
|
19
19
|
var LAYOUT_ENGINE_VALUES = LAYOUT_ENGINES.map((e) => e.value);
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
stripGeneGaps,
|
|
6
6
|
walkStripFrame,
|
|
7
7
|
walkStripLabelsTree
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RPDXZLCG.js";
|
|
9
9
|
import {
|
|
10
10
|
Canvas2DRenderer
|
|
11
11
|
} from "./chunk-WBCOREDZ.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
walkRowsKey,
|
|
14
14
|
walkRowsKeyTree,
|
|
15
15
|
walkRowsTree
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XYP6WL2N.js";
|
|
17
17
|
import {
|
|
18
18
|
EXON_COLOR,
|
|
19
19
|
exonOutlineTree,
|
|
@@ -36,17 +36,17 @@ import {
|
|
|
36
36
|
} from "./chunk-LOCJN3BZ.js";
|
|
37
37
|
import {
|
|
38
38
|
version
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-M3NPTHSE.js";
|
|
40
40
|
import {
|
|
41
41
|
axisScaleOf
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-L5WF4ZPS.js";
|
|
43
43
|
import {
|
|
44
44
|
facetLifts,
|
|
45
45
|
walkLift
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-R456ME6J.js";
|
|
47
47
|
import {
|
|
48
48
|
encodingStops
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-ALDGONEI.js";
|
|
50
50
|
import {
|
|
51
51
|
rangeText,
|
|
52
52
|
walkKey
|
|
@@ -54,15 +54,15 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
buildGeometry,
|
|
56
56
|
computeReferenceRamp
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-SBMJNRTV.js";
|
|
58
58
|
import {
|
|
59
59
|
walkRowLabels,
|
|
60
60
|
walkRowsExtent
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-C7MZJSPT.js";
|
|
62
62
|
import {
|
|
63
63
|
pathLegend,
|
|
64
64
|
walkLabelsOf
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-TWRLC3KK.js";
|
|
66
66
|
import {
|
|
67
67
|
nodeInk
|
|
68
68
|
} from "./chunk-PBENCR5L.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
FIT_PADDING,
|
|
71
71
|
drawingBounds,
|
|
72
72
|
fitTransform
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-XTCNEKO5.js";
|
|
74
74
|
import {
|
|
75
75
|
referenceLabel
|
|
76
76
|
} from "./chunk-RAKOB6IV.js";
|
|
@@ -10,8 +10,14 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/pathAnchoring.ts
|
|
12
12
|
var RANGE_SUFFIX = /:(\d+)-\d+$/;
|
|
13
|
+
var VG_FRAGMENT = /^([^#]*#[^#]*#[^#[]*)#(\d+)(?:\[(\d+)-\d+\])?$/;
|
|
14
|
+
var VG_SUBRANGE = /\[(\d+)-\d+\]$/;
|
|
13
15
|
function pathOrigin(pathName) {
|
|
14
|
-
const
|
|
16
|
+
const fragment = VG_FRAGMENT.exec(pathName);
|
|
17
|
+
if (fragment) {
|
|
18
|
+
return { name: fragment[1], start: +fragment[2] + +(fragment[3] ?? 0) };
|
|
19
|
+
}
|
|
20
|
+
const match = RANGE_SUFFIX.exec(pathName) ?? VG_SUBRANGE.exec(pathName);
|
|
15
21
|
return match ? { name: pathName.slice(0, match.index), start: +match[1] } : { name: pathName, start: 0 };
|
|
16
22
|
}
|
|
17
23
|
function surveyPaths(paths, lengthOf) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pathSteps
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DK5P2YOL.js";
|
|
4
4
|
import {
|
|
5
5
|
pathOrigin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M6LK4GII.js";
|
|
7
7
|
|
|
8
8
|
// src/tubeMap/bundle.ts
|
|
9
9
|
function bundleRoutes(graph, groupOf = () => "", merge = true) {
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
alongRow,
|
|
3
3
|
boxesGenes,
|
|
4
4
|
rowPitch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XYP6WL2N.js";
|
|
6
6
|
import {
|
|
7
7
|
el
|
|
8
8
|
} from "./chunk-NNODIW4U.js";
|
|
9
9
|
import {
|
|
10
10
|
pathOrigin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-M6LK4GII.js";
|
|
12
12
|
import {
|
|
13
13
|
LABEL_CHAR_PX
|
|
14
14
|
} from "./chunk-AB35TJST.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-PUG7LXDF.js";
|
|
15
15
|
import {
|
|
16
16
|
convertGFAToGraph
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IW6CYVX2.js";
|
|
18
18
|
import {
|
|
19
19
|
graphFromTables
|
|
20
20
|
} from "./chunk-PSMKPSO4.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-CDLPYR5O.js";
|
|
24
24
|
import {
|
|
25
25
|
anchorGraph
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-M6LK4GII.js";
|
|
27
27
|
import {
|
|
28
28
|
gfaTables
|
|
29
29
|
} from "./chunk-G45YY72K.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
RAMP_GRADIENT_STOPS,
|
|
4
4
|
rampHueCss,
|
|
5
5
|
rampStops
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZIUKZUPJ.js";
|
|
7
7
|
import {
|
|
8
8
|
el
|
|
9
9
|
} from "./chunk-NNODIW4U.js";
|
|
10
10
|
import {
|
|
11
11
|
REFERENCE_RAMP_ALT_CSS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SBMJNRTV.js";
|
|
13
13
|
import {
|
|
14
14
|
LABEL_CHAR_PX
|
|
15
15
|
} from "./chunk-AB35TJST.js";
|
|
@@ -30,6 +30,10 @@ var MIN_TILE_PX = 3;
|
|
|
30
30
|
function kb(bp) {
|
|
31
31
|
return `${(bp / 1e3).toFixed(bp < 1e4 ? 1 : 0)} kb`;
|
|
32
32
|
}
|
|
33
|
+
function signedLength(delta) {
|
|
34
|
+
const size = Math.abs(delta);
|
|
35
|
+
return `${delta > 0 ? "+" : "\u2212"}${size < 1e3 ? `${size} bp` : kb(size)}`;
|
|
36
|
+
}
|
|
33
37
|
function units(bp, unit) {
|
|
34
38
|
return unit ? ` \u2248 ${Math.round(bp / unit)} units` : "";
|
|
35
39
|
}
|
|
@@ -42,7 +46,7 @@ function walkRowReadout(row, reference, unit, call) {
|
|
|
42
46
|
const called = call ? ` \xB7 called ${kb(call.bp)}${call.spanningReads === 0 ? " \xB7 no spanning read" : ""}` : "";
|
|
43
47
|
if (complete) {
|
|
44
48
|
const delta = bp - reference.bp;
|
|
45
|
-
const against = delta === 0 ? "" : ` (${
|
|
49
|
+
const against = delta === 0 ? "" : ` (${signedLength(delta)})`;
|
|
46
50
|
return `${kb(bp)}${units(bp, unit)}${against}${outside}${called}`;
|
|
47
51
|
}
|
|
48
52
|
const region = unit ? "repeat" : "window";
|