@jbrowse/bandage-core 7.5.0 → 8.0.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-GYTQK5PR.js → chunk-5ARDFGLJ.js} +2 -2
- package/dist/chunks/{chunk-EJ5OZTCK.js → chunk-733L2TS6.js} +1 -1
- package/dist/chunks/{chunk-CR7EGAFE.js → chunk-KCRL5JB2.js} +34 -16
- package/dist/chunks/{chunk-AYOSNXLQ.js → chunk-W2I4DOL4.js} +2 -4
- package/dist/chunks/{chunk-2PEBQ5VA.js → chunk-XMNHWMGM.js} +1 -1
- package/dist/chunks/{chunk-6SBUFFTB.js → chunk-XV4P5KEQ.js} +14 -0
- package/dist/chunks/{chunk-FRR2RGBT.js → chunk-ZJQ6H3AR.js} +1 -1
- package/dist/cli/figure.js +5 -5
- package/dist/facetGrid.js +3 -1
- package/dist/figure.js +3 -3
- package/dist/index.js +9 -7
- package/dist/layout/tubeMapLayout.js +1 -1
- package/dist/layoutModes.js +2 -2
- package/dist/tubeMap/coarsen.js +1 -1
- package/dist/tubeMap/draw.js +6 -2
- package/dist/tubeMap/mismatches.js +1 -1
- package/dist/types/facetGrid.d.ts +9 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/layout/tubeMapLayout.d.ts +1 -1
- package/dist/types/tubeMap/axis.d.ts +1 -1
- package/dist/types/tubeMap/connectors.d.ts +1 -1
- package/dist/types/tubeMap/deviations.d.ts +1 -1
- package/dist/types/tubeMap/draw.d.ts +4 -3
- package/dist/types/tubeMap/mismatches.d.ts +1 -1
- package/dist/types/tubeMap/reads.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-RCWYY6XA.js";
|
|
43
43
|
import {
|
|
44
44
|
version
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-XMNHWMGM.js";
|
|
46
46
|
import {
|
|
47
47
|
axisScaleOf
|
|
48
48
|
} from "./chunk-4UBWXZVX.js";
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
facetCells,
|
|
87
87
|
facetGrid,
|
|
88
88
|
facetSettingOf
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-XV4P5KEQ.js";
|
|
90
90
|
import {
|
|
91
91
|
FIT_PADDING,
|
|
92
92
|
drawingBounds,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/tubeMap/mismatches.ts
|
|
2
|
-
import { forward, getXCoordinateOfBaseWithinNode } from "@
|
|
2
|
+
import { forward, getXCoordinateOfBaseWithinNode } from "@jbrowse/tubemap-core";
|
|
3
3
|
function readMismatches(read, layout) {
|
|
4
4
|
const marks = [];
|
|
5
5
|
const entries = read.sequenceNew ?? [];
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tubeMapMismatches
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-733L2TS6.js";
|
|
4
|
+
import {
|
|
5
|
+
readColor
|
|
6
|
+
} from "./chunk-TEDQJPMI.js";
|
|
4
7
|
|
|
5
8
|
// src/tubeMap/draw.ts
|
|
6
|
-
import { curvePaths, nodeOutlinePath } from "@
|
|
9
|
+
import { curvePaths, nodeOutlinePath } from "@jbrowse/tubemap-core";
|
|
7
10
|
function parsePath(d) {
|
|
8
11
|
const tokens = d.trim().split(/[\s,]+/);
|
|
9
12
|
const commands = [];
|
|
@@ -50,29 +53,41 @@ function extentOf(commands) {
|
|
|
50
53
|
}
|
|
51
54
|
return { x0, x1 };
|
|
52
55
|
}
|
|
53
|
-
function shapeOf(d, color,
|
|
56
|
+
function shapeOf(d, color, track) {
|
|
54
57
|
const commands = parsePath(d);
|
|
55
|
-
return { commands, color, track,
|
|
58
|
+
return { commands, color, track, ...extentOf(commands) };
|
|
59
|
+
}
|
|
60
|
+
function trackColors(layout, pathColors) {
|
|
61
|
+
return new Map(
|
|
62
|
+
layout.tracks.map((track) => [
|
|
63
|
+
track.id,
|
|
64
|
+
track.type === "read" ? readColor(track) : pathColors[track.id]
|
|
65
|
+
])
|
|
66
|
+
);
|
|
56
67
|
}
|
|
57
|
-
function layerOf(layout, type) {
|
|
68
|
+
function layerOf(layout, type, colors) {
|
|
58
69
|
const { shapes } = layout;
|
|
70
|
+
const colorOf = (s) => colors.get(s.id);
|
|
59
71
|
const trackOf = (s) => type === "haplotype" ? s.id : void 0;
|
|
60
72
|
const rects = [...shapes.rectangles, ...shapes.verticalRectangles].filter((r) => r.type === type).map((r) => ({
|
|
61
|
-
color: r
|
|
73
|
+
color: colorOf(r),
|
|
62
74
|
track: trackOf(r),
|
|
63
|
-
alpha: r.alpha ?? 1,
|
|
64
75
|
x0: r.xStart,
|
|
65
76
|
x1: r.xEnd + 1,
|
|
66
77
|
y0: r.yStart,
|
|
67
78
|
y1: r.yEnd + 1
|
|
68
79
|
}));
|
|
69
80
|
const curves = curvePaths(shapes.curves, type).map(
|
|
70
|
-
(c) => shapeOf(c.path, c
|
|
81
|
+
(c) => shapeOf(c.path, colorOf(c), trackOf(c))
|
|
71
82
|
);
|
|
72
|
-
const corners = shapes.corners.filter((c) => c.type === type).map((c) => shapeOf(c.path, c
|
|
83
|
+
const corners = shapes.corners.filter((c) => c.type === type).map((c) => shapeOf(c.path, colorOf(c), trackOf(c)));
|
|
73
84
|
return { rects, shapes: [...curves, ...corners] };
|
|
74
85
|
}
|
|
75
|
-
function tubeMapPicture(
|
|
86
|
+
function tubeMapPicture({
|
|
87
|
+
layout,
|
|
88
|
+
pathColors
|
|
89
|
+
}) {
|
|
90
|
+
const colors = trackColors(layout, pathColors);
|
|
76
91
|
const nodes = [];
|
|
77
92
|
layout.nodes.forEach((node) => {
|
|
78
93
|
if (node.order >= 0) {
|
|
@@ -82,7 +97,10 @@ function tubeMapPicture(layout) {
|
|
|
82
97
|
});
|
|
83
98
|
return {
|
|
84
99
|
bounds: layout.bounds,
|
|
85
|
-
layers: [
|
|
100
|
+
layers: [
|
|
101
|
+
layerOf(layout, "haplotype", colors),
|
|
102
|
+
layerOf(layout, "read", colors)
|
|
103
|
+
],
|
|
86
104
|
nodes,
|
|
87
105
|
mismatches: tubeMapMismatches(layout).filter(
|
|
88
106
|
(m) => m.kind !== "insertion" || !m.softClip
|
|
@@ -132,25 +150,23 @@ function fillByColor(ctx, items, visible, colorOf, addTo) {
|
|
|
132
150
|
const byColor = /* @__PURE__ */ new Map();
|
|
133
151
|
for (const item of items) {
|
|
134
152
|
if (visible(item)) {
|
|
135
|
-
const
|
|
136
|
-
const list = byColor.get(
|
|
153
|
+
const color = colorOf(item);
|
|
154
|
+
const list = byColor.get(color);
|
|
137
155
|
if (list) {
|
|
138
156
|
list.push(item);
|
|
139
157
|
} else {
|
|
140
|
-
byColor.set(
|
|
158
|
+
byColor.set(color, [item]);
|
|
141
159
|
}
|
|
142
160
|
}
|
|
143
161
|
}
|
|
144
162
|
for (const list of byColor.values()) {
|
|
145
163
|
ctx.fillStyle = colorOf(list[0]);
|
|
146
|
-
ctx.globalAlpha = list[0].alpha;
|
|
147
164
|
ctx.beginPath();
|
|
148
165
|
for (const item of list) {
|
|
149
166
|
addTo(item);
|
|
150
167
|
}
|
|
151
168
|
ctx.fill();
|
|
152
169
|
}
|
|
153
|
-
ctx.globalAlpha = 1;
|
|
154
170
|
}
|
|
155
171
|
var FULL_OUTLINE_PX = 12;
|
|
156
172
|
var MIN_OUTLINE_ALPHA = 0.15;
|
|
@@ -162,6 +178,7 @@ function drawTubeMap(ctx, picture, frame) {
|
|
|
162
178
|
const { x, y, width } = frame;
|
|
163
179
|
const visible = (item) => x(item.x1) >= 0 && x(item.x0) <= width;
|
|
164
180
|
const colorOf = (item) => item.track !== void 0 && frame.tubeColors?.[item.track] || item.color;
|
|
181
|
+
ctx.globalAlpha = 1;
|
|
165
182
|
for (const layer of picture.layers) {
|
|
166
183
|
fillByColor(ctx, layer.rects, visible, colorOf, (r) => {
|
|
167
184
|
const left = x(r.x0);
|
|
@@ -234,6 +251,7 @@ function drawMismatches(ctx, marks, frame) {
|
|
|
234
251
|
|
|
235
252
|
export {
|
|
236
253
|
parsePath,
|
|
254
|
+
trackColors,
|
|
237
255
|
tubeMapPicture,
|
|
238
256
|
drawTubeMap,
|
|
239
257
|
mismatchesLegible,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
canonicalStrand,
|
|
3
|
-
readColor,
|
|
4
3
|
stepName,
|
|
5
4
|
tubeMapReads
|
|
6
5
|
} from "./chunk-TEDQJPMI.js";
|
|
@@ -16,7 +15,7 @@ import {
|
|
|
16
15
|
} from "./chunk-FYQWPEEY.js";
|
|
17
16
|
|
|
18
17
|
// src/layout/tubeMapLayout.ts
|
|
19
|
-
import { layoutTubeMap } from "@
|
|
18
|
+
import { layoutTubeMap } from "@jbrowse/tubemap-core";
|
|
20
19
|
function visitStrands(graph) {
|
|
21
20
|
const strands = /* @__PURE__ */ new Map();
|
|
22
21
|
for (const [segment, visits] of graph.pathVisits ?? []) {
|
|
@@ -93,8 +92,7 @@ function runTubeMap(graph) {
|
|
|
93
92
|
const pathColors = paths.map((_, i) => tubeColor(i, paths.length));
|
|
94
93
|
const layout = layoutTubeMap(tubeMapNodes(graph), tracks, reads, {
|
|
95
94
|
nodeWidthOption: "compressed",
|
|
96
|
-
trackWidth: tubeWidth(tracks.length)
|
|
97
|
-
trackColor: (track) => track.type === "read" ? readColor(track) : pathColors[track.id]
|
|
95
|
+
trackWidth: tubeWidth(tracks.length)
|
|
98
96
|
});
|
|
99
97
|
return layout ? { layout, pathColors } : void 0;
|
|
100
98
|
}
|
|
@@ -47,6 +47,19 @@ function facetGrid({
|
|
|
47
47
|
}
|
|
48
48
|
return best;
|
|
49
49
|
}
|
|
50
|
+
var FACET_FIELDS = [
|
|
51
|
+
{ value: "", label: "None", description: "Every lifted walk in one drawing" },
|
|
52
|
+
{
|
|
53
|
+
value: "walk",
|
|
54
|
+
label: "A panel per walk",
|
|
55
|
+
description: "One panel per lifted walk, side by side"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
value: "sample",
|
|
59
|
+
label: "A row per sample",
|
|
60
|
+
description: "A row per sample, a column per haplotype"
|
|
61
|
+
}
|
|
62
|
+
];
|
|
50
63
|
function facetSettingOf(facet) {
|
|
51
64
|
const raw = typeof facet === "string" ? { field: facet } : facet ?? {};
|
|
52
65
|
const field = raw.field === "walk" || raw.field === "sample" ? raw.field : "";
|
|
@@ -92,6 +105,7 @@ export {
|
|
|
92
105
|
FACET_TITLE_PX,
|
|
93
106
|
FACET_PAD_PX,
|
|
94
107
|
facetGrid,
|
|
108
|
+
FACET_FIELDS,
|
|
95
109
|
facetSettingOf,
|
|
96
110
|
facetCells
|
|
97
111
|
};
|
package/dist/cli/figure.js
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
LAYOUT_MODES,
|
|
9
9
|
layoutModeByValue
|
|
10
|
-
} from "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-ZJQ6H3AR.js";
|
|
11
11
|
import "../chunks/chunk-LOEA5IHZ.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-W2I4DOL4.js";
|
|
13
13
|
import "../chunks/chunk-TEDQJPMI.js";
|
|
14
14
|
import "../chunks/chunk-L3O7AWLI.js";
|
|
15
15
|
import "../chunks/chunk-TZFWUT2C.js";
|
|
@@ -35,7 +35,7 @@ import "../chunks/chunk-LYJ4US66.js";
|
|
|
35
35
|
import "../chunks/chunk-7XHHVYG7.js";
|
|
36
36
|
import {
|
|
37
37
|
figureSvg
|
|
38
|
-
} from "../chunks/chunk-
|
|
38
|
+
} from "../chunks/chunk-5ARDFGLJ.js";
|
|
39
39
|
import "../chunks/chunk-LOCJN3BZ.js";
|
|
40
40
|
import "../chunks/chunk-47DYCZOK.js";
|
|
41
41
|
import "../chunks/chunk-ZYHSUNQO.js";
|
|
@@ -53,7 +53,7 @@ import "../chunks/chunk-2LQ5BWT7.js";
|
|
|
53
53
|
import "../chunks/chunk-AVJK272H.js";
|
|
54
54
|
import "../chunks/chunk-RCWYY6XA.js";
|
|
55
55
|
import "../chunks/chunk-UMNCCYBN.js";
|
|
56
|
-
import "../chunks/chunk-
|
|
56
|
+
import "../chunks/chunk-XMNHWMGM.js";
|
|
57
57
|
import "../chunks/chunk-4UBWXZVX.js";
|
|
58
58
|
import "../chunks/chunk-MP7LXLWV.js";
|
|
59
59
|
import {
|
|
@@ -75,7 +75,7 @@ import "../chunks/chunk-3ZZSX5HN.js";
|
|
|
75
75
|
import "../chunks/chunk-AB35TJST.js";
|
|
76
76
|
import "../chunks/chunk-JKJWSY4V.js";
|
|
77
77
|
import "../chunks/chunk-NNODIW4U.js";
|
|
78
|
-
import "../chunks/chunk-
|
|
78
|
+
import "../chunks/chunk-XV4P5KEQ.js";
|
|
79
79
|
import {
|
|
80
80
|
engineSettingsOf,
|
|
81
81
|
forceLayout,
|
package/dist/facetGrid.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
FACET_FIELDS,
|
|
2
3
|
FACET_GAP_PX,
|
|
3
4
|
FACET_PAD_PX,
|
|
4
5
|
FACET_TITLE_PX,
|
|
5
6
|
facetCells,
|
|
6
7
|
facetGrid,
|
|
7
8
|
facetSettingOf
|
|
8
|
-
} from "./chunks/chunk-
|
|
9
|
+
} from "./chunks/chunk-XV4P5KEQ.js";
|
|
9
10
|
export {
|
|
11
|
+
FACET_FIELDS,
|
|
10
12
|
FACET_GAP_PX,
|
|
11
13
|
FACET_PAD_PX,
|
|
12
14
|
FACET_TITLE_PX,
|
package/dist/figure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
figureSvg
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-5ARDFGLJ.js";
|
|
4
4
|
import "./chunks/chunk-LOCJN3BZ.js";
|
|
5
5
|
import "./chunks/chunk-47DYCZOK.js";
|
|
6
6
|
import "./chunks/chunk-ZYHSUNQO.js";
|
|
@@ -15,7 +15,7 @@ import "./chunks/chunk-2LQ5BWT7.js";
|
|
|
15
15
|
import "./chunks/chunk-AVJK272H.js";
|
|
16
16
|
import "./chunks/chunk-RCWYY6XA.js";
|
|
17
17
|
import "./chunks/chunk-UMNCCYBN.js";
|
|
18
|
-
import "./chunks/chunk-
|
|
18
|
+
import "./chunks/chunk-XMNHWMGM.js";
|
|
19
19
|
import "./chunks/chunk-4UBWXZVX.js";
|
|
20
20
|
import "./chunks/chunk-MP7LXLWV.js";
|
|
21
21
|
import "./chunks/chunk-SZNZ2T6D.js";
|
|
@@ -30,7 +30,7 @@ import "./chunks/chunk-3ZZSX5HN.js";
|
|
|
30
30
|
import "./chunks/chunk-AB35TJST.js";
|
|
31
31
|
import "./chunks/chunk-JKJWSY4V.js";
|
|
32
32
|
import "./chunks/chunk-NNODIW4U.js";
|
|
33
|
-
import "./chunks/chunk-
|
|
33
|
+
import "./chunks/chunk-XV4P5KEQ.js";
|
|
34
34
|
import "./chunks/chunk-WZATPZNH.js";
|
|
35
35
|
import "./chunks/chunk-IGVV37VI.js";
|
|
36
36
|
import "./chunks/chunk-PUG7LXDF.js";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
drawTubeMap,
|
|
6
6
|
tubeMapPicture
|
|
7
|
-
} from "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-KCRL5JB2.js";
|
|
8
8
|
import {
|
|
9
9
|
tubeMapFrame,
|
|
10
10
|
tubeMapNodeAt
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
drawTubeMapGenes,
|
|
14
14
|
tubeMapGenes
|
|
15
15
|
} from "./chunks/chunk-OWFPAIJI.js";
|
|
16
|
-
import "./chunks/chunk-
|
|
16
|
+
import "./chunks/chunk-733L2TS6.js";
|
|
17
17
|
import {
|
|
18
18
|
tubeMapNodeColors
|
|
19
19
|
} from "./chunks/chunk-KEVQ46GG.js";
|
|
@@ -69,9 +69,9 @@ import {
|
|
|
69
69
|
LAYOUT_MODES,
|
|
70
70
|
layoutModeByValue,
|
|
71
71
|
modeUsesLayoutEngine
|
|
72
|
-
} from "./chunks/chunk-
|
|
72
|
+
} from "./chunks/chunk-ZJQ6H3AR.js";
|
|
73
73
|
import "./chunks/chunk-LOEA5IHZ.js";
|
|
74
|
-
import "./chunks/chunk-
|
|
74
|
+
import "./chunks/chunk-W2I4DOL4.js";
|
|
75
75
|
import "./chunks/chunk-TEDQJPMI.js";
|
|
76
76
|
import "./chunks/chunk-L3O7AWLI.js";
|
|
77
77
|
import "./chunks/chunk-TZFWUT2C.js";
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
} from "./chunks/chunk-7XHHVYG7.js";
|
|
113
113
|
import {
|
|
114
114
|
figureSvg
|
|
115
|
-
} from "./chunks/chunk-
|
|
115
|
+
} from "./chunks/chunk-5ARDFGLJ.js";
|
|
116
116
|
import {
|
|
117
117
|
layoutGeometryInputs
|
|
118
118
|
} from "./chunks/chunk-LOCJN3BZ.js";
|
|
@@ -204,7 +204,7 @@ import {
|
|
|
204
204
|
import "./chunks/chunk-UMNCCYBN.js";
|
|
205
205
|
import {
|
|
206
206
|
version
|
|
207
|
-
} from "./chunks/chunk-
|
|
207
|
+
} from "./chunks/chunk-XMNHWMGM.js";
|
|
208
208
|
import {
|
|
209
209
|
axisScaleOf,
|
|
210
210
|
contains,
|
|
@@ -272,13 +272,14 @@ import {
|
|
|
272
272
|
serializeEl
|
|
273
273
|
} from "./chunks/chunk-NNODIW4U.js";
|
|
274
274
|
import {
|
|
275
|
+
FACET_FIELDS,
|
|
275
276
|
FACET_GAP_PX,
|
|
276
277
|
FACET_PAD_PX,
|
|
277
278
|
FACET_TITLE_PX,
|
|
278
279
|
facetCells,
|
|
279
280
|
facetGrid,
|
|
280
281
|
facetSettingOf
|
|
281
|
-
} from "./chunks/chunk-
|
|
282
|
+
} from "./chunks/chunk-XV4P5KEQ.js";
|
|
282
283
|
import {
|
|
283
284
|
FIGURE_DEFAULTS,
|
|
284
285
|
figureSpecSettings
|
|
@@ -331,6 +332,7 @@ export {
|
|
|
331
332
|
Canvas2DRenderer,
|
|
332
333
|
ENGINE_DEFAULTS,
|
|
333
334
|
EXON_COLOR,
|
|
335
|
+
FACET_FIELDS,
|
|
334
336
|
FACET_GAP_PX,
|
|
335
337
|
FACET_PAD_PX,
|
|
336
338
|
FACET_TITLE_PX,
|
package/dist/layoutModes.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
LAYOUT_MODE_VALUES,
|
|
5
5
|
layoutModeByValue,
|
|
6
6
|
modeUsesLayoutEngine
|
|
7
|
-
} from "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-ZJQ6H3AR.js";
|
|
8
8
|
import "./chunks/chunk-LOEA5IHZ.js";
|
|
9
|
-
import "./chunks/chunk-
|
|
9
|
+
import "./chunks/chunk-W2I4DOL4.js";
|
|
10
10
|
import "./chunks/chunk-TEDQJPMI.js";
|
|
11
11
|
import "./chunks/chunk-L3O7AWLI.js";
|
|
12
12
|
import "./chunks/chunk-TZFWUT2C.js";
|
package/dist/tubeMap/coarsen.js
CHANGED
package/dist/tubeMap/draw.js
CHANGED
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
mismatchOnScreen,
|
|
4
4
|
mismatchesLegible,
|
|
5
5
|
parsePath,
|
|
6
|
+
trackColors,
|
|
6
7
|
tubeMapPicture
|
|
7
|
-
} from "../chunks/chunk-
|
|
8
|
-
import "../chunks/chunk-
|
|
8
|
+
} from "../chunks/chunk-KCRL5JB2.js";
|
|
9
|
+
import "../chunks/chunk-733L2TS6.js";
|
|
10
|
+
import "../chunks/chunk-TEDQJPMI.js";
|
|
11
|
+
import "../chunks/chunk-C44YRP5F.js";
|
|
9
12
|
export {
|
|
10
13
|
drawTubeMap,
|
|
11
14
|
mismatchOnScreen,
|
|
12
15
|
mismatchesLegible,
|
|
13
16
|
parsePath,
|
|
17
|
+
trackColors,
|
|
14
18
|
tubeMapPicture
|
|
15
19
|
};
|
|
@@ -33,6 +33,15 @@ export interface FacetSetting {
|
|
|
33
33
|
/** How many panels go across; unset takes whichever count draws each largest. */
|
|
34
34
|
columns?: number;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* The fields panels can split on, as a picker lists them: '' for none, the way
|
|
38
|
+
* a JBrowse display's `facet` writes it and its Group by menu labels it.
|
|
39
|
+
*/
|
|
40
|
+
export declare const FACET_FIELDS: {
|
|
41
|
+
value: FacetSetting['field'];
|
|
42
|
+
label: string;
|
|
43
|
+
description: string;
|
|
44
|
+
}[];
|
|
36
45
|
/** What a session or a spec may write for the facet: the field bare, or the setting's members. */
|
|
37
46
|
export type FacetInput = string | {
|
|
38
47
|
field?: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type { GbzSource } from './gbzCut.js';
|
|
|
55
55
|
export { version } from './version.js';
|
|
56
56
|
export type { FigureOptions } from './figure.js';
|
|
57
57
|
export { svgCanvas } from './renderer/svgCanvas.js';
|
|
58
|
-
export { FACET_GAP_PX, FACET_PAD_PX, FACET_TITLE_PX, facetCells, facetGrid, facetSettingOf, } from './facetGrid.js';
|
|
58
|
+
export { FACET_FIELDS, FACET_GAP_PX, FACET_PAD_PX, FACET_TITLE_PX, facetCells, facetGrid, facetSettingOf, } from './facetGrid.js';
|
|
59
59
|
export type { FacetBy, FacetGrid, FacetInput, FacetSetting } from './facetGrid.js';
|
|
60
60
|
export type { LiftedWalk, WalkLift } from './walkHighlight.js';
|
|
61
61
|
export { WALK_FIELDS, WALK_SCHEMES, encodingStops, encodingSwatchCss, resolveEncoding, schemeCss, } from './walkEncoding.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Coarsened } from '../tubeMap/coarsen.js';
|
|
2
2
|
import type { Graph, LayoutResult } from '../types.js';
|
|
3
|
-
import type { InputTrack, TubeMapLayout } from '@
|
|
3
|
+
import type { InputTrack, TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
4
4
|
export interface TubeMapColumn {
|
|
5
5
|
order: number;
|
|
6
6
|
x0: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Deviation } from './coarsen.js';
|
|
2
2
|
import type { TubeMapFrame } from './draw.js';
|
|
3
3
|
import type { Graph } from '../types.js';
|
|
4
|
-
import type { TubeMapLayout } from '@
|
|
4
|
+
import type { TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
5
5
|
export interface DeviationMark {
|
|
6
6
|
x0: number;
|
|
7
7
|
x1: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TubeMapTransform } from './frame.js';
|
|
2
2
|
import type { TubeMapMismatch } from './mismatches.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TubeMapDrawing } from '../layout/tubeMapLayout.js';
|
|
4
|
+
import type { TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
4
5
|
type Command = {
|
|
5
6
|
op: 'M' | 'L';
|
|
6
7
|
x: number;
|
|
@@ -32,7 +33,6 @@ export declare function parsePath(d: string): Command[];
|
|
|
32
33
|
interface Filled {
|
|
33
34
|
color: string;
|
|
34
35
|
track?: number;
|
|
35
|
-
alpha: number;
|
|
36
36
|
x0: number;
|
|
37
37
|
x1: number;
|
|
38
38
|
}
|
|
@@ -58,7 +58,8 @@ export interface TubeMapPicture {
|
|
|
58
58
|
}[];
|
|
59
59
|
mismatches: TubeMapMismatch[];
|
|
60
60
|
}
|
|
61
|
-
export declare function
|
|
61
|
+
export declare function trackColors(layout: TubeMapLayout, pathColors: readonly string[]): ReadonlyMap<number, string>;
|
|
62
|
+
export declare function tubeMapPicture({ layout, pathColors, }: Pick<TubeMapDrawing, 'layout' | 'pathColors'>): TubeMapPicture;
|
|
62
63
|
export interface TubeMapFrame extends TubeMapTransform {
|
|
63
64
|
width: number;
|
|
64
65
|
highlightNode?: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GafRecord } from '../gaf/parseGaf.js';
|
|
2
2
|
import type { Graph, GraphNode } from '../types.js';
|
|
3
|
-
import type { InputTrack } from '@
|
|
3
|
+
import type { InputTrack } from '@jbrowse/tubemap-core';
|
|
4
4
|
export declare function canonicalStrand(node: GraphNode): "+" | "-";
|
|
5
5
|
export declare function stepName(node: GraphNode, strand: '+' | '-'): string;
|
|
6
6
|
export declare function tubeMapReads(graph: Graph, records: readonly GafRecord[], firstId: number): InputTrack[];
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "8.0.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/bandage-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.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": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@gmod/gbz-base": "^7.0.0",
|
|
38
38
|
"@gmod/tabix": "^3.9.1",
|
|
39
|
-
"@
|
|
39
|
+
"@jbrowse/tubemap-core": "^0.2.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/js": "^10.0.1",
|