@jbrowse/bandage-core 12.5.0 → 12.6.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 +6 -6
- package/dist/bubbles/classifyBubble.js +5 -5
- package/dist/bubbles/popBubble.js +2 -2
- package/dist/bubbles/superbubbles.js +8 -8
- package/dist/chunks/{chunk-RV6YKJA3.js → chunk-3LAOZB2I.js} +1 -1
- package/dist/chunks/{chunk-72HYCU7V.js → chunk-3UYMOEKF.js} +2 -2
- package/dist/chunks/{chunk-JQVS4DRW.js → chunk-4J4IKYSL.js} +1 -1
- package/dist/chunks/{chunk-LQNQFFPY.js → chunk-4MS7JFRY.js} +2 -2
- package/dist/chunks/{chunk-EBWNXGPB.js → chunk-54DLYBBU.js} +1 -1
- package/dist/chunks/{chunk-JJB3ONOY.js → chunk-5QAQV7DT.js} +4 -4
- package/dist/chunks/{chunk-CAIHNF5F.js → chunk-5XXUBTSN.js} +8 -7
- package/dist/chunks/{chunk-GD2S77KV.js → chunk-A2WLX7OL.js} +22 -22
- package/dist/chunks/{chunk-T6EWT5ET.js → chunk-BMU7JPHI.js} +3 -3
- package/dist/chunks/{chunk-ZXGGKW3X.js → chunk-D4OVB6ZL.js} +1 -1
- package/dist/chunks/{chunk-VA5U4F23.js → chunk-D7ZTAGDM.js} +3 -2
- package/dist/chunks/{chunk-H5N3HE53.js → chunk-DMP3DQZT.js} +1 -1
- package/dist/chunks/{chunk-OPTHW6IZ.js → chunk-EAKP6VH6.js} +1 -1
- package/dist/chunks/{chunk-U6ILKBCW.js → chunk-EEDZY4E5.js} +1 -1
- package/dist/chunks/{chunk-YR3HOBN2.js → chunk-ESTKW37X.js} +2 -2
- package/dist/chunks/{chunk-O6T5LV3G.js → chunk-FCCKHTQP.js} +1 -1
- package/dist/chunks/{chunk-GJRKQW4J.js → chunk-GPDGIDXD.js} +11 -11
- package/dist/chunks/{chunk-WUTD47OG.js → chunk-H5NMBQZG.js} +1 -1
- package/dist/chunks/{chunk-FTVESWXT.js → chunk-IDPBN2BP.js} +1 -1
- package/dist/chunks/{chunk-XDTIBSTI.js → chunk-K2Y5BWHF.js} +2 -2
- package/dist/chunks/{chunk-H4UHV22B.js → chunk-L2FHURWV.js} +1 -1
- package/dist/chunks/{chunk-IXRW2FCR.js → chunk-LDHBYZAB.js} +1 -1
- package/dist/chunks/{chunk-ZAKP7T6S.js → chunk-LWLO2B37.js} +1 -1
- package/dist/chunks/{chunk-ZTH7T5QK.js → chunk-NKFCSUIK.js} +18 -18
- package/dist/chunks/{chunk-V35LJPJL.js → chunk-NY7O6UBH.js} +1 -1
- package/dist/chunks/{chunk-YI7CEK4W.js → chunk-O6SLIY74.js} +3 -3
- package/dist/chunks/{chunk-Y627OFHP.js → chunk-OUYHOHHF.js} +5 -2
- package/dist/chunks/{chunk-UGECUIDN.js → chunk-PAPUFUJZ.js} +3 -3
- package/dist/chunks/{chunk-BPIKXPB4.js → chunk-PQYOXT6V.js} +2 -2
- package/dist/chunks/{chunk-PLX2PMGF.js → chunk-Q4B4O2M4.js} +2 -2
- package/dist/chunks/{chunk-BRH73RCH.js → chunk-QBI6SC74.js} +19 -9
- package/dist/chunks/{chunk-MQQ7E5SC.js → chunk-QDFMEGBN.js} +1 -1
- package/dist/chunks/{chunk-BGEAXWE7.js → chunk-QPKSULKV.js} +1 -1
- package/dist/chunks/{chunk-4NUW2F2Y.js → chunk-RQHIDUZR.js} +1 -1
- package/dist/chunks/{chunk-URPU4XCM.js → chunk-RV5RJZKO.js} +1 -1
- package/dist/chunks/{chunk-MJ7ADOYX.js → chunk-RYDRC3Y5.js} +1 -1
- package/dist/chunks/{chunk-7VAZ7IHH.js → chunk-SAREXDML.js} +1 -1
- package/dist/chunks/{chunk-ZULVAGVE.js → chunk-TAHZ6TZ6.js} +2 -2
- package/dist/chunks/{chunk-5SV6RXFJ.js → chunk-TFP7SWF3.js} +11 -11
- package/dist/chunks/{chunk-PW3S7H5C.js → chunk-ULFBFEPG.js} +2 -2
- package/dist/chunks/{chunk-BPCN2ABL.js → chunk-WLOSINY4.js} +1 -1
- package/dist/chunks/{chunk-PQWVJUL7.js → chunk-WMP72ZWV.js} +1 -1
- package/dist/chunks/{chunk-VPE4AYP7.js → chunk-XABWOV3C.js} +10 -9
- package/dist/chunks/{chunk-ALGYCMMH.js → chunk-XDG2VSEC.js} +66 -45
- package/dist/chunks/{chunk-BQ65B7Y7.js → chunk-XDO7E7P3.js} +3 -3
- package/dist/chunks/{chunk-XF2NS52W.js → chunk-Y4ZWAC23.js} +7 -7
- package/dist/cli/figure.js +40 -40
- package/dist/cli/fold.js +9 -9
- package/dist/deletionEdges.js +9 -7
- package/dist/figure.js +29 -29
- package/dist/figureData.js +30 -28
- package/dist/figureScene.js +23 -21
- package/dist/figureSettings.js +10 -10
- package/dist/gbzCut.js +4 -4
- package/dist/gbzWindow.js +3 -3
- package/dist/gfa/gfaConverter.js +3 -3
- package/dist/gfa/gfaTables.js +2 -2
- package/dist/gfa/graphTables.js +2 -2
- package/dist/gfa/walkStops.js +1 -1
- package/dist/graphLabels.js +4 -4
- package/dist/index.js +85 -85
- package/dist/labelLayout.js +8 -8
- package/dist/layout/deletionRoutes.js +1 -1
- package/dist/layout/forceCache.js +10 -10
- package/dist/layout/trimToWindow.js +2 -2
- package/dist/layout/tubeMapLayout.js +10 -10
- package/dist/layout/walkRowDraw.js +9 -9
- package/dist/layout/walkRowLayout.js +24 -6
- package/dist/layout/walkRowRuns.js +4 -4
- package/dist/layout/walkRows.js +5 -5
- package/dist/layout/walkStrip.js +14 -14
- package/dist/layoutModes.js +21 -12
- package/dist/pathAnchoring.js +3 -1
- package/dist/pathColors.js +5 -5
- package/dist/pipeline.js +9 -9
- package/dist/referenceStrip.js +8 -8
- package/dist/renderer/GeometryBuilder.js +7 -7
- package/dist/tubeMap/axis.js +5 -5
- package/dist/tubeMap/bundle.js +11 -11
- package/dist/tubeMap/coarsen.js +11 -11
- package/dist/tubeMap/deviations.js +12 -12
- package/dist/tubeMap/draw.js +6 -6
- package/dist/tubeMap/genes.js +6 -6
- package/dist/tubeMap/nodeColors.js +8 -8
- package/dist/types/deletionEdges.d.ts +2 -1
- package/dist/types/layout/deletionRoutes.d.ts +1 -1
- package/dist/types/pathAnchoring.d.ts +5 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/util/SpatialIndex.js +5 -5
- package/dist/util/edgeCurves.js +4 -4
- package/dist/util/hitDetection.js +6 -6
- package/dist/version.js +1 -1
- package/dist/viewport.js +10 -10
- package/dist/walkEncoding.js +8 -8
- package/dist/walkHighlight.js +10 -10
- package/dist/walkKey.js +6 -6
- package/package.json +1 -1
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-KKHXMJEE.js";
|
|
5
5
|
import {
|
|
6
6
|
referenceWalkName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-O6SLIY74.js";
|
|
8
8
|
import {
|
|
9
9
|
pathCssColor,
|
|
10
10
|
pathGreyCssColor
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TAHZ6TZ6.js";
|
|
12
12
|
import {
|
|
13
13
|
pathOrigin
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QBI6SC74.js";
|
|
15
15
|
import {
|
|
16
16
|
ownStrand,
|
|
17
17
|
strandSides
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-CFXXFHRK.js";
|
|
4
4
|
import {
|
|
5
5
|
walkStopFields
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D7ZTAGDM.js";
|
|
7
7
|
import {
|
|
8
8
|
pathOrigin,
|
|
9
9
|
surveyPaths
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QBI6SC74.js";
|
|
11
11
|
|
|
12
12
|
// src/gfa/gfaConverter.ts
|
|
13
13
|
function surveySegments(gfaGraph, pathSteps) {
|
|
@@ -155,30 +155,39 @@ function trimOrigins(graph, kept) {
|
|
|
155
155
|
} : o;
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function referenceVisits(graph) {
|
|
159
159
|
const { pathVisits } = graph;
|
|
160
160
|
const cache = /* @__PURE__ */ new Map();
|
|
161
161
|
return (node) => {
|
|
162
|
-
let
|
|
163
|
-
if (!
|
|
164
|
-
|
|
162
|
+
let visits = cache.get(node.id);
|
|
163
|
+
if (!visits) {
|
|
164
|
+
visits = [];
|
|
165
165
|
const slot = pathVisits ? pathVisits.slot(node.name) : -1;
|
|
166
166
|
const p = slot >= 0 ? pathVisits.pathIndex(node.stable.refName) : -1;
|
|
167
167
|
if (p >= 0) {
|
|
168
168
|
for (let i = pathVisits.offsets[slot]; i < pathVisits.offsets[slot + 1]; i++) {
|
|
169
169
|
if (pathVisits.path[i] === p) {
|
|
170
|
-
|
|
170
|
+
visits.push({
|
|
171
|
+
start: pathVisits.start[i],
|
|
172
|
+
strand: pathVisits.strand(i)
|
|
173
|
+
});
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
|
-
if (
|
|
175
|
-
|
|
177
|
+
if (visits.length < 2) {
|
|
178
|
+
visits = [
|
|
179
|
+
{ start: node.stable.start, strand: node.stable.strand ?? "+" }
|
|
180
|
+
];
|
|
176
181
|
}
|
|
177
|
-
cache.set(node.id,
|
|
182
|
+
cache.set(node.id, visits);
|
|
178
183
|
}
|
|
179
|
-
return
|
|
184
|
+
return visits;
|
|
180
185
|
};
|
|
181
186
|
}
|
|
187
|
+
function referenceVisitStarts(graph) {
|
|
188
|
+
const visitsOf = referenceVisits(graph);
|
|
189
|
+
return (node) => visitsOf(node).map((v) => v.start);
|
|
190
|
+
}
|
|
182
191
|
|
|
183
192
|
export {
|
|
184
193
|
pathOrigin,
|
|
@@ -187,5 +196,6 @@ export {
|
|
|
187
196
|
anchorFromPaths,
|
|
188
197
|
anchorGraph,
|
|
189
198
|
trimOrigins,
|
|
199
|
+
referenceVisits,
|
|
190
200
|
referenceVisitStarts
|
|
191
201
|
};
|
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
facetLifts,
|
|
6
6
|
walkLift
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
buildGeometry,
|
|
10
|
-
computeReferenceRamp
|
|
11
|
-
} from "./chunk-XF2NS52W.js";
|
|
7
|
+
} from "./chunk-5QAQV7DT.js";
|
|
12
8
|
import {
|
|
13
9
|
walkKey
|
|
14
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K2Y5BWHF.js";
|
|
15
11
|
import {
|
|
16
12
|
walkRowsExtent
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OUYHOHHF.js";
|
|
14
|
+
import {
|
|
15
|
+
buildGeometry,
|
|
16
|
+
computeReferenceRamp
|
|
17
|
+
} from "./chunk-Y4ZWAC23.js";
|
|
18
18
|
import {
|
|
19
19
|
pathLegend,
|
|
20
20
|
walkLabelsOf
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TAHZ6TZ6.js";
|
|
22
22
|
import {
|
|
23
23
|
FIGURE_DEFAULTS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QDFMEGBN.js";
|
|
25
25
|
import {
|
|
26
26
|
drawingBounds
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NKFCSUIK.js";
|
|
28
28
|
import {
|
|
29
29
|
referenceLabel
|
|
30
30
|
} from "./chunk-5ORP7EFJ.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
deletionDrawing,
|
|
36
36
|
deletionEdges
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XDG2VSEC.js";
|
|
38
38
|
import {
|
|
39
39
|
facetCells,
|
|
40
40
|
facetSettingOf
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
hasTubeMapPaths,
|
|
7
7
|
tubeMapLayout,
|
|
8
8
|
tubeMapReferenceLayout
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PAPUFUJZ.js";
|
|
10
10
|
import {
|
|
11
11
|
anchoredLayout
|
|
12
12
|
} from "./chunk-CNWAVRLF.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-Q7OFBTBW.js";
|
|
16
16
|
import {
|
|
17
17
|
walkRowLayout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OUYHOHHF.js";
|
|
19
19
|
import {
|
|
20
20
|
withoutStrayHandles
|
|
21
21
|
} from "./chunk-FGH4D6WT.js";
|
|
@@ -39,17 +39,18 @@ function withDeletionRoutes(graph, deletions, dropped = /* @__PURE__ */ new Set(
|
|
|
39
39
|
ids: new Set(routes.values())
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function routeNodes(graph, deletions, routes, drawnOf, opts) {
|
|
42
|
+
function routeNodes(graph, deletions, routes, drawnOf, opts, budget) {
|
|
43
43
|
const lengths = new Map(graph.nodes.map((n) => [n.id, n.length]));
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(sum, id2) => sum + (lengths.get(id2) ?? 0),
|
|
47
|
-
0
|
|
48
|
-
);
|
|
49
|
-
const drawn = Math.max(
|
|
44
|
+
const wanted = deletions.map(
|
|
45
|
+
(d) => Math.max(
|
|
50
46
|
opts.minimumNodeLength,
|
|
51
|
-
drawnOf(
|
|
52
|
-
)
|
|
47
|
+
drawnOf(d.bypassed.reduce((sum, id) => sum + (lengths.get(id) ?? 0), 0)) * ROUTE_FRACTION
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
const total = wanted.reduce((sum, drawn) => sum + drawn, 0);
|
|
51
|
+
const scale = total > budget ? budget / total : 1;
|
|
52
|
+
return deletions.map((d, i) => {
|
|
53
|
+
const drawn = Math.max(opts.minimumNodeLength, wanted[i] * scale);
|
|
53
54
|
const id = routes.get(d.edgeIndex);
|
|
54
55
|
return {
|
|
55
56
|
id,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unclipped
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L2FHURWV.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
referenceVisits
|
|
6
|
+
} from "./chunk-QBI6SC74.js";
|
|
7
7
|
import {
|
|
8
8
|
computeEdgeCurves,
|
|
9
9
|
edgeJoinOf,
|
|
@@ -76,17 +76,17 @@ function skipsBetween(edge, from, to, forwards) {
|
|
|
76
76
|
if (fromStrand === void 0 || toStrand === void 0) {
|
|
77
77
|
return true;
|
|
78
78
|
}
|
|
79
|
-
const leavesRight = fromStrand ===
|
|
80
|
-
const arrivesLeft = toStrand ===
|
|
79
|
+
const leavesRight = fromStrand === from.strand;
|
|
80
|
+
const arrivesLeft = toStrand === to.strand;
|
|
81
81
|
return forwards ? leavesRight && arrivesLeft : !leavesRight && !arrivesLeft;
|
|
82
82
|
}
|
|
83
|
-
function skippedSpan(edge, from, to,
|
|
83
|
+
function skippedSpan(edge, from, to, visitsOf) {
|
|
84
84
|
let best;
|
|
85
|
-
for (const a of
|
|
86
|
-
for (const b of
|
|
87
|
-
const forwards = a <= b;
|
|
88
|
-
const span = forwards ? { start: a + from.length, end: b } : { start: b + to.length, end: a };
|
|
89
|
-
if (skipsBetween(edge,
|
|
85
|
+
for (const a of visitsOf(from)) {
|
|
86
|
+
for (const b of visitsOf(to)) {
|
|
87
|
+
const forwards = a.start <= b.start;
|
|
88
|
+
const span = forwards ? { start: a.start + from.length, end: b.start } : { start: b.start + to.length, end: a.start };
|
|
89
|
+
if (skipsBetween(edge, a, b, forwards) && (!best || Math.abs(span.end - span.start) < Math.abs(best.end - best.start))) {
|
|
90
90
|
best = span;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -94,11 +94,11 @@ function skippedSpan(edge, from, to, startsOf) {
|
|
|
94
94
|
return best;
|
|
95
95
|
}
|
|
96
96
|
var COPY_SWITCH_SHARE = 0.01;
|
|
97
|
-
function repeatCopies(backbone,
|
|
97
|
+
function repeatCopies(backbone, visitsOf) {
|
|
98
98
|
const bySequence = /* @__PURE__ */ new Map();
|
|
99
99
|
for (const [refName, nodes] of backbone) {
|
|
100
100
|
const copies = nodes.flatMap((node) => {
|
|
101
|
-
const starts =
|
|
101
|
+
const starts = visitsOf(node).map((v) => v.start);
|
|
102
102
|
return starts.slice(1).map((next, i) => ({
|
|
103
103
|
at: starts[i],
|
|
104
104
|
copy: next - starts[i]
|
|
@@ -121,41 +121,55 @@ function switchesCopy(copies, start, bp) {
|
|
|
121
121
|
const near = [copies[i - 1], copies[i]].filter((c) => c !== void 0).sort((a, b) => Math.abs(a.at - start) - Math.abs(b.at - start))[0];
|
|
122
122
|
return near !== void 0 && Math.abs(near.at - start) <= near.copy && Math.abs(bp - near.copy) <= near.copy * COPY_SWITCH_SHARE;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function backboneLinks(cut) {
|
|
125
125
|
const graph = unclipped(cut);
|
|
126
126
|
const byId = new Map(graph.nodes.map((n) => [n.id, n]));
|
|
127
127
|
const backbone = backboneBySequence(graph);
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const found = [];
|
|
131
|
-
for (let edgeIndex = 0; edgeIndex < graph.edges.length; edgeIndex++) {
|
|
132
|
-
const edge = graph.edges[edgeIndex];
|
|
128
|
+
const visitsOf = referenceVisits(graph);
|
|
129
|
+
const links = graph.edges.flatMap((edge, edgeIndex) => {
|
|
133
130
|
const from = byId.get(edge.from);
|
|
134
131
|
const to = byId.get(edge.to);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
found.push({
|
|
142
|
-
edgeIndex,
|
|
143
|
-
from: edge.from,
|
|
144
|
-
to: edge.to,
|
|
145
|
-
...edge.fromStrand ? { fromStrand: edge.fromStrand } : {},
|
|
146
|
-
...edge.toStrand ? { toStrand: edge.toStrand } : {},
|
|
147
|
-
refName,
|
|
148
|
-
start,
|
|
149
|
-
end,
|
|
150
|
-
bp,
|
|
151
|
-
bypassed: bypassedNodes(backbone.get(refName), start, end)
|
|
152
|
-
});
|
|
132
|
+
return !edge.foldBridge && from !== void 0 && to !== void 0 && isBackbone(from) && isBackbone(to) && from.stable.refName === to.stable.refName ? [
|
|
133
|
+
{
|
|
134
|
+
edgeIndex,
|
|
135
|
+
edge,
|
|
136
|
+
refName: from.stable.refName,
|
|
137
|
+
span: skippedSpan(edge, from, to, visitsOf)
|
|
153
138
|
}
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
return
|
|
139
|
+
] : [];
|
|
140
|
+
});
|
|
141
|
+
return { links, backbone, copies: repeatCopies(backbone, visitsOf) };
|
|
142
|
+
}
|
|
143
|
+
function deletionEdges(cut) {
|
|
144
|
+
const { links, backbone, copies } = backboneLinks(cut);
|
|
145
|
+
return links.flatMap(({ edgeIndex, edge, refName, span }) => {
|
|
146
|
+
const bp = span ? span.end - span.start : 0;
|
|
147
|
+
return span && bp >= MIN_DELETION_BP && !switchesCopy(copies.get(refName), span.start, bp) ? [
|
|
148
|
+
{
|
|
149
|
+
edgeIndex,
|
|
150
|
+
from: edge.from,
|
|
151
|
+
to: edge.to,
|
|
152
|
+
...edge.fromStrand ? { fromStrand: edge.fromStrand } : {},
|
|
153
|
+
...edge.toStrand ? { toStrand: edge.toStrand } : {},
|
|
154
|
+
refName,
|
|
155
|
+
start: span.start,
|
|
156
|
+
end: span.end,
|
|
157
|
+
bp,
|
|
158
|
+
bypassed: bypassedNodes(
|
|
159
|
+
backbone.get(refName),
|
|
160
|
+
span.start,
|
|
161
|
+
span.end
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
] : [];
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function offReferenceLinks(cut) {
|
|
168
|
+
return backboneLinks(cut).links.filter(
|
|
169
|
+
({ span }) => !span || span.end - span.start >= MIN_DELETION_BP
|
|
170
|
+
).map(({ edgeIndex }) => edgeIndex);
|
|
157
171
|
}
|
|
158
|
-
function
|
|
172
|
+
function closableLinks(graph, edgeIndexes) {
|
|
159
173
|
const parent = /* @__PURE__ */ new Map();
|
|
160
174
|
const root = (id) => {
|
|
161
175
|
let r = id;
|
|
@@ -174,14 +188,17 @@ function closableDeletions(graph, deletions) {
|
|
|
174
188
|
}
|
|
175
189
|
return ra !== rb;
|
|
176
190
|
};
|
|
177
|
-
const candidates = new Set(
|
|
191
|
+
const candidates = new Set(edgeIndexes);
|
|
178
192
|
graph.edges.forEach((e, ei) => {
|
|
179
193
|
if (!candidates.has(ei)) {
|
|
180
194
|
join(e.from, e.to);
|
|
181
195
|
}
|
|
182
196
|
});
|
|
183
197
|
return new Set(
|
|
184
|
-
|
|
198
|
+
edgeIndexes.filter((ei) => {
|
|
199
|
+
const edge = graph.edges[ei];
|
|
200
|
+
return !join(edge.from, edge.to);
|
|
201
|
+
})
|
|
185
202
|
);
|
|
186
203
|
}
|
|
187
204
|
function dashedDeletions(shown, lift) {
|
|
@@ -196,7 +213,10 @@ function deletionDrawing(graph, deletions, show = true) {
|
|
|
196
213
|
}
|
|
197
214
|
let drawing = byShow.get(show);
|
|
198
215
|
if (!drawing) {
|
|
199
|
-
const hidden = show ? /* @__PURE__ */ new Set() :
|
|
216
|
+
const hidden = show ? /* @__PURE__ */ new Set() : closableLinks(
|
|
217
|
+
graph,
|
|
218
|
+
deletions.map((d) => d.edgeIndex)
|
|
219
|
+
);
|
|
200
220
|
drawing = {
|
|
201
221
|
shown: deletions.filter((d) => !hidden.has(d.edgeIndex)),
|
|
202
222
|
bypassed: new Map(deletions.map((d) => [d.edgeIndex, d.bypassed])),
|
|
@@ -211,7 +231,8 @@ export {
|
|
|
211
231
|
deletionKey,
|
|
212
232
|
edgeCurvesOf,
|
|
213
233
|
deletionEdges,
|
|
214
|
-
|
|
234
|
+
offReferenceLinks,
|
|
235
|
+
closableLinks,
|
|
215
236
|
dashedDeletions,
|
|
216
237
|
deletionDrawing
|
|
217
238
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
REFERENCE_RAMP_ALT_CSS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y4ZWAC23.js";
|
|
4
4
|
import {
|
|
5
5
|
RAMP_GRADIENT_CSS,
|
|
6
6
|
RAMP_GRADIENT_STOPS,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
GAP_CAUSE_TEXT,
|
|
12
12
|
OUTSIDE_TEXT
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D7ZTAGDM.js";
|
|
14
14
|
import {
|
|
15
15
|
LABEL_CHAR_PX
|
|
16
16
|
} from "./chunk-S43IBA5Y.js";
|
|
@@ -86,7 +86,7 @@ function walkRowReadout(row, reference, unit, call) {
|
|
|
86
86
|
return `${kb(bp)}${units(bp, unit)}`;
|
|
87
87
|
}
|
|
88
88
|
if (row.deletionBp !== void 0) {
|
|
89
|
-
return `
|
|
89
|
+
return `no step on the reference across ${roughBp(row.deletionBp)}`;
|
|
90
90
|
}
|
|
91
91
|
const outside = gapsText(gapBp, row.runs, row.abridgedSteps);
|
|
92
92
|
const called = call ? ` \xB7 called ${kb(call.bp)}${call.spanningReads === 0 ? " \xB7 no spanning read" : ""}` : "";
|
|
@@ -13,6 +13,12 @@ import {
|
|
|
13
13
|
fadeAbgr,
|
|
14
14
|
packAbgr
|
|
15
15
|
} from "./chunk-G2FD7S3C.js";
|
|
16
|
+
import {
|
|
17
|
+
PATH_LIGHTNESS,
|
|
18
|
+
PATH_SATURATION,
|
|
19
|
+
nameHue,
|
|
20
|
+
pathHueAt
|
|
21
|
+
} from "./chunk-TAHZ6TZ6.js";
|
|
16
22
|
import {
|
|
17
23
|
REFERENCE_RAMP_LIGHTNESS,
|
|
18
24
|
REFERENCE_RAMP_SATURATION,
|
|
@@ -20,13 +26,7 @@ import {
|
|
|
20
26
|
} from "./chunk-GQZVR5DW.js";
|
|
21
27
|
import {
|
|
22
28
|
baseEdgeCurves
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
PATH_LIGHTNESS,
|
|
26
|
-
PATH_SATURATION,
|
|
27
|
-
nameHue,
|
|
28
|
-
pathHueAt
|
|
29
|
-
} from "./chunk-ZULVAGVE.js";
|
|
29
|
+
} from "./chunk-RV5RJZKO.js";
|
|
30
30
|
import {
|
|
31
31
|
nodeWidthPx,
|
|
32
32
|
walkLaneWidthPx,
|
package/dist/cli/figure.js
CHANGED
|
@@ -9,16 +9,16 @@ import "../chunks/chunk-EQDQ7P4Y.js";
|
|
|
9
9
|
import {
|
|
10
10
|
laidOutGraph,
|
|
11
11
|
walkLayers
|
|
12
|
-
} from "../chunks/chunk-
|
|
12
|
+
} from "../chunks/chunk-GPDGIDXD.js";
|
|
13
13
|
import {
|
|
14
14
|
LAYOUT_ENGINE_VALUES,
|
|
15
15
|
isLayoutEngineKind
|
|
16
16
|
} from "../chunks/chunk-CO6RGQAD.js";
|
|
17
17
|
import {
|
|
18
18
|
LAYOUT_MODES
|
|
19
|
-
} from "../chunks/chunk-
|
|
19
|
+
} from "../chunks/chunk-ULFBFEPG.js";
|
|
20
20
|
import "../chunks/chunk-3JDGPLCL.js";
|
|
21
|
-
import "../chunks/chunk-
|
|
21
|
+
import "../chunks/chunk-PAPUFUJZ.js";
|
|
22
22
|
import "../chunks/chunk-KKHXMJEE.js";
|
|
23
23
|
import "../chunks/chunk-CNWAVRLF.js";
|
|
24
24
|
import "../chunks/chunk-LLTISBAA.js";
|
|
@@ -31,70 +31,70 @@ import {
|
|
|
31
31
|
haplotypeIndexBeside,
|
|
32
32
|
openGbz,
|
|
33
33
|
parseRegion
|
|
34
|
-
} from "../chunks/chunk-
|
|
35
|
-
import "../chunks/chunk-
|
|
34
|
+
} from "../chunks/chunk-QPKSULKV.js";
|
|
35
|
+
import "../chunks/chunk-RQHIDUZR.js";
|
|
36
36
|
import "../chunks/chunk-HNWJ4B7S.js";
|
|
37
37
|
import {
|
|
38
38
|
figureSvg
|
|
39
|
-
} from "../chunks/chunk-
|
|
39
|
+
} from "../chunks/chunk-A2WLX7OL.js";
|
|
40
40
|
import "../chunks/chunk-V4YML3GR.js";
|
|
41
|
-
import "../chunks/chunk-
|
|
41
|
+
import "../chunks/chunk-5XXUBTSN.js";
|
|
42
42
|
import "../chunks/chunk-4DMSPNYV.js";
|
|
43
43
|
import "../chunks/chunk-RBCE2OQH.js";
|
|
44
|
-
import {
|
|
45
|
-
genesOnRow,
|
|
46
|
-
placeRowGenes
|
|
47
|
-
} from "../chunks/chunk-BQ65B7Y7.js";
|
|
48
44
|
import "../chunks/chunk-JSUCGZ6K.js";
|
|
49
|
-
import "../chunks/chunk-
|
|
50
|
-
import "../chunks/chunk-
|
|
51
|
-
import "../chunks/chunk-
|
|
45
|
+
import "../chunks/chunk-3UYMOEKF.js";
|
|
46
|
+
import "../chunks/chunk-LDHBYZAB.js";
|
|
47
|
+
import "../chunks/chunk-WMP72ZWV.js";
|
|
52
48
|
import "../chunks/chunk-HEYIAMTC.js";
|
|
53
|
-
import "../chunks/chunk-
|
|
54
|
-
import "../chunks/chunk-
|
|
55
|
-
import "../chunks/chunk-
|
|
49
|
+
import "../chunks/chunk-SAREXDML.js";
|
|
50
|
+
import "../chunks/chunk-NY7O6UBH.js";
|
|
51
|
+
import "../chunks/chunk-TFP7SWF3.js";
|
|
56
52
|
import "../chunks/chunk-LOCJN3BZ.js";
|
|
57
|
-
import "../chunks/chunk-
|
|
58
|
-
import "../chunks/chunk-
|
|
59
|
-
import "../chunks/chunk-
|
|
60
|
-
import "../chunks/chunk-
|
|
61
|
-
import "../chunks/chunk-G2FD7S3C.js";
|
|
62
|
-
import "../chunks/chunk-XDTIBSTI.js";
|
|
63
|
-
import "../chunks/chunk-GQZVR5DW.js";
|
|
64
|
-
import "../chunks/chunk-URPU4XCM.js";
|
|
65
|
-
import "../chunks/chunk-Y627OFHP.js";
|
|
53
|
+
import "../chunks/chunk-5QAQV7DT.js";
|
|
54
|
+
import "../chunks/chunk-WLOSINY4.js";
|
|
55
|
+
import "../chunks/chunk-K2Y5BWHF.js";
|
|
56
|
+
import "../chunks/chunk-OUYHOHHF.js";
|
|
66
57
|
import {
|
|
67
58
|
filterSamples,
|
|
68
59
|
walkRows
|
|
69
|
-
} from "../chunks/chunk-
|
|
70
|
-
import "../chunks/chunk-
|
|
71
|
-
import
|
|
60
|
+
} from "../chunks/chunk-H5NMBQZG.js";
|
|
61
|
+
import "../chunks/chunk-O6SLIY74.js";
|
|
62
|
+
import {
|
|
63
|
+
genesOnRow,
|
|
64
|
+
placeRowGenes
|
|
65
|
+
} from "../chunks/chunk-XDO7E7P3.js";
|
|
66
|
+
import "../chunks/chunk-Y4ZWAC23.js";
|
|
67
|
+
import "../chunks/chunk-YUIKEUKY.js";
|
|
68
|
+
import "../chunks/chunk-G2FD7S3C.js";
|
|
69
|
+
import "../chunks/chunk-TAHZ6TZ6.js";
|
|
70
|
+
import "../chunks/chunk-GQZVR5DW.js";
|
|
71
|
+
import "../chunks/chunk-RV5RJZKO.js";
|
|
72
72
|
import "../chunks/chunk-XWH4LB56.js";
|
|
73
|
-
import "../chunks/chunk-
|
|
74
|
-
import "../chunks/chunk-
|
|
73
|
+
import "../chunks/chunk-QDFMEGBN.js";
|
|
74
|
+
import "../chunks/chunk-NKFCSUIK.js";
|
|
75
75
|
import "../chunks/chunk-OPPVSPEF.js";
|
|
76
76
|
import "../chunks/chunk-NAYS472K.js";
|
|
77
77
|
import "../chunks/chunk-4FRX2SPT.js";
|
|
78
|
-
import "../chunks/chunk-
|
|
79
|
-
import "../chunks/chunk-
|
|
78
|
+
import "../chunks/chunk-XABWOV3C.js";
|
|
79
|
+
import "../chunks/chunk-Q4B4O2M4.js";
|
|
80
80
|
import "../chunks/chunk-QYBZZI5H.js";
|
|
81
81
|
import "../chunks/chunk-CFXXFHRK.js";
|
|
82
82
|
import "../chunks/chunk-FGH4D6WT.js";
|
|
83
|
-
import "../chunks/chunk-
|
|
83
|
+
import "../chunks/chunk-IDPBN2BP.js";
|
|
84
84
|
import "../chunks/chunk-L4DBSRA2.js";
|
|
85
85
|
import "../chunks/chunk-5ORP7EFJ.js";
|
|
86
|
-
import "../chunks/chunk-
|
|
87
|
-
import "../chunks/chunk-
|
|
88
|
-
import "../chunks/chunk-
|
|
86
|
+
import "../chunks/chunk-4J4IKYSL.js";
|
|
87
|
+
import "../chunks/chunk-D7ZTAGDM.js";
|
|
88
|
+
import "../chunks/chunk-EAKP6VH6.js";
|
|
89
89
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
90
90
|
import "../chunks/chunk-S43IBA5Y.js";
|
|
91
91
|
import "../chunks/chunk-HNNP5QUN.js";
|
|
92
92
|
import "../chunks/chunk-HKYXWZQS.js";
|
|
93
93
|
import "../chunks/chunk-34BOZKIE.js";
|
|
94
94
|
import "../chunks/chunk-JKJWSY4V.js";
|
|
95
|
-
import "../chunks/chunk-
|
|
96
|
-
import "../chunks/chunk-
|
|
97
|
-
import "../chunks/chunk-
|
|
95
|
+
import "../chunks/chunk-XDG2VSEC.js";
|
|
96
|
+
import "../chunks/chunk-L2FHURWV.js";
|
|
97
|
+
import "../chunks/chunk-QBI6SC74.js";
|
|
98
98
|
import "../chunks/chunk-JJV2GT2Z.js";
|
|
99
99
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
100
100
|
import "../chunks/chunk-BEUTROKU.js";
|