@jbrowse/bandage-core 7.0.0 → 7.1.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/chunks/{chunk-7PWMTUAK.js → chunk-2WA4EY25.js} +9 -8
- package/dist/chunks/{chunk-EZPBJPK6.js → chunk-3JANT2SW.js} +6 -3
- package/dist/chunks/{chunk-WEMKWLDF.js → chunk-JKXE6CIP.js} +1 -1
- package/dist/chunks/{chunk-MZ7QQRUJ.js → chunk-KREASK3Z.js} +7 -13
- package/dist/chunks/{chunk-EOSVRILX.js → chunk-MAPRJ2H2.js} +1 -1
- package/dist/chunks/{chunk-JFNPL4UT.js → chunk-UGD6ZMOF.js} +29 -4
- package/dist/cli/figure.js +6 -6
- package/dist/figure.js +5 -5
- package/dist/index.js +15 -7
- package/dist/layout/walkRowDraw.js +11 -1
- package/dist/layout/walkRowLayout.js +1 -1
- package/dist/layout/walkStrip.js +4 -3
- package/dist/layoutModes.js +2 -2
- package/dist/types/figure.d.ts +2 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/layout/walkRowDraw.d.ts +11 -0
- package/dist/types/layout/walkRowLayout.d.ts +2 -1
- package/dist/types/layout/walkStrip.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
stripGeneGaps,
|
|
6
6
|
walkStripFrame,
|
|
7
7
|
walkStripLabelsTree
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KREASK3Z.js";
|
|
9
9
|
import {
|
|
10
10
|
walkRowsKey,
|
|
11
11
|
walkRowsKeyTree,
|
|
12
12
|
walkRowsTree
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UGD6ZMOF.js";
|
|
14
14
|
import {
|
|
15
15
|
Canvas2DRenderer
|
|
16
16
|
} from "./chunk-CH3DLBUT.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-BUBZ32IC.js";
|
|
25
25
|
import {
|
|
26
26
|
version
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MAPRJ2H2.js";
|
|
28
28
|
import {
|
|
29
29
|
axisScaleOf
|
|
30
30
|
} from "./chunk-AWCMVPVP.js";
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
} from "./chunk-FP4H7SFT.js";
|
|
60
60
|
import {
|
|
61
61
|
walkRowsExtent
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-3JANT2SW.js";
|
|
63
63
|
import {
|
|
64
64
|
pathLegend
|
|
65
65
|
} from "./chunk-E7FWQQHP.js";
|
|
@@ -154,7 +154,7 @@ function figureSvg(graph, layout, o = {}) {
|
|
|
154
154
|
const rows = o.walkRows;
|
|
155
155
|
const bounds = drawingBounds(layout, {
|
|
156
156
|
region: o.fitToDrawing ? void 0 : region,
|
|
157
|
-
extent: rows && layout.extent ? walkRowsExtent(rows) : void 0
|
|
157
|
+
extent: rows && layout.extent ? walkRowsExtent(rows, o.walkRowPitch) : void 0
|
|
158
158
|
});
|
|
159
159
|
const pixelRows = layout.pixelRows ?? false;
|
|
160
160
|
const nodeById = new Map(graph.nodes.map((node) => [node.id, node]));
|
|
@@ -226,7 +226,7 @@ function figureSvg(graph, layout, o = {}) {
|
|
|
226
226
|
serializeEl(
|
|
227
227
|
walkRowsTree(
|
|
228
228
|
rows,
|
|
229
|
-
{ ...t, width: w, height: h },
|
|
229
|
+
{ ...t, width: w, height: h, ...o.walkRowPitch },
|
|
230
230
|
{
|
|
231
231
|
ramp: rampInterval,
|
|
232
232
|
rowGenes: o.rowGenes
|
|
@@ -235,9 +235,10 @@ function figureSvg(graph, layout, o = {}) {
|
|
|
235
235
|
)
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
const
|
|
238
|
+
const pitch = o.walkRowPitch;
|
|
239
|
+
const rowLabels = rows ? pitch && !pitch.labelled ? [] : [rows.reference, ...rows.rows].map((r, i) => ({
|
|
239
240
|
label: r.label,
|
|
240
|
-
y: i * ROW_HEIGHT_PX
|
|
241
|
+
y: i * (pitch?.rowPx ?? ROW_HEIGHT_PX)
|
|
241
242
|
})) : layout.rowLabels ?? [];
|
|
242
243
|
for (const { label, y } of rowLabels) {
|
|
243
244
|
const sy = y * t.scaleY + t.translateY;
|
|
@@ -12,14 +12,17 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// src/layout/walkRowLayout.ts
|
|
14
14
|
var READOUT_ROOM = 1.3;
|
|
15
|
-
function walkRowsExtent(walks
|
|
15
|
+
function walkRowsExtent(walks, pitch = {
|
|
16
|
+
rowPx: ROW_HEIGHT_PX,
|
|
17
|
+
readouts: true
|
|
18
|
+
}) {
|
|
16
19
|
let longest = walks.reference.bp;
|
|
17
20
|
for (const row of walks.rows) {
|
|
18
21
|
longest = Math.max(longest, row.bp);
|
|
19
22
|
}
|
|
20
23
|
return {
|
|
21
|
-
maxX: walks.origin + longest * READOUT_ROOM,
|
|
22
|
-
maxY: walks.rows.length *
|
|
24
|
+
maxX: walks.origin + longest * (pitch.readouts ? READOUT_ROOM : 1),
|
|
25
|
+
maxY: walks.rows.length * pitch.rowPx
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
function walkRowLayout(graph, region) {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
alongRow,
|
|
3
|
-
boxesGenes
|
|
4
|
-
|
|
3
|
+
boxesGenes,
|
|
4
|
+
rowPitch
|
|
5
|
+
} from "./chunk-UGD6ZMOF.js";
|
|
5
6
|
import {
|
|
6
7
|
pathOrigin
|
|
7
8
|
} from "./chunk-ST2IBUAN.js";
|
|
8
9
|
import {
|
|
9
10
|
LABEL_CHAR_PX
|
|
10
11
|
} from "./chunk-AB35TJST.js";
|
|
11
|
-
import {
|
|
12
|
-
ROW_HEIGHT_PX
|
|
13
|
-
} from "./chunk-CPMHA4W5.js";
|
|
14
12
|
import {
|
|
15
13
|
el
|
|
16
14
|
} from "./chunk-NNODIW4U.js";
|
|
@@ -20,7 +18,6 @@ var PAD_PX = 6;
|
|
|
20
18
|
var WALK_STRIP_CEILING_PX = 260;
|
|
21
19
|
var LABEL_FONT_PX = 11;
|
|
22
20
|
var MIN_ROW_PX = 3;
|
|
23
|
-
var LABELLED_ROW_PX = 12;
|
|
24
21
|
var READOUT_ROOM = 1.3;
|
|
25
22
|
var MARK_INK = "#111";
|
|
26
23
|
var TICK_PX = 3;
|
|
@@ -113,13 +110,11 @@ function walkStripFrame(bars, o) {
|
|
|
113
110
|
const maxHeight = o.maxHeight ?? WALK_STRIP_CEILING_PX;
|
|
114
111
|
const labelPx = o.labelPx ?? Math.max(...[bars.reference, ...bars.rows].map((r) => r.label.length)) * LABEL_CHAR_PX + 16;
|
|
115
112
|
const count = bars.rows.length + 1;
|
|
116
|
-
const rowPx =
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
const { rowPx, barPx, labelled, readouts } = rowPitch(
|
|
114
|
+
count,
|
|
115
|
+
maxHeight - 2 * PAD_PX,
|
|
116
|
+
MIN_ROW_PX
|
|
119
117
|
);
|
|
120
|
-
const labelled = rowPx >= LABELLED_ROW_PX;
|
|
121
|
-
const readouts = rowPx >= 14;
|
|
122
|
-
const barPx = Math.max(2, Math.round(rowPx * 0.6));
|
|
123
118
|
const longest = Math.max(bars.reference.bp, ...bars.rows.map((r) => r.bp), 1);
|
|
124
119
|
const left = labelled ? labelPx : PAD_PX;
|
|
125
120
|
const usable = Math.max(1, o.width - left - PAD_PX);
|
|
@@ -194,7 +189,6 @@ function stripGeneGaps(frame, rowGenes, gaps) {
|
|
|
194
189
|
|
|
195
190
|
export {
|
|
196
191
|
WALK_STRIP_CEILING_PX,
|
|
197
|
-
LABELLED_ROW_PX,
|
|
198
192
|
stripMarks,
|
|
199
193
|
segmentAt,
|
|
200
194
|
walkStripFrame,
|
|
@@ -24,6 +24,9 @@ var OUTSIDE_CUT = "#bdbdbd";
|
|
|
24
24
|
var GENE_INK = "#1c1c22";
|
|
25
25
|
var BAR_PX = 12;
|
|
26
26
|
var GAP_PX = 4;
|
|
27
|
+
var LABELLED_ROW_PX = 12;
|
|
28
|
+
var READOUT_ROW_PX = 14;
|
|
29
|
+
var MIN_TILED_BAR_PX = 6;
|
|
27
30
|
var MIN_TILE_PX = 3;
|
|
28
31
|
function kb(bp) {
|
|
29
32
|
return `${(bp / 1e3).toFixed(bp < 1e4 ? 1 : 0)} kb`;
|
|
@@ -209,6 +212,9 @@ function walkRowsKey(bars, o = {}) {
|
|
|
209
212
|
var CALL_TICK = "#111";
|
|
210
213
|
var UNBACKED_TICK = "#9e9e9e";
|
|
211
214
|
var DISAGREES = "#c62828";
|
|
215
|
+
function callTickInk(call) {
|
|
216
|
+
return call.agrees === false ? DISAGREES : call.spanningReads === 0 ? UNBACKED_TICK : CALL_TICK;
|
|
217
|
+
}
|
|
212
218
|
function walkRowsKeyTree(entries, x, y, idPrefix = "walk-key") {
|
|
213
219
|
let at = 0;
|
|
214
220
|
const parts = entries.flatMap((e, i) => {
|
|
@@ -262,6 +268,19 @@ function walkRowsKeyTree(entries, x, y, idPrefix = "walk-key") {
|
|
|
262
268
|
)
|
|
263
269
|
};
|
|
264
270
|
}
|
|
271
|
+
function rowPitch(count, room, minRowPx = 0) {
|
|
272
|
+
const fit = room / Math.max(1, count);
|
|
273
|
+
const rowPx = Math.max(
|
|
274
|
+
minRowPx,
|
|
275
|
+
Math.min(ROW_HEIGHT_PX, fit >= 1 ? Math.floor(fit) : fit)
|
|
276
|
+
);
|
|
277
|
+
return {
|
|
278
|
+
rowPx,
|
|
279
|
+
barPx: rowPx <= 3 ? rowPx : Math.max(3, Math.round(rowPx * 0.6)),
|
|
280
|
+
labelled: rowPx >= LABELLED_ROW_PX,
|
|
281
|
+
readouts: rowPx >= READOUT_ROW_PX
|
|
282
|
+
};
|
|
283
|
+
}
|
|
265
284
|
function coalesceRuns(runs, pxPerBp) {
|
|
266
285
|
const minBp = 1 / pxPerBp;
|
|
267
286
|
const out = [];
|
|
@@ -358,6 +377,7 @@ function walkRowsTree(bars, frame, o = {}) {
|
|
|
358
377
|
const X = (bp) => bp * frame.scaleX + frame.translateX;
|
|
359
378
|
const rowPx = frame.rowPx ?? ROW_HEIGHT_PX;
|
|
360
379
|
const barPx = frame.barPx ?? BAR_PX;
|
|
380
|
+
const overhang = Math.min(3, Math.max(0, (rowPx - barPx) / 2));
|
|
361
381
|
const Y = (row) => row * rowPx * frame.scaleY + frame.translateY;
|
|
362
382
|
const { origin, unit, reference, rows } = bars;
|
|
363
383
|
const along = (offset) => X(origin + offset);
|
|
@@ -392,7 +412,7 @@ function walkRowsTree(bars, frame, o = {}) {
|
|
|
392
412
|
rect
|
|
393
413
|
] : [rect];
|
|
394
414
|
});
|
|
395
|
-
const ticks = unit ? unitTicks(row.bp, unit, frame.scaleX).map(
|
|
415
|
+
const ticks = unit && barPx >= MIN_TILED_BAR_PX ? unitTicks(row.bp, unit, frame.scaleX).map(
|
|
396
416
|
(k) => el("line", {
|
|
397
417
|
x1: along(k),
|
|
398
418
|
x2: along(k),
|
|
@@ -425,10 +445,10 @@ function walkRowsTree(bars, frame, o = {}) {
|
|
|
425
445
|
call && el("rect", {
|
|
426
446
|
"data-testid": "graph-walk-call",
|
|
427
447
|
x: along(call.bp) - 1,
|
|
428
|
-
y: y - barPx / 2 -
|
|
448
|
+
y: y - barPx / 2 - overhang,
|
|
429
449
|
width: 2,
|
|
430
|
-
height: barPx +
|
|
431
|
-
fill: call
|
|
450
|
+
height: barPx + 2 * overhang,
|
|
451
|
+
fill: callTickInk(call)
|
|
432
452
|
}),
|
|
433
453
|
readouts && el(
|
|
434
454
|
"text",
|
|
@@ -457,6 +477,7 @@ export {
|
|
|
457
477
|
GENE_INK,
|
|
458
478
|
BAR_PX,
|
|
459
479
|
GAP_PX,
|
|
480
|
+
LABELLED_ROW_PX,
|
|
460
481
|
kb,
|
|
461
482
|
walkRowReadout,
|
|
462
483
|
readoutPlacement,
|
|
@@ -469,8 +490,12 @@ export {
|
|
|
469
490
|
boxesGenes,
|
|
470
491
|
rowGeneBoxes,
|
|
471
492
|
walkRowsKey,
|
|
493
|
+
CALL_TICK,
|
|
494
|
+
UNBACKED_TICK,
|
|
472
495
|
DISAGREES,
|
|
496
|
+
callTickInk,
|
|
473
497
|
walkRowsKeyTree,
|
|
498
|
+
rowPitch,
|
|
474
499
|
coalesceRuns,
|
|
475
500
|
walkRowsTree
|
|
476
501
|
};
|
package/dist/cli/figure.js
CHANGED
|
@@ -11,7 +11,7 @@ import "../chunks/chunk-O4TGF4WS.js";
|
|
|
11
11
|
import {
|
|
12
12
|
LAYOUT_MODES,
|
|
13
13
|
layoutModeByValue
|
|
14
|
-
} from "../chunks/chunk-
|
|
14
|
+
} from "../chunks/chunk-JKXE6CIP.js";
|
|
15
15
|
import "../chunks/chunk-4FQTTG5F.js";
|
|
16
16
|
import "../chunks/chunk-TEDQJPMI.js";
|
|
17
17
|
import "../chunks/chunk-LOEA5IHZ.js";
|
|
@@ -23,18 +23,18 @@ import "../chunks/chunk-C44YRP5F.js";
|
|
|
23
23
|
import "../chunks/chunk-7XHHVYG7.js";
|
|
24
24
|
import {
|
|
25
25
|
figureSvg
|
|
26
|
-
} from "../chunks/chunk-
|
|
26
|
+
} from "../chunks/chunk-2WA4EY25.js";
|
|
27
27
|
import "../chunks/chunk-47DYCZOK.js";
|
|
28
|
-
import "../chunks/chunk-
|
|
28
|
+
import "../chunks/chunk-KREASK3Z.js";
|
|
29
29
|
import {
|
|
30
30
|
genesOnRow,
|
|
31
31
|
placeRowGenes
|
|
32
|
-
} from "../chunks/chunk-
|
|
32
|
+
} from "../chunks/chunk-UGD6ZMOF.js";
|
|
33
33
|
import "../chunks/chunk-CH3DLBUT.js";
|
|
34
34
|
import "../chunks/chunk-4BYTEJGW.js";
|
|
35
35
|
import "../chunks/chunk-3S3YVOJ7.js";
|
|
36
36
|
import "../chunks/chunk-BUBZ32IC.js";
|
|
37
|
-
import "../chunks/chunk-
|
|
37
|
+
import "../chunks/chunk-MAPRJ2H2.js";
|
|
38
38
|
import "../chunks/chunk-AWCMVPVP.js";
|
|
39
39
|
import "../chunks/chunk-MH5IA57M.js";
|
|
40
40
|
import "../chunks/chunk-TQ7VCGJR.js";
|
|
@@ -57,7 +57,7 @@ import "../chunks/chunk-GJMC3PGM.js";
|
|
|
57
57
|
import "../chunks/chunk-FP4H7SFT.js";
|
|
58
58
|
import "../chunks/chunk-MLSWIMZO.js";
|
|
59
59
|
import "../chunks/chunk-WFB5TXRA.js";
|
|
60
|
-
import "../chunks/chunk-
|
|
60
|
+
import "../chunks/chunk-3JANT2SW.js";
|
|
61
61
|
import {
|
|
62
62
|
filterSamples,
|
|
63
63
|
walkRows
|
package/dist/figure.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
figureSvg
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-2WA4EY25.js";
|
|
4
4
|
import "./chunks/chunk-47DYCZOK.js";
|
|
5
|
-
import "./chunks/chunk-
|
|
6
|
-
import "./chunks/chunk-
|
|
5
|
+
import "./chunks/chunk-KREASK3Z.js";
|
|
6
|
+
import "./chunks/chunk-UGD6ZMOF.js";
|
|
7
7
|
import "./chunks/chunk-CH3DLBUT.js";
|
|
8
8
|
import "./chunks/chunk-4BYTEJGW.js";
|
|
9
9
|
import "./chunks/chunk-3S3YVOJ7.js";
|
|
10
10
|
import "./chunks/chunk-BUBZ32IC.js";
|
|
11
|
-
import "./chunks/chunk-
|
|
11
|
+
import "./chunks/chunk-MAPRJ2H2.js";
|
|
12
12
|
import "./chunks/chunk-AWCMVPVP.js";
|
|
13
13
|
import "./chunks/chunk-MH5IA57M.js";
|
|
14
14
|
import "./chunks/chunk-TQ7VCGJR.js";
|
|
@@ -28,7 +28,7 @@ import "./chunks/chunk-GJMC3PGM.js";
|
|
|
28
28
|
import "./chunks/chunk-FP4H7SFT.js";
|
|
29
29
|
import "./chunks/chunk-MLSWIMZO.js";
|
|
30
30
|
import "./chunks/chunk-WFB5TXRA.js";
|
|
31
|
-
import "./chunks/chunk-
|
|
31
|
+
import "./chunks/chunk-3JANT2SW.js";
|
|
32
32
|
import "./chunks/chunk-SZNZ2T6D.js";
|
|
33
33
|
import "./chunks/chunk-E7FWQQHP.js";
|
|
34
34
|
import "./chunks/chunk-ES2N6V56.js";
|
package/dist/index.js
CHANGED
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
LAYOUT_MODES,
|
|
74
74
|
layoutModeByValue,
|
|
75
75
|
modeUsesLayoutEngine
|
|
76
|
-
} from "./chunks/chunk-
|
|
76
|
+
} from "./chunks/chunk-JKXE6CIP.js";
|
|
77
77
|
import "./chunks/chunk-4FQTTG5F.js";
|
|
78
78
|
import "./chunks/chunk-TEDQJPMI.js";
|
|
79
79
|
import "./chunks/chunk-LOEA5IHZ.js";
|
|
@@ -87,12 +87,11 @@ import {
|
|
|
87
87
|
} from "./chunks/chunk-7XHHVYG7.js";
|
|
88
88
|
import {
|
|
89
89
|
figureSvg
|
|
90
|
-
} from "./chunks/chunk-
|
|
90
|
+
} from "./chunks/chunk-2WA4EY25.js";
|
|
91
91
|
import {
|
|
92
92
|
svgCanvas
|
|
93
93
|
} from "./chunks/chunk-47DYCZOK.js";
|
|
94
94
|
import {
|
|
95
|
-
LABELLED_ROW_PX,
|
|
96
95
|
WALK_STRIP_CEILING_PX,
|
|
97
96
|
segmentAt,
|
|
98
97
|
stripGeneGaps,
|
|
@@ -101,21 +100,26 @@ import {
|
|
|
101
100
|
walkMarksTree,
|
|
102
101
|
walkStripFrame,
|
|
103
102
|
walkStripLabelsTree
|
|
104
|
-
} from "./chunks/chunk-
|
|
103
|
+
} from "./chunks/chunk-KREASK3Z.js";
|
|
105
104
|
import {
|
|
106
105
|
BAR_PX,
|
|
106
|
+
CALL_TICK,
|
|
107
107
|
DISAGREES,
|
|
108
108
|
GAP_PX,
|
|
109
109
|
GENE_INK,
|
|
110
|
+
LABELLED_ROW_PX,
|
|
110
111
|
OFF_REFERENCE,
|
|
111
112
|
ON_REFERENCE,
|
|
112
113
|
OUTSIDE_CUT,
|
|
114
|
+
UNBACKED_TICK,
|
|
113
115
|
alongRow,
|
|
116
|
+
callTickInk,
|
|
114
117
|
coalesceRuns,
|
|
115
118
|
genesOnRow,
|
|
116
119
|
placeRowGenes,
|
|
117
120
|
readoutPlacement,
|
|
118
121
|
rowGeneBoxes,
|
|
122
|
+
rowPitch,
|
|
119
123
|
rowSpan,
|
|
120
124
|
runPaint,
|
|
121
125
|
unitTicks,
|
|
@@ -123,7 +127,7 @@ import {
|
|
|
123
127
|
walkRowsKey,
|
|
124
128
|
walkRowsKeyTree,
|
|
125
129
|
walkRowsTree
|
|
126
|
-
} from "./chunks/chunk-
|
|
130
|
+
} from "./chunks/chunk-UGD6ZMOF.js";
|
|
127
131
|
import {
|
|
128
132
|
Canvas2DRenderer
|
|
129
133
|
} from "./chunks/chunk-CH3DLBUT.js";
|
|
@@ -140,7 +144,7 @@ import {
|
|
|
140
144
|
} from "./chunks/chunk-BUBZ32IC.js";
|
|
141
145
|
import {
|
|
142
146
|
version
|
|
143
|
-
} from "./chunks/chunk-
|
|
147
|
+
} from "./chunks/chunk-MAPRJ2H2.js";
|
|
144
148
|
import {
|
|
145
149
|
axisScaleOf,
|
|
146
150
|
contains,
|
|
@@ -217,7 +221,7 @@ import "./chunks/chunk-MLSWIMZO.js";
|
|
|
217
221
|
import "./chunks/chunk-WFB5TXRA.js";
|
|
218
222
|
import {
|
|
219
223
|
walkRowsExtent
|
|
220
|
-
} from "./chunks/chunk-
|
|
224
|
+
} from "./chunks/chunk-3JANT2SW.js";
|
|
221
225
|
import {
|
|
222
226
|
filterSamples,
|
|
223
227
|
walkRows
|
|
@@ -322,6 +326,7 @@ export {
|
|
|
322
326
|
REFERENCE_STRIP_ZONE_PX,
|
|
323
327
|
ROW_HEIGHT_PX,
|
|
324
328
|
BAR_PX as WALK_BAR_PX,
|
|
329
|
+
CALL_TICK as WALK_CALL_TICK,
|
|
325
330
|
DISAGREES as WALK_DISAGREES,
|
|
326
331
|
WALK_FIELDS,
|
|
327
332
|
GAP_PX as WALK_GAP_PX,
|
|
@@ -331,6 +336,7 @@ export {
|
|
|
331
336
|
OUTSIDE_CUT as WALK_OUTSIDE_CUT,
|
|
332
337
|
WALK_SCHEMES,
|
|
333
338
|
WALK_STRIP_CEILING_PX,
|
|
339
|
+
UNBACKED_TICK as WALK_UNBACKED_TICK,
|
|
334
340
|
WELL_KNOWN_SAMPLES,
|
|
335
341
|
alongRow,
|
|
336
342
|
assemblyWalk,
|
|
@@ -341,6 +347,7 @@ export {
|
|
|
341
347
|
bubbleSubgraph,
|
|
342
348
|
bubblesFromGraph,
|
|
343
349
|
buildGeometry,
|
|
350
|
+
callTickInk,
|
|
344
351
|
clampZoom,
|
|
345
352
|
classifyBubble,
|
|
346
353
|
coalesceRuns,
|
|
@@ -423,6 +430,7 @@ export {
|
|
|
423
430
|
resolveEncoding,
|
|
424
431
|
resolveReferenceSample,
|
|
425
432
|
rowGeneBoxes,
|
|
433
|
+
rowPitch,
|
|
426
434
|
rowSpan,
|
|
427
435
|
rulerBoxes,
|
|
428
436
|
runPaint,
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BAR_PX,
|
|
3
|
+
CALL_TICK,
|
|
3
4
|
DISAGREES,
|
|
4
5
|
GAP_PX,
|
|
5
6
|
GENE_INK,
|
|
7
|
+
LABELLED_ROW_PX,
|
|
6
8
|
OFF_REFERENCE,
|
|
7
9
|
ON_REFERENCE,
|
|
8
10
|
OUTSIDE_CUT,
|
|
11
|
+
UNBACKED_TICK,
|
|
9
12
|
alongRow,
|
|
10
13
|
boxesGenes,
|
|
14
|
+
callTickInk,
|
|
11
15
|
coalesceRuns,
|
|
12
16
|
genesOnRow,
|
|
13
17
|
kb,
|
|
14
18
|
placeRowGenes,
|
|
15
19
|
readoutPlacement,
|
|
16
20
|
rowGeneBoxes,
|
|
21
|
+
rowPitch,
|
|
17
22
|
rowSpan,
|
|
18
23
|
runPaint,
|
|
19
24
|
unitTicks,
|
|
@@ -21,7 +26,7 @@ import {
|
|
|
21
26
|
walkRowsKey,
|
|
22
27
|
walkRowsKeyTree,
|
|
23
28
|
walkRowsTree
|
|
24
|
-
} from "../chunks/chunk-
|
|
29
|
+
} from "../chunks/chunk-UGD6ZMOF.js";
|
|
25
30
|
import "../chunks/chunk-VECR253P.js";
|
|
26
31
|
import "../chunks/chunk-VST5SR4C.js";
|
|
27
32
|
import "../chunks/chunk-UMNCCYBN.js";
|
|
@@ -41,20 +46,25 @@ import "../chunks/chunk-BPLIXMH7.js";
|
|
|
41
46
|
import "../chunks/chunk-FYQWPEEY.js";
|
|
42
47
|
export {
|
|
43
48
|
BAR_PX,
|
|
49
|
+
CALL_TICK,
|
|
44
50
|
DISAGREES,
|
|
45
51
|
GAP_PX,
|
|
46
52
|
GENE_INK,
|
|
53
|
+
LABELLED_ROW_PX,
|
|
47
54
|
OFF_REFERENCE,
|
|
48
55
|
ON_REFERENCE,
|
|
49
56
|
OUTSIDE_CUT,
|
|
57
|
+
UNBACKED_TICK,
|
|
50
58
|
alongRow,
|
|
51
59
|
boxesGenes,
|
|
60
|
+
callTickInk,
|
|
52
61
|
coalesceRuns,
|
|
53
62
|
genesOnRow,
|
|
54
63
|
kb,
|
|
55
64
|
placeRowGenes,
|
|
56
65
|
readoutPlacement,
|
|
57
66
|
rowGeneBoxes,
|
|
67
|
+
rowPitch,
|
|
58
68
|
rowSpan,
|
|
59
69
|
runPaint,
|
|
60
70
|
unitTicks,
|
package/dist/layout/walkStrip.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
LABELLED_ROW_PX,
|
|
3
2
|
WALK_STRIP_CEILING_PX,
|
|
4
3
|
segmentAt,
|
|
5
4
|
stripGeneGaps,
|
|
@@ -8,8 +7,10 @@ import {
|
|
|
8
7
|
walkMarksTree,
|
|
9
8
|
walkStripFrame,
|
|
10
9
|
walkStripLabelsTree
|
|
11
|
-
} from "../chunks/chunk-
|
|
12
|
-
import
|
|
10
|
+
} from "../chunks/chunk-KREASK3Z.js";
|
|
11
|
+
import {
|
|
12
|
+
LABELLED_ROW_PX
|
|
13
|
+
} from "../chunks/chunk-UGD6ZMOF.js";
|
|
13
14
|
import "../chunks/chunk-VECR253P.js";
|
|
14
15
|
import "../chunks/chunk-VST5SR4C.js";
|
|
15
16
|
import "../chunks/chunk-UMNCCYBN.js";
|
package/dist/layoutModes.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
LAYOUT_MODE_VALUES,
|
|
5
5
|
layoutModeByValue,
|
|
6
6
|
modeUsesLayoutEngine
|
|
7
|
-
} from "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-JKXE6CIP.js";
|
|
8
8
|
import "./chunks/chunk-4FQTTG5F.js";
|
|
9
9
|
import "./chunks/chunk-TEDQJPMI.js";
|
|
10
10
|
import "./chunks/chunk-LOEA5IHZ.js";
|
|
@@ -13,7 +13,7 @@ import "./chunks/chunk-TZFWUT2C.js";
|
|
|
13
13
|
import "./chunks/chunk-RVS2QCOX.js";
|
|
14
14
|
import "./chunks/chunk-HNQPEMYE.js";
|
|
15
15
|
import "./chunks/chunk-C44YRP5F.js";
|
|
16
|
-
import "./chunks/chunk-
|
|
16
|
+
import "./chunks/chunk-3JANT2SW.js";
|
|
17
17
|
import "./chunks/chunk-SZNZ2T6D.js";
|
|
18
18
|
import "./chunks/chunk-E7FWQQHP.js";
|
|
19
19
|
import "./chunks/chunk-ES2N6V56.js";
|
package/dist/types/figure.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ColorScheme } from './colorSchemes.js';
|
|
2
2
|
import type { FacetInput } from './facetGrid.js';
|
|
3
3
|
import type { GeneModel } from './genes/genePins.js';
|
|
4
|
-
import type { GeneGaps, RowGene, WalkRowsWithCalls } from './layout/walkRowDraw.js';
|
|
4
|
+
import type { GeneGaps, RowGene, RowPitch, WalkRowsWithCalls } from './layout/walkRowDraw.js';
|
|
5
5
|
import type { WalkRows } from './layout/walkRows.js';
|
|
6
6
|
import type { NodeWidth } from './nodeWidths.js';
|
|
7
7
|
import type { Graph, LayoutResult } from './types.js';
|
|
@@ -30,6 +30,7 @@ export interface FigureOptions {
|
|
|
30
30
|
genes?: GeneModel[];
|
|
31
31
|
spec?: unknown;
|
|
32
32
|
walkRows?: WalkRowsWithCalls;
|
|
33
|
+
walkRowPitch?: RowPitch;
|
|
33
34
|
rowGenes?: Map<string, RowGene[]>;
|
|
34
35
|
rowGeneGaps?: GeneGaps;
|
|
35
36
|
walkStrip?: {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ export { bubbleSubgraph } from './bubbles/popBubble.js';
|
|
|
59
59
|
export type { MinigraphBubble } from './bubbles/bubbleLine.js';
|
|
60
60
|
export { filterSamples, walkRows } from './layout/walkRows.js';
|
|
61
61
|
export type { WalkAxis, WalkRow, WalkRows, WalkRun } from './layout/walkRows.js';
|
|
62
|
-
export { BAR_PX as WALK_BAR_PX, DISAGREES as WALK_DISAGREES, GAP_PX as WALK_GAP_PX, GENE_INK as WALK_GENE_INK, OFF_REFERENCE as WALK_OFF_REFERENCE, ON_REFERENCE as WALK_ON_REFERENCE, OUTSIDE_CUT as WALK_OUTSIDE_CUT, alongRow, coalesceRuns, genesOnRow, placeRowGenes, readoutPlacement, rowGeneBoxes, rowSpan, runPaint, unitTicks, walkRowReadout, walkRowsKey, walkRowsKeyTree, walkRowsTree, } from './layout/walkRowDraw.js';
|
|
63
|
-
export type { GeneBox, GeneGaps, KeyEntry, KeySwatch, ReadoutCall, RowGene, WalkRowsFrame, WalkRowsWithCalls, } from './layout/walkRowDraw.js';
|
|
62
|
+
export { BAR_PX as WALK_BAR_PX, CALL_TICK as WALK_CALL_TICK, DISAGREES as WALK_DISAGREES, GAP_PX as WALK_GAP_PX, GENE_INK as WALK_GENE_INK, OFF_REFERENCE as WALK_OFF_REFERENCE, ON_REFERENCE as WALK_ON_REFERENCE, OUTSIDE_CUT as WALK_OUTSIDE_CUT, UNBACKED_TICK as WALK_UNBACKED_TICK, alongRow, callTickInk, coalesceRuns, genesOnRow, placeRowGenes, readoutPlacement, rowGeneBoxes, rowPitch, rowSpan, runPaint, unitTicks, walkRowReadout, walkRowsKey, walkRowsKeyTree, walkRowsTree, } from './layout/walkRowDraw.js';
|
|
63
|
+
export type { GeneBox, GeneGaps, KeyEntry, KeySwatch, ReadoutCall, RowGene, RowPitch, WalkRowsFrame, WalkRowsWithCalls, } from './layout/walkRowDraw.js';
|
|
64
64
|
export { LABELLED_ROW_PX, WALK_STRIP_CEILING_PX, segmentAt, stripGeneGaps, stripMarks, stripRowAt, walkMarksTree, walkStripFrame, walkStripLabelsTree, } from './layout/walkStrip.js';
|
|
65
65
|
export type { StripFrame, StripMark } from './layout/walkStrip.js';
|
|
66
66
|
export { el, serializeEl } from './el.js';
|
|
@@ -7,6 +7,7 @@ export declare const OUTSIDE_CUT = "#bdbdbd";
|
|
|
7
7
|
export declare const GENE_INK = "#1c1c22";
|
|
8
8
|
export declare const BAR_PX = 12;
|
|
9
9
|
export declare const GAP_PX = 4;
|
|
10
|
+
export declare const LABELLED_ROW_PX = 12;
|
|
10
11
|
export declare function kb(bp: number): string;
|
|
11
12
|
export interface ReadoutCall {
|
|
12
13
|
bp: number;
|
|
@@ -109,11 +110,21 @@ export type WalkRowsWithCalls = Omit<WalkRows, 'reference' | 'rows'> & {
|
|
|
109
110
|
call?: ReadoutCall;
|
|
110
111
|
})[];
|
|
111
112
|
};
|
|
113
|
+
export declare const CALL_TICK = "#111";
|
|
114
|
+
export declare const UNBACKED_TICK = "#9e9e9e";
|
|
112
115
|
export declare const DISAGREES = "#c62828";
|
|
116
|
+
export declare function callTickInk(call: ReadoutCall): "#111" | "#9e9e9e" | "#c62828";
|
|
113
117
|
export declare function walkRowsKeyTree(entries: KeyEntry[], x: number, y: number, idPrefix?: string): {
|
|
114
118
|
width: number;
|
|
115
119
|
tree: El;
|
|
116
120
|
};
|
|
121
|
+
export interface RowPitch {
|
|
122
|
+
rowPx: number;
|
|
123
|
+
barPx: number;
|
|
124
|
+
labelled: boolean;
|
|
125
|
+
readouts: boolean;
|
|
126
|
+
}
|
|
127
|
+
export declare function rowPitch(count: number, room: number, minRowPx?: number): RowPitch;
|
|
117
128
|
export interface WalkRowsFrame {
|
|
118
129
|
scaleX: number;
|
|
119
130
|
scaleY: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { RowPitch } from './walkRowDraw.js';
|
|
1
2
|
import type { WalkRows } from './walkRows.js';
|
|
2
3
|
import type { Graph, LayoutResult } from '../types.js';
|
|
3
|
-
export declare function walkRowsExtent(walks: WalkRows): {
|
|
4
|
+
export declare function walkRowsExtent(walks: WalkRows, pitch?: Pick<RowPitch, 'rowPx' | 'readouts'>): {
|
|
4
5
|
maxX: number;
|
|
5
6
|
maxY: number;
|
|
6
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { GeneGaps, RowGene, WalkRowsFrame } from './walkRowDraw.js';
|
|
2
2
|
import type { WalkRow, WalkRows } from './walkRows.js';
|
|
3
3
|
import type { Graph, GraphNode } from '../types.js';
|
|
4
|
+
export { LABELLED_ROW_PX } from './walkRowDraw.js';
|
|
4
5
|
export declare const WALK_STRIP_CEILING_PX = 260;
|
|
5
|
-
export declare const LABELLED_ROW_PX = 12;
|
|
6
6
|
export interface StripMark {
|
|
7
7
|
row: string;
|
|
8
8
|
start: number;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "7.
|
|
1
|
+
export declare const version = "7.1.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/bandage-core",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.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": {
|