@jbrowse/bandage-core 11.7.3 → 11.9.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 +59 -19
- package/dist/bubbles/bubbleHalos.js +6 -6
- package/dist/bubbles/classifyBubble.js +5 -5
- package/dist/bubbles/superbubbles.js +7 -7
- package/dist/chunks/{chunk-K4KVAMEF.js → chunk-2A6Z2DHF.js} +1 -1
- package/dist/chunks/{chunk-4SN7R4UF.js → chunk-2MXFG3W7.js} +1 -1
- package/dist/chunks/chunk-3BDQQTXY.js +568 -0
- package/dist/chunks/{chunk-QXBQDHKL.js → chunk-3BOREHCJ.js} +80 -38
- package/dist/chunks/{chunk-F4CDC72I.js → chunk-3DHGSHC3.js} +1 -1
- package/dist/chunks/{chunk-P276TWPM.js → chunk-3GORESBG.js} +1 -1
- package/dist/chunks/{chunk-4KOYS5WR.js → chunk-4BYGFDQB.js} +1 -1
- package/dist/chunks/{chunk-LH436HS2.js → chunk-4JDO7ZLN.js} +2 -2
- package/dist/chunks/{chunk-2US43KNG.js → chunk-7YSIP3O2.js} +2 -2
- package/dist/chunks/{chunk-VNF236GG.js → chunk-ARXDNQLF.js} +2 -2
- package/dist/chunks/{chunk-N73RA4DR.js → chunk-AURNOR27.js} +3 -3
- package/dist/chunks/{chunk-63XWYNID.js → chunk-BDS5VZYZ.js} +4 -4
- package/dist/chunks/{chunk-BXE3SBBN.js → chunk-C3KAPREU.js} +1 -1
- package/dist/chunks/{chunk-VXKL2ZLR.js → chunk-GDZQFELP.js} +259 -60
- package/dist/chunks/{chunk-2T3V6Z3M.js → chunk-GYJMPVOU.js} +1 -1
- package/dist/chunks/{chunk-BFUS3ENH.js → chunk-HEYIAMTC.js} +2 -2
- package/dist/chunks/{chunk-HMEAGAGC.js → chunk-HIN56TLA.js} +2 -2
- package/dist/chunks/{chunk-2VMKQKVO.js → chunk-HNNP5QUN.js} +1 -1
- package/dist/chunks/{chunk-W5YRBEWQ.js → chunk-I53QYITQ.js} +1 -1
- package/dist/chunks/{chunk-UTDMFVC7.js → chunk-I5CHAYDZ.js} +8 -8
- package/dist/chunks/{chunk-EPOPGV5G.js → chunk-IXLT3JJX.js} +1 -1
- package/dist/chunks/{chunk-SG7VQB4F.js → chunk-IZKM4NY7.js} +1 -1
- package/dist/chunks/{chunk-KMLATBNT.js → chunk-J7RNXBXA.js} +3 -3
- package/dist/chunks/{chunk-VACK24HF.js → chunk-JJV2GT2Z.js} +43 -9
- package/dist/chunks/{chunk-PKGPSTRW.js → chunk-JO2T77NW.js} +2 -2
- package/dist/chunks/{chunk-XKPXOIWD.js → chunk-JVT3XTKN.js} +3 -3
- package/dist/chunks/{chunk-SDI6BVG7.js → chunk-KKHXMJEE.js} +1 -1
- package/dist/chunks/{chunk-G7SG4XMK.js → chunk-LODKC7PJ.js} +7 -0
- package/dist/chunks/{chunk-AJQRKN3X.js → chunk-N3DCLT7M.js} +1 -1
- package/dist/chunks/{chunk-ZZZ6NVLW.js → chunk-NAYS472K.js} +1 -1
- package/dist/chunks/{chunk-AWJJSA7D.js → chunk-NWEVR2OQ.js} +1 -1
- package/dist/chunks/{chunk-33KUO34R.js → chunk-P2GJBFNA.js} +1 -1
- package/dist/chunks/{chunk-IHM43Y7B.js → chunk-RT4U3DH3.js} +1 -1
- package/dist/chunks/{chunk-XTCIKBWM.js → chunk-S6E3PMH7.js} +1 -1
- package/dist/chunks/{chunk-BLDUBB7X.js → chunk-SZYFZNCO.js} +2 -2
- package/dist/chunks/{chunk-T3MEG5D3.js → chunk-T2UNTWU5.js} +90 -21
- package/dist/chunks/{chunk-QJC63NFR.js → chunk-TQ26XEFL.js} +2 -2
- package/dist/chunks/{chunk-6RB5ZQ34.js → chunk-UEWIGD52.js} +51 -14
- package/dist/chunks/{chunk-SENPGW4O.js → chunk-VCUOYVLC.js} +1 -1
- package/dist/chunks/{chunk-CL6ELLVF.js → chunk-VNCHWWLG.js} +1 -1
- package/dist/chunks/{chunk-GD6RUZU5.js → chunk-VQ353UDK.js} +14 -8
- package/dist/chunks/{chunk-QLLKALSH.js → chunk-VTGQCLGI.js} +1 -1
- package/dist/chunks/{chunk-Z4HXW6ZH.js → chunk-ZWBQ4RRK.js} +24 -10
- package/dist/cli/figure.js +31 -30
- package/dist/cli/fold.js +6 -6
- package/dist/deletionEdges.js +2 -2
- package/dist/figure.js +27 -26
- package/dist/figureData.js +25 -24
- package/dist/figureScene.js +18 -17
- package/dist/figureSettings.js +6 -6
- package/dist/foldVariants.js +2 -2
- package/dist/genes/genePins.js +3 -3
- package/dist/graphLabels.js +4 -4
- package/dist/index.js +45 -44
- package/dist/labelLayout.js +8 -8
- package/dist/layout/forceCache.js +6 -6
- package/dist/layout/mergeRuns.js +2 -2
- package/dist/layout/orientToReference.js +2 -2
- package/dist/layout/tubeMapLayout.js +9 -9
- package/dist/layout/walkRowDraw.js +9 -8
- package/dist/layout/walkRowLayout.js +3 -3
- package/dist/layout/walkRowRuns.js +1 -1
- package/dist/layout/walkRows.js +2 -2
- package/dist/layout/walkStrip.js +13 -12
- package/dist/layoutModes.js +11 -11
- package/dist/pathColors.js +5 -5
- package/dist/pipeline.js +5 -5
- package/dist/referenceStrip.js +9 -8
- package/dist/renderer/GeometryBuilder.js +8 -7
- package/dist/renderer/walkLanes.js +46 -0
- package/dist/tubeMap/axis.js +5 -5
- package/dist/tubeMap/bundle.js +10 -10
- package/dist/tubeMap/coarsen.js +10 -10
- package/dist/tubeMap/deviations.js +11 -11
- package/dist/tubeMap/draw.js +5 -5
- package/dist/tubeMap/genes.js +6 -6
- package/dist/tubeMap/nodeColors.js +9 -8
- package/dist/tubeMap/reads.js +2 -2
- package/dist/types/figureData.d.ts +22 -0
- package/dist/types/renderer/types.d.ts +20 -0
- package/dist/types/renderer/walkLanes.d.ts +76 -0
- package/dist/types/util/geometry.d.ts +13 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/walkEncoding.d.ts +9 -5
- package/dist/types/walkHighlight.d.ts +3 -0
- package/dist/util/SpatialIndex.js +4 -4
- package/dist/util/edgeCurves.js +3 -3
- package/dist/util/geometry.js +7 -1
- package/dist/util/hitDetection.js +5 -5
- package/dist/version.js +1 -1
- package/dist/viewport.js +6 -6
- package/dist/walkEncoding.js +13 -10
- package/dist/walkHighlight.js +10 -9
- package/dist/walkKey.js +5 -5
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
stripGeneGaps,
|
|
3
3
|
walkStripFrame,
|
|
4
4
|
walkStripLabelsTree
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JO2T77NW.js";
|
|
6
6
|
import {
|
|
7
7
|
Canvas2DRenderer
|
|
8
8
|
} from "./chunk-4DMSPNYV.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
walkRowsKey,
|
|
14
14
|
walkRowsKeyTree,
|
|
15
15
|
walkRowsTree
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IXLT3JJX.js";
|
|
17
17
|
import {
|
|
18
18
|
EXON_COLOR,
|
|
19
19
|
exonOutlineTree,
|
|
@@ -21,45 +21,50 @@ import {
|
|
|
21
21
|
} from "./chunk-JSUCGZ6K.js";
|
|
22
22
|
import {
|
|
23
23
|
geneLabelCandidates
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TQ26XEFL.js";
|
|
25
25
|
import {
|
|
26
26
|
nodesUnderBox
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4JDO7ZLN.js";
|
|
28
28
|
import {
|
|
29
29
|
escapeAttr,
|
|
30
30
|
serializeEl
|
|
31
31
|
} from "./chunk-H2H4Y3TV.js";
|
|
32
32
|
import {
|
|
33
33
|
genePins
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-HEYIAMTC.js";
|
|
35
35
|
import {
|
|
36
36
|
version
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-N3DCLT7M.js";
|
|
38
38
|
import {
|
|
39
39
|
axisScaleOf
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-3DHGSHC3.js";
|
|
41
41
|
import {
|
|
42
42
|
figureScene
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-I5CHAYDZ.js";
|
|
44
44
|
import {
|
|
45
45
|
encodingStops
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-UEWIGD52.js";
|
|
47
|
+
import {
|
|
48
|
+
THREAD_PX,
|
|
49
|
+
passesKey,
|
|
50
|
+
threadsPasses
|
|
51
|
+
} from "./chunk-3BDQQTXY.js";
|
|
47
52
|
import {
|
|
48
53
|
rangeText
|
|
49
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-IZKM4NY7.js";
|
|
50
55
|
import {
|
|
51
56
|
walkRowLabels
|
|
52
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-VCUOYVLC.js";
|
|
53
58
|
import {
|
|
54
59
|
nodeInk
|
|
55
60
|
} from "./chunk-ZANALBSX.js";
|
|
56
61
|
import {
|
|
57
62
|
FIGURE_DEFAULTS
|
|
58
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-2MXFG3W7.js";
|
|
59
64
|
import {
|
|
60
65
|
FIT_PADDING,
|
|
61
66
|
fitTransform
|
|
62
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-JVT3XTKN.js";
|
|
63
68
|
import {
|
|
64
69
|
LABEL_CHAR_PX,
|
|
65
70
|
LABEL_PAD,
|
|
@@ -79,6 +84,8 @@ var FONT = 'font-family="Helvetica, Arial, sans-serif" font-size="11"';
|
|
|
79
84
|
var BAR_PX = 48;
|
|
80
85
|
var SWATCH_PX = 18;
|
|
81
86
|
var KEY_GAP_PX = 16;
|
|
87
|
+
var KEY_LINE_PX = 16;
|
|
88
|
+
var KEY_TALL_PX = 32;
|
|
82
89
|
var STRIP_KEY_PX = 22;
|
|
83
90
|
var FADED = "rgb(160,160,160)";
|
|
84
91
|
var GENE_INK = "#1c1c22";
|
|
@@ -92,15 +99,45 @@ function keySvg(id, x, y, stops, label, after, under, opacity = 1) {
|
|
|
92
99
|
);
|
|
93
100
|
return {
|
|
94
101
|
width,
|
|
102
|
+
height: under ? KEY_TALL_PX : KEY_LINE_PX,
|
|
95
103
|
markup: `${defs}<g transform="translate(${x} ${y})" ${FONT}><rect y="5" width="${bar}" height="8" rx="2" ${fill}/><text x="${bar + 5}" y="13"><tspan font-weight="bold">${escapeAttr(label)}</tspan>${escapeAttr(after)}</text>${under ? `<text y="28">${escapeAttr(under)}</text>` : ""}</g>`
|
|
96
104
|
};
|
|
97
105
|
}
|
|
98
106
|
function exonKeySvg(x, y) {
|
|
99
107
|
return {
|
|
100
108
|
width: SWATCH_PX + 5 + 4 * LABEL_CHAR_PX,
|
|
109
|
+
height: KEY_LINE_PX,
|
|
101
110
|
markup: `<g transform="translate(${x} ${y})" ${FONT}><rect x="1" y="4" width="${SWATCH_PX - 2}" height="10" rx="4" fill="none" stroke="${EXON_COLOR}" stroke-width="2"/><text x="${SWATCH_PX + 5}" y="13">exon</text></g>`
|
|
102
111
|
};
|
|
103
112
|
}
|
|
113
|
+
function passesKeySvg(x, y, note) {
|
|
114
|
+
const lines = [6, 9, 12].map(
|
|
115
|
+
(ly) => `<line y1="${ly}" y2="${ly}" x2="${SWATCH_PX}" stroke="#444" stroke-width="${THREAD_PX}"/>`
|
|
116
|
+
).join("");
|
|
117
|
+
return {
|
|
118
|
+
width: SWATCH_PX + 5 + note.length * LABEL_CHAR_PX,
|
|
119
|
+
height: KEY_LINE_PX,
|
|
120
|
+
markup: `<g transform="translate(${x} ${y})" ${FONT}>${lines}<text x="${SWATCH_PX + 5}" y="13">${note}</text></g>`
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function keyLines(keys, width) {
|
|
124
|
+
const markup = [];
|
|
125
|
+
let x = 6;
|
|
126
|
+
let y = 2;
|
|
127
|
+
let line = 0;
|
|
128
|
+
for (const key of keys) {
|
|
129
|
+
const size = key(0, 0);
|
|
130
|
+
if (x > 6 && x + size.width > width - 6) {
|
|
131
|
+
x = 6;
|
|
132
|
+
y += line + 4;
|
|
133
|
+
line = 0;
|
|
134
|
+
}
|
|
135
|
+
markup.push(key(x, y).markup);
|
|
136
|
+
x += size.width + KEY_GAP_PX;
|
|
137
|
+
line = Math.max(line, size.height);
|
|
138
|
+
}
|
|
139
|
+
return { markup, height: y + line };
|
|
140
|
+
}
|
|
104
141
|
function walkKeySvg(id, x, y, walk, label, key) {
|
|
105
142
|
return keySvg(
|
|
106
143
|
id,
|
|
@@ -264,22 +301,18 @@ function figureSvg(graph, layout, o = {}) {
|
|
|
264
301
|
});
|
|
265
302
|
height = grid.total;
|
|
266
303
|
} else {
|
|
267
|
-
|
|
268
|
-
const push = (key) => {
|
|
269
|
-
parts.push(key.markup);
|
|
270
|
-
x += key.width + KEY_GAP_PX;
|
|
271
|
-
};
|
|
304
|
+
const keys = [];
|
|
272
305
|
if (lift) {
|
|
273
306
|
lift.walks.forEach((walk, i) => {
|
|
274
|
-
push(
|
|
275
|
-
walkKeySvg(`key${i}`, x,
|
|
307
|
+
keys.push(
|
|
308
|
+
(x, y) => walkKeySvg(`key${i}`, x, y, walk, labelOf(walk.name), keyText(walk))
|
|
276
309
|
);
|
|
277
310
|
});
|
|
278
|
-
push(
|
|
279
|
-
keySvg(
|
|
311
|
+
keys.push(
|
|
312
|
+
(x, y) => keySvg(
|
|
280
313
|
"faded",
|
|
281
314
|
x,
|
|
282
|
-
|
|
315
|
+
y,
|
|
283
316
|
[{ offset: 0, color: FADED }],
|
|
284
317
|
"",
|
|
285
318
|
`not on ${lift.walks.length === 1 ? labelOf(lift.walks[0].name) : "these walks"}`,
|
|
@@ -287,24 +320,31 @@ function figureSvg(graph, layout, o = {}) {
|
|
|
287
320
|
0.3
|
|
288
321
|
)
|
|
289
322
|
);
|
|
323
|
+
if (threadsPasses(lift.walks)) {
|
|
324
|
+
keys.push((x, y) => passesKeySvg(x, y, passesKey(lift.walks)));
|
|
325
|
+
}
|
|
290
326
|
}
|
|
291
327
|
if (rows) {
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
x,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
328
|
+
const entries = walkRowsKey(rows, {
|
|
329
|
+
ramp: rampInterval,
|
|
330
|
+
genes: o.rowGenes?.size ? o.rowGeneGaps : void 0
|
|
331
|
+
});
|
|
332
|
+
entries.forEach((entry, i) => {
|
|
333
|
+
keys.push((x, y) => {
|
|
334
|
+
const key = walkRowsKeyTree([entry], x, y, `rows-key-${i}`);
|
|
335
|
+
return {
|
|
336
|
+
width: key.width - KEY_GAP_PX,
|
|
337
|
+
height: KEY_LINE_PX,
|
|
338
|
+
markup: serializeEl(key.tree)
|
|
339
|
+
};
|
|
340
|
+
});
|
|
341
|
+
});
|
|
302
342
|
} else if (!lift && referenceRamp) {
|
|
303
|
-
push(
|
|
304
|
-
keySvg(
|
|
343
|
+
keys.push(
|
|
344
|
+
(x, y) => keySvg(
|
|
305
345
|
"ramp",
|
|
306
346
|
x,
|
|
307
|
-
|
|
347
|
+
y,
|
|
308
348
|
encodingStops({ field: "reference", scheme: "rainbow" }),
|
|
309
349
|
referenceName ? `${referenceName} position` : "Reference position",
|
|
310
350
|
"",
|
|
@@ -317,9 +357,11 @@ function figureSvg(graph, layout, o = {}) {
|
|
|
317
357
|
);
|
|
318
358
|
}
|
|
319
359
|
if (pins.some((pin) => pin.exonsByNode.length > 0)) {
|
|
320
|
-
push(exonKeySvg(x,
|
|
360
|
+
keys.push((x, y) => exonKeySvg(x, y));
|
|
321
361
|
}
|
|
322
|
-
const
|
|
362
|
+
const keyed = keyLines(keys, width);
|
|
363
|
+
parts.push(...keyed.markup);
|
|
364
|
+
const header = keys.length > 0 ? Math.max(FACET_TITLE_PX, keyed.height) : 0;
|
|
323
365
|
const usable = width - 2 * FIT_PADDING;
|
|
324
366
|
const drawn = pixelRows || !(bounds.w > 0) ? bounds.h : bounds.h * usable / bounds.w;
|
|
325
367
|
const h = Math.max(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EdgeSpatialIndex,
|
|
3
3
|
SpatialIndex
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7YSIP3O2.js";
|
|
5
5
|
import {
|
|
6
6
|
weakMemo
|
|
7
7
|
} from "./chunk-HMXCN6PG.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
pathRibbonOffsets,
|
|
10
10
|
translateCurves,
|
|
11
11
|
yToXOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JJV2GT2Z.js";
|
|
13
13
|
|
|
14
14
|
// src/util/hitDetection.ts
|
|
15
15
|
function distanceToSegment(px, py, x1, y1, x2, y2) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseEdgeCurves
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P2GJBFNA.js";
|
|
4
4
|
import {
|
|
5
5
|
curveBounds,
|
|
6
6
|
pathRibbonOffsets
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JJV2GT2Z.js";
|
|
8
8
|
|
|
9
9
|
// src/util/SpatialIndex.ts
|
|
10
10
|
var FALLBACK_CELL_SIZE = 50;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
hasTubeMapPaths,
|
|
4
4
|
tubeMapLayout,
|
|
5
5
|
tubeMapReferenceLayout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BDS5VZYZ.js";
|
|
7
7
|
import {
|
|
8
8
|
sampleRowLayout
|
|
9
9
|
} from "./chunk-XR2HMGAS.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-UAFATXYA.js";
|
|
16
16
|
import {
|
|
17
17
|
walkRowLayout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VCUOYVLC.js";
|
|
19
19
|
import {
|
|
20
20
|
isBackbone,
|
|
21
21
|
isOffReference
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
} from "./chunk-AB35TJST.js";
|
|
8
8
|
import {
|
|
9
9
|
polylineMidpoint
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HNNP5QUN.js";
|
|
11
11
|
import {
|
|
12
12
|
edgeCurvesOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3GORESBG.js";
|
|
14
14
|
import {
|
|
15
15
|
curveBounds,
|
|
16
16
|
curveMidpoint,
|
|
17
17
|
polylinePx
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JJV2GT2Z.js";
|
|
19
19
|
|
|
20
20
|
// src/graphLabels.ts
|
|
21
21
|
var MIN_DELETION_LABEL_PX = 26;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stepName,
|
|
3
3
|
tubeMapReads
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KKHXMJEE.js";
|
|
5
5
|
import {
|
|
6
6
|
referenceWalkName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LODKC7PJ.js";
|
|
8
8
|
import {
|
|
9
9
|
pathCssColor,
|
|
10
10
|
pathGreyCssColor
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VQ353UDK.js";
|
|
12
12
|
import {
|
|
13
13
|
pathOrigin
|
|
14
14
|
} from "./chunk-3YBP46PB.js";
|
|
15
15
|
import {
|
|
16
16
|
ownStrand,
|
|
17
17
|
strandSides
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JJV2GT2Z.js";
|
|
19
19
|
import {
|
|
20
20
|
groupBy
|
|
21
21
|
} from "./chunk-BSOZW3FC.js";
|