@jbrowse/bandage-core 8.2.0 → 9.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-3FXPFVKJ.js → chunk-AMS3MAFP.js} +1 -1
- package/dist/chunks/{chunk-DRA7733Q.js → chunk-BPRXQ2SS.js} +8 -3
- package/dist/chunks/{chunk-TEDQJPMI.js → chunk-CWFNEKST.js} +22 -7
- package/dist/chunks/chunk-INJ2UVOT.js +370 -0
- package/dist/chunks/{chunk-KCRL5JB2.js → chunk-LLP3FXPM.js} +31 -10
- package/dist/chunks/{chunk-DE4UFDUZ.js → chunk-TLQ7F2ZT.js} +1 -1
- package/dist/chunks/{chunk-OWFPAIJI.js → chunk-WEDZ76AK.js} +1 -1
- package/dist/chunks/{chunk-CF62U3QS.js → chunk-WNUZP3WQ.js} +2 -2
- package/dist/chunks/{chunk-733L2TS6.js → chunk-XXT2JCAC.js} +10 -7
- package/dist/chunks/{chunk-GQ2AOHU4.js → chunk-YOYLCLIG.js} +7 -29
- package/dist/cli/figure.js +5 -5
- package/dist/figure.js +2 -2
- package/dist/index.js +15 -13
- package/dist/layout/tubeMapLayout.js +12 -6
- package/dist/layoutModes.js +3 -3
- package/dist/tubeMap/axis.js +1 -1
- package/dist/tubeMap/coarsen.js +11 -23
- package/dist/tubeMap/connectors.js +1 -4
- package/dist/tubeMap/deviations.js +15 -19
- package/dist/tubeMap/draw.js +9 -5
- package/dist/tubeMap/genes.js +2 -2
- package/dist/tubeMap/mismatches.js +1 -1
- package/dist/tubeMap/reads.js +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/layout/tubeMapLayout.d.ts +15 -2
- package/dist/types/layoutModes.d.ts +5 -5
- package/dist/types/tubeMap/axis.d.ts +6 -3
- package/dist/types/tubeMap/connectors.d.ts +2 -11
- package/dist/types/tubeMap/deviations.d.ts +2 -3
- package/dist/types/tubeMap/draw.d.ts +4 -1
- package/dist/types/tubeMap/mismatches.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-W2I4DOL4.js +0 -230
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-
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-WNUZP3WQ.js";
|
|
11
|
+
import "../chunks/chunk-INJ2UVOT.js";
|
|
12
|
+
import "../chunks/chunk-CWFNEKST.js";
|
|
13
13
|
import "../chunks/chunk-LOEA5IHZ.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-TLQ7F2ZT.js";
|
|
39
39
|
import "../chunks/chunk-LOCJN3BZ.js";
|
|
40
40
|
import "../chunks/chunk-47DYCZOK.js";
|
|
41
41
|
import "../chunks/chunk-WDTXW7T2.js";
|
|
@@ -53,7 +53,7 @@ import "../chunks/chunk-2LQ5BWT7.js";
|
|
|
53
53
|
import "../chunks/chunk-6ZNQJ5ZD.js";
|
|
54
54
|
import "../chunks/chunk-HBEKUQO4.js";
|
|
55
55
|
import "../chunks/chunk-G2FD7S3C.js";
|
|
56
|
-
import "../chunks/chunk-
|
|
56
|
+
import "../chunks/chunk-AMS3MAFP.js";
|
|
57
57
|
import "../chunks/chunk-TL4B342F.js";
|
|
58
58
|
import "../chunks/chunk-3C5UXR2U.js";
|
|
59
59
|
import {
|
package/dist/figure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
figureSvg
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-TLQ7F2ZT.js";
|
|
4
4
|
import "./chunks/chunk-LOCJN3BZ.js";
|
|
5
5
|
import "./chunks/chunk-47DYCZOK.js";
|
|
6
6
|
import "./chunks/chunk-WDTXW7T2.js";
|
|
@@ -15,7 +15,7 @@ import "./chunks/chunk-2LQ5BWT7.js";
|
|
|
15
15
|
import "./chunks/chunk-6ZNQJ5ZD.js";
|
|
16
16
|
import "./chunks/chunk-HBEKUQO4.js";
|
|
17
17
|
import "./chunks/chunk-G2FD7S3C.js";
|
|
18
|
-
import "./chunks/chunk-
|
|
18
|
+
import "./chunks/chunk-AMS3MAFP.js";
|
|
19
19
|
import "./chunks/chunk-TL4B342F.js";
|
|
20
20
|
import "./chunks/chunk-3C5UXR2U.js";
|
|
21
21
|
import "./chunks/chunk-MAUEPAMG.js";
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunks/chunk-TDQLINVI.js";
|
|
4
4
|
import {
|
|
5
5
|
drawTubeMap,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
tubeMapMismatchAt,
|
|
7
|
+
tubeMapPicture,
|
|
8
|
+
tubeMapTrackAt
|
|
9
|
+
} from "./chunks/chunk-LLP3FXPM.js";
|
|
8
10
|
import {
|
|
9
11
|
tubeMapFrame,
|
|
10
12
|
tubeMapNodeAt
|
|
@@ -12,8 +14,8 @@ import {
|
|
|
12
14
|
import {
|
|
13
15
|
drawTubeMapGenes,
|
|
14
16
|
tubeMapGenes
|
|
15
|
-
} from "./chunks/chunk-
|
|
16
|
-
import "./chunks/chunk-
|
|
17
|
+
} from "./chunks/chunk-WEDZ76AK.js";
|
|
18
|
+
import "./chunks/chunk-XXT2JCAC.js";
|
|
17
19
|
import {
|
|
18
20
|
tubeMapNodeColors
|
|
19
21
|
} from "./chunks/chunk-FFFQNQUI.js";
|
|
@@ -26,13 +28,12 @@ import {
|
|
|
26
28
|
referenceBoxes,
|
|
27
29
|
rulerBoxes,
|
|
28
30
|
tubeX
|
|
29
|
-
} from "./chunks/chunk-
|
|
31
|
+
} from "./chunks/chunk-BPRXQ2SS.js";
|
|
30
32
|
import {
|
|
31
33
|
connectorAt,
|
|
32
34
|
drawTubeMapConnectors,
|
|
33
|
-
referenceNodes,
|
|
34
35
|
tubeMapConnectors
|
|
35
|
-
} from "./chunks/chunk-
|
|
36
|
+
} from "./chunks/chunk-YOYLCLIG.js";
|
|
36
37
|
import {
|
|
37
38
|
createForceLayoutCache
|
|
38
39
|
} from "./chunks/chunk-SKKYLBRA.js";
|
|
@@ -69,9 +70,9 @@ import {
|
|
|
69
70
|
LAYOUT_MODES,
|
|
70
71
|
layoutModeByValue,
|
|
71
72
|
modeUsesLayoutEngine
|
|
72
|
-
} from "./chunks/chunk-
|
|
73
|
-
import "./chunks/chunk-
|
|
74
|
-
import "./chunks/chunk-
|
|
73
|
+
} from "./chunks/chunk-WNUZP3WQ.js";
|
|
74
|
+
import "./chunks/chunk-INJ2UVOT.js";
|
|
75
|
+
import "./chunks/chunk-CWFNEKST.js";
|
|
75
76
|
import "./chunks/chunk-LOEA5IHZ.js";
|
|
76
77
|
import "./chunks/chunk-L3O7AWLI.js";
|
|
77
78
|
import "./chunks/chunk-TZFWUT2C.js";
|
|
@@ -112,7 +113,7 @@ import {
|
|
|
112
113
|
} from "./chunks/chunk-7XHHVYG7.js";
|
|
113
114
|
import {
|
|
114
115
|
figureSvg
|
|
115
|
-
} from "./chunks/chunk-
|
|
116
|
+
} from "./chunks/chunk-TLQ7F2ZT.js";
|
|
116
117
|
import {
|
|
117
118
|
layoutGeometryInputs
|
|
118
119
|
} from "./chunks/chunk-LOCJN3BZ.js";
|
|
@@ -204,7 +205,7 @@ import {
|
|
|
204
205
|
import "./chunks/chunk-G2FD7S3C.js";
|
|
205
206
|
import {
|
|
206
207
|
version
|
|
207
|
-
} from "./chunks/chunk-
|
|
208
|
+
} from "./chunks/chunk-AMS3MAFP.js";
|
|
208
209
|
import {
|
|
209
210
|
axisScaleOf,
|
|
210
211
|
contains,
|
|
@@ -463,7 +464,6 @@ export {
|
|
|
463
464
|
referenceBoxes,
|
|
464
465
|
referenceKnots,
|
|
465
466
|
referenceLabel,
|
|
466
|
-
referenceNodes,
|
|
467
467
|
referencePathQuery,
|
|
468
468
|
referenceSamplesOf,
|
|
469
469
|
referenceStripBlocks,
|
|
@@ -489,9 +489,11 @@ export {
|
|
|
489
489
|
tubeMapConnectors,
|
|
490
490
|
tubeMapFrame,
|
|
491
491
|
tubeMapGenes,
|
|
492
|
+
tubeMapMismatchAt,
|
|
492
493
|
tubeMapNodeAt,
|
|
493
494
|
tubeMapNodeColors,
|
|
494
495
|
tubeMapPicture,
|
|
496
|
+
tubeMapTrackAt,
|
|
495
497
|
tubeX,
|
|
496
498
|
unitTicks,
|
|
497
499
|
version,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
+
boxGraph,
|
|
3
|
+
hasTubeMapBackbone,
|
|
2
4
|
hasTubeMapPaths,
|
|
5
|
+
mergedRuns,
|
|
6
|
+
pathSteps,
|
|
3
7
|
tubeMapLayout,
|
|
4
8
|
tubeMapReferenceLayout,
|
|
5
9
|
tubeMapTracks,
|
|
6
|
-
tubeWidth
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "../chunks/chunk-TEDQJPMI.js";
|
|
10
|
+
tubeWidth
|
|
11
|
+
} from "../chunks/chunk-INJ2UVOT.js";
|
|
12
|
+
import "../chunks/chunk-CWFNEKST.js";
|
|
10
13
|
import "../chunks/chunk-C44YRP5F.js";
|
|
11
14
|
import "../chunks/chunk-7GBL7SJY.js";
|
|
12
15
|
import "../chunks/chunk-3ZZSX5HN.js";
|
|
@@ -19,10 +22,13 @@ import "../chunks/chunk-2CVHXFK7.js";
|
|
|
19
22
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
20
23
|
import "../chunks/chunk-FYQWPEEY.js";
|
|
21
24
|
export {
|
|
25
|
+
boxGraph,
|
|
26
|
+
hasTubeMapBackbone,
|
|
22
27
|
hasTubeMapPaths,
|
|
28
|
+
mergedRuns,
|
|
29
|
+
pathSteps,
|
|
23
30
|
tubeMapLayout,
|
|
24
31
|
tubeMapReferenceLayout,
|
|
25
32
|
tubeMapTracks,
|
|
26
|
-
tubeWidth
|
|
27
|
-
visitStrands
|
|
33
|
+
tubeWidth
|
|
28
34
|
};
|
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-
|
|
8
|
-
import "./chunks/chunk-
|
|
9
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-WNUZP3WQ.js";
|
|
8
|
+
import "./chunks/chunk-INJ2UVOT.js";
|
|
9
|
+
import "./chunks/chunk-CWFNEKST.js";
|
|
10
10
|
import "./chunks/chunk-LOEA5IHZ.js";
|
|
11
11
|
import "./chunks/chunk-L3O7AWLI.js";
|
|
12
12
|
import "./chunks/chunk-TZFWUT2C.js";
|
package/dist/tubeMap/axis.js
CHANGED
package/dist/tubeMap/coarsen.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunks/chunk-
|
|
4
|
-
import
|
|
5
|
-
canonicalStrand
|
|
6
|
-
} from "../chunks/chunk-TEDQJPMI.js";
|
|
2
|
+
pathSteps
|
|
3
|
+
} from "../chunks/chunk-INJ2UVOT.js";
|
|
4
|
+
import "../chunks/chunk-CWFNEKST.js";
|
|
7
5
|
import "../chunks/chunk-C44YRP5F.js";
|
|
8
6
|
import "../chunks/chunk-7GBL7SJY.js";
|
|
9
7
|
import "../chunks/chunk-3ZZSX5HN.js";
|
|
@@ -21,20 +19,11 @@ import {
|
|
|
21
19
|
} from "../chunks/chunk-FYQWPEEY.js";
|
|
22
20
|
|
|
23
21
|
// src/tubeMap/coarsen.ts
|
|
24
|
-
function readWalk(path,
|
|
25
|
-
const visitName = pathOrigin(path.name).name;
|
|
26
|
-
const seen = /* @__PURE__ */ new Map();
|
|
22
|
+
function readWalk(path, steps) {
|
|
27
23
|
const runs = [];
|
|
28
24
|
const open = () => ({ a: -Infinity, b: Infinity, detour: [], bp: 0 });
|
|
29
25
|
const gaps = [open()];
|
|
30
|
-
for (const
|
|
31
|
-
const node = nodeById.get(id);
|
|
32
|
-
if (!node) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
const k = seen.get(node.name) ?? 0;
|
|
36
|
-
seen.set(node.name, k + 1);
|
|
37
|
-
const strand = strands.get(`${visitName} ${node.name}`)?.[k] ?? canonicalStrand(node);
|
|
26
|
+
for (const { node, strand } of steps) {
|
|
38
27
|
const gap = gaps.at(-1);
|
|
39
28
|
const last = runs.at(-1);
|
|
40
29
|
if (isBackbone(node)) {
|
|
@@ -119,13 +108,13 @@ function findCuts(walks, sigma, cuts) {
|
|
|
119
108
|
}
|
|
120
109
|
}
|
|
121
110
|
}
|
|
111
|
+
const spans = walks.flatMap(({ runs, gaps }) => [
|
|
112
|
+
...gaps.filter((g) => isSmall(g, sigma)).map((g) => [g.a, g.b]),
|
|
113
|
+
...runs.filter((r) => r.inverted && r.end - r.start < sigma).map((r) => [r.start, r.end])
|
|
114
|
+
]);
|
|
122
115
|
for (let changed = true; changed; ) {
|
|
123
116
|
changed = false;
|
|
124
117
|
const sorted = [...cuts.keys()].sort((x, y) => x - y);
|
|
125
|
-
const spans = walks.flatMap(({ runs, gaps }) => [
|
|
126
|
-
...gaps.filter((g) => isSmall(g, sigma)).map((g) => [g.a, g.b]),
|
|
127
|
-
...runs.filter((r) => r.inverted && r.end - r.start < sigma).map((r) => [r.start, r.end])
|
|
128
|
-
]);
|
|
129
118
|
for (const [a, b] of spans) {
|
|
130
119
|
if (strictlyInside(sorted, a, b)) {
|
|
131
120
|
changed ||= !cuts.has(a) || !cuts.has(b);
|
|
@@ -179,9 +168,8 @@ function coarsenTubeMap(graph, sigma) {
|
|
|
179
168
|
if (backbone.length === 0 || paths.length === 0) {
|
|
180
169
|
return void 0;
|
|
181
170
|
}
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const walks = paths.map((p) => readWalk(p, nodeById, strands));
|
|
171
|
+
const stepsOf = pathSteps(graph);
|
|
172
|
+
const walks = paths.map((p, i) => readWalk(p, stepsOf[i]));
|
|
185
173
|
const cuts = findCuts(walks, sigma, referenceGaps(backbone));
|
|
186
174
|
const sortedCuts = [...cuts.keys()].sort((x, y) => x - y);
|
|
187
175
|
const merged = mergeReference(backbone, cuts);
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connectorAt,
|
|
3
3
|
drawTubeMapConnectors,
|
|
4
|
-
referenceNodes,
|
|
5
4
|
tubeMapConnectors
|
|
6
|
-
} from "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-FYQWPEEY.js";
|
|
5
|
+
} from "../chunks/chunk-YOYLCLIG.js";
|
|
8
6
|
export {
|
|
9
7
|
connectorAt,
|
|
10
8
|
drawTubeMapConnectors,
|
|
11
|
-
referenceNodes,
|
|
12
9
|
tubeMapConnectors
|
|
13
10
|
};
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunks/chunk-
|
|
2
|
+
referenceBoxes
|
|
3
|
+
} from "../chunks/chunk-BPRXQ2SS.js";
|
|
4
|
+
import "../chunks/chunk-3ZZSX5HN.js";
|
|
5
|
+
import "../chunks/chunk-AB35TJST.js";
|
|
6
|
+
import "../chunks/chunk-TAMCZHLW.js";
|
|
7
|
+
import "../chunks/chunk-N6FECAXP.js";
|
|
8
|
+
import "../chunks/chunk-2CVHXFK7.js";
|
|
9
|
+
import "../chunks/chunk-CPMHA4W5.js";
|
|
10
|
+
import "../chunks/chunk-FYQWPEEY.js";
|
|
4
11
|
|
|
5
12
|
// src/tubeMap/deviations.ts
|
|
6
|
-
function boxesOf(graph, layout) {
|
|
7
|
-
const nodeById = new Map(graph.nodes.map((n) => [n.id, n]));
|
|
8
|
-
const boxes = [];
|
|
9
|
-
layout.nodes.forEach((node, index) => {
|
|
10
|
-
const g = nodeById.get(node.name);
|
|
11
|
-
if (node.order >= 0 && g && isBackbone(g)) {
|
|
12
|
-
const bp0 = g.stable.start;
|
|
13
|
-
boxes.push({ bp0, bp1: bp0 + node.sequenceLength, index, node });
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return boxes.sort((a, b) => a.bp0 - b.bp0);
|
|
17
|
-
}
|
|
18
13
|
function boxAt(boxes, bp, visited) {
|
|
19
14
|
let lo = 0;
|
|
20
15
|
let hi = boxes.length - 1;
|
|
@@ -30,8 +25,9 @@ function boxAt(boxes, bp, visited) {
|
|
|
30
25
|
(box) => box && visited.has(box.index) && box.bp0 <= bp && bp <= box.bp1
|
|
31
26
|
);
|
|
32
27
|
}
|
|
33
|
-
function deviationMarks(
|
|
34
|
-
const
|
|
28
|
+
function deviationMarks(drawing, deviations) {
|
|
29
|
+
const { layout } = drawing;
|
|
30
|
+
const boxes = [...referenceBoxes(drawing).values()].flat().sort((a, b) => a.bp0 - b.bp0);
|
|
35
31
|
const marks = [];
|
|
36
32
|
for (const track of layout.tracks) {
|
|
37
33
|
const devs = track.name ? deviations.get(track.name) : void 0;
|
|
@@ -45,12 +41,12 @@ function deviationMarks(graph, layout, deviations) {
|
|
|
45
41
|
for (const d of devs) {
|
|
46
42
|
const box = boxAt(boxes, d.start, visited);
|
|
47
43
|
if (box) {
|
|
48
|
-
const {
|
|
49
|
-
const at = (bp) =>
|
|
44
|
+
const { bp0, bp1, x0, x1, index } = box;
|
|
45
|
+
const at = (bp) => x0 + (Math.min(bp, bp1) - bp0) / (bp1 - bp0) * (x1 - x0);
|
|
50
46
|
marks.push({
|
|
51
47
|
x0: at(d.start),
|
|
52
48
|
x1: at(d.end),
|
|
53
|
-
y: visited.get(
|
|
49
|
+
y: visited.get(index),
|
|
54
50
|
height: track.width
|
|
55
51
|
});
|
|
56
52
|
}
|
package/dist/tubeMap/draw.js
CHANGED
|
@@ -4,10 +4,12 @@ import {
|
|
|
4
4
|
mismatchesLegible,
|
|
5
5
|
parsePath,
|
|
6
6
|
trackColors,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
tubeMapMismatchAt,
|
|
8
|
+
tubeMapPicture,
|
|
9
|
+
tubeMapTrackAt
|
|
10
|
+
} from "../chunks/chunk-LLP3FXPM.js";
|
|
11
|
+
import "../chunks/chunk-XXT2JCAC.js";
|
|
12
|
+
import "../chunks/chunk-CWFNEKST.js";
|
|
11
13
|
import "../chunks/chunk-C44YRP5F.js";
|
|
12
14
|
export {
|
|
13
15
|
drawTubeMap,
|
|
@@ -15,5 +17,7 @@ export {
|
|
|
15
17
|
mismatchesLegible,
|
|
16
18
|
parsePath,
|
|
17
19
|
trackColors,
|
|
18
|
-
|
|
20
|
+
tubeMapMismatchAt,
|
|
21
|
+
tubeMapPicture,
|
|
22
|
+
tubeMapTrackAt
|
|
19
23
|
};
|
package/dist/tubeMap/genes.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
drawTubeMapGenes,
|
|
4
4
|
tubeMapGeneRows,
|
|
5
5
|
tubeMapGenes
|
|
6
|
-
} from "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-WEDZ76AK.js";
|
|
7
|
+
import "../chunks/chunk-BPRXQ2SS.js";
|
|
8
8
|
import "../chunks/chunk-3ZZSX5HN.js";
|
|
9
9
|
import "../chunks/chunk-AB35TJST.js";
|
|
10
10
|
import "../chunks/chunk-TAMCZHLW.js";
|
package/dist/tubeMap/reads.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -31,18 +31,18 @@ export type { AxisScale } from './util/geometry.js';
|
|
|
31
31
|
export { wheelZoomFactor } from './util/wheelZoom.js';
|
|
32
32
|
export { REFERENCE_STRIP_ZONE_PX, drawReferenceStrip, referenceStripBlocks, stripBlockAt, } from './referenceStrip.js';
|
|
33
33
|
export type { StripBlock } from './referenceStrip.js';
|
|
34
|
-
export { drawTubeMap, tubeMapPicture } from './tubeMap/draw.js';
|
|
34
|
+
export { drawTubeMap, tubeMapMismatchAt, tubeMapPicture, tubeMapTrackAt, } from './tubeMap/draw.js';
|
|
35
35
|
export type { TubeMapFrame, TubeMapPicture } from './tubeMap/draw.js';
|
|
36
36
|
export { tubeMapNodeColors } from './tubeMap/nodeColors.js';
|
|
37
37
|
export { referenceKnots, warpX } from './tubeMap/warp.js';
|
|
38
38
|
export { tubeMapFrame, tubeMapNodeAt } from './tubeMap/frame.js';
|
|
39
39
|
export type { TubeMapTransform, TubeMapView } from './tubeMap/frame.js';
|
|
40
40
|
export { drawTubeMapRuler, referenceBoxes, rulerBoxes, tubeX, } from './tubeMap/axis.js';
|
|
41
|
-
export type { Box as TubeMapBox, ReferenceBoxes } from './tubeMap/axis.js';
|
|
41
|
+
export type { Box as TubeMapBox, ReferenceBox, ReferenceBoxes, } from './tubeMap/axis.js';
|
|
42
42
|
export { drawTubeMapGenes, tubeMapGenes } from './tubeMap/genes.js';
|
|
43
43
|
export type { TubeMapGene } from './tubeMap/genes.js';
|
|
44
|
-
export { connectorAt, drawTubeMapConnectors,
|
|
45
|
-
export type { Connector
|
|
44
|
+
export { connectorAt, drawTubeMapConnectors, tubeMapConnectors, } from './tubeMap/connectors.js';
|
|
45
|
+
export type { Connector } from './tubeMap/connectors.js';
|
|
46
46
|
export type { TubeMapColumn, TubeMapDrawing } from './layout/tubeMapLayout.js';
|
|
47
47
|
export { deletionDrawing, deletionEdges } from './deletionEdges.js';
|
|
48
48
|
export type { DeletionDrawing, DeletionEdge } from './deletionEdges.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Coarsened } from '../tubeMap/coarsen.js';
|
|
2
|
-
import type { Graph, LayoutResult } from '../types.js';
|
|
2
|
+
import type { Graph, GraphNode, LayoutResult } from '../types.js';
|
|
3
3
|
import type { InputTrack, TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
4
4
|
export interface TubeMapColumn {
|
|
5
5
|
order: number;
|
|
@@ -14,10 +14,23 @@ export interface TubeMapDrawing {
|
|
|
14
14
|
yOffset: number;
|
|
15
15
|
columns?: TubeMapColumn[];
|
|
16
16
|
coarse?: Coarsened;
|
|
17
|
+
graph: Graph;
|
|
18
|
+
members: Map<string, string[]>;
|
|
17
19
|
}
|
|
18
|
-
export
|
|
20
|
+
export interface PathStep {
|
|
21
|
+
node: GraphNode;
|
|
22
|
+
strand: '+' | '-';
|
|
23
|
+
}
|
|
24
|
+
export declare function pathSteps(graph: Graph): PathStep[][];
|
|
19
25
|
export declare function tubeMapTracks(graph: Graph): InputTrack[];
|
|
20
26
|
export declare function hasTubeMapPaths(graph: Graph): boolean;
|
|
21
27
|
export declare function tubeWidth(trackCount: number): number;
|
|
28
|
+
export interface MergedRuns {
|
|
29
|
+
members: Map<string, string[]>;
|
|
30
|
+
flipped: Set<string>;
|
|
31
|
+
}
|
|
32
|
+
export declare function mergedRuns(graph: Graph, layout: TubeMapLayout, walks: readonly InputTrack[]): MergedRuns;
|
|
33
|
+
export declare function boxGraph(graph: Graph, { members, flipped }: MergedRuns): Graph;
|
|
22
34
|
export declare function tubeMapLayout(graph: Graph): LayoutResult | undefined;
|
|
35
|
+
export declare function hasTubeMapBackbone(graph: Graph): boolean;
|
|
23
36
|
export declare function tubeMapReferenceLayout(graph: Graph): LayoutResult | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { anchoredLayout } from './layout/anchoredLayout.js';
|
|
2
2
|
import { orderedLayout } from './layout/orderedLayout.js';
|
|
3
3
|
import { sampleRowLayout } from './layout/sampleRowLayout.js';
|
|
4
|
-
import { hasTubeMapPaths, tubeMapLayout, tubeMapReferenceLayout } from './layout/tubeMapLayout.js';
|
|
4
|
+
import { hasTubeMapBackbone, hasTubeMapPaths, tubeMapLayout, tubeMapReferenceLayout } from './layout/tubeMapLayout.js';
|
|
5
5
|
import { walkRowLayout } from './layout/walkRowLayout.js';
|
|
6
6
|
import type { Graph, LayoutResult } from './types.js';
|
|
7
7
|
export declare const FORCE_LAYOUT_LABEL = "Force-directed layout";
|
|
@@ -76,8 +76,8 @@ export declare const LAYOUT_MODES: readonly [{
|
|
|
76
76
|
readonly run: typeof tubeMapReferenceLayout;
|
|
77
77
|
readonly cutMargins: true;
|
|
78
78
|
readonly wholeWalks: false;
|
|
79
|
-
readonly available:
|
|
80
|
-
readonly drawsLocally:
|
|
79
|
+
readonly available: typeof hasTubeMapBackbone;
|
|
80
|
+
readonly drawsLocally: typeof hasTubeMapBackbone;
|
|
81
81
|
readonly drawsNodes: false;
|
|
82
82
|
}, {
|
|
83
83
|
readonly value: "force";
|
|
@@ -150,8 +150,8 @@ export declare function layoutModeByValue(value: string): {
|
|
|
150
150
|
readonly run: typeof tubeMapReferenceLayout;
|
|
151
151
|
readonly cutMargins: true;
|
|
152
152
|
readonly wholeWalks: false;
|
|
153
|
-
readonly available:
|
|
154
|
-
readonly drawsLocally:
|
|
153
|
+
readonly available: typeof hasTubeMapBackbone;
|
|
154
|
+
readonly drawsLocally: typeof hasTubeMapBackbone;
|
|
155
155
|
readonly drawsNodes: false;
|
|
156
156
|
} | {
|
|
157
157
|
readonly value: "force";
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { TubeMapFrame } from './draw.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type { TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
2
|
+
import type { TubeMapDrawing } from '../layout/tubeMapLayout.js';
|
|
4
3
|
export interface Box {
|
|
5
4
|
bp0: number;
|
|
6
5
|
bp1: number;
|
|
7
6
|
x0: number;
|
|
8
7
|
x1: number;
|
|
9
8
|
}
|
|
10
|
-
export
|
|
9
|
+
export interface ReferenceBox extends Box {
|
|
10
|
+
name: string;
|
|
11
|
+
index: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function referenceBoxes({ graph, layout, }: Pick<TubeMapDrawing, 'graph' | 'layout'>): Map<string, ReferenceBox[]>;
|
|
11
14
|
export type ReferenceBoxes = ReturnType<typeof referenceBoxes>;
|
|
12
15
|
export declare function tubeX(boxes: readonly Box[], bp: number, isEnd?: boolean): number;
|
|
13
16
|
export declare function tubeSpan(boxes: readonly Box[], start: number, end: number): {
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
3
|
-
export interface ReferenceNode {
|
|
4
|
-
node: string;
|
|
5
|
-
bp0: number;
|
|
6
|
-
bp1: number;
|
|
7
|
-
x0: number;
|
|
8
|
-
x1: number;
|
|
9
|
-
}
|
|
1
|
+
import type { ReferenceBox } from './axis.js';
|
|
10
2
|
export interface Connector {
|
|
11
3
|
node: string;
|
|
12
4
|
top0: number;
|
|
@@ -14,8 +6,7 @@ export interface Connector {
|
|
|
14
6
|
bottom0: number;
|
|
15
7
|
bottom1: number;
|
|
16
8
|
}
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function tubeMapConnectors(nodes: readonly ReferenceNode[], bpToScreen: (bp: number) => number, tubeToScreen: (tx: number) => number, width: number): Connector[];
|
|
9
|
+
export declare function tubeMapConnectors(boxes: readonly ReferenceBox[], bpToScreen: (bp: number) => number, tubeToScreen: (tx: number) => number, width: number): Connector[];
|
|
19
10
|
export declare function connectorAt(connectors: readonly Connector[], zoneBottom: number, sx: number, sy: number): string | undefined;
|
|
20
11
|
export declare function drawTubeMapConnectors(ctx: CanvasRenderingContext2D, connectors: readonly Connector[], bottom: number, { highlightNode, darkMode, }: {
|
|
21
12
|
highlightNode?: string | null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Deviation } from './coarsen.js';
|
|
2
2
|
import type { TubeMapFrame } from './draw.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type { TubeMapLayout } from '@jbrowse/tubemap-core';
|
|
3
|
+
import type { TubeMapDrawing } from '../layout/tubeMapLayout.js';
|
|
5
4
|
export interface DeviationMark {
|
|
6
5
|
x0: number;
|
|
7
6
|
x1: number;
|
|
8
7
|
y: number;
|
|
9
8
|
height: number;
|
|
10
9
|
}
|
|
11
|
-
export declare function deviationMarks(
|
|
10
|
+
export declare function deviationMarks(drawing: Pick<TubeMapDrawing, 'graph' | 'layout'>, deviations: Map<string, Deviation[]>): DeviationMark[];
|
|
12
11
|
export declare function deviationInk(darkMode?: boolean): "rgba(255,255,255,0.9)" | "rgba(0,0,0,0.8)";
|
|
13
12
|
export declare function drawDeviationMarks(ctx: CanvasRenderingContext2D, marks: readonly DeviationMark[], { x, y, width, darkMode }: TubeMapFrame): void;
|
|
@@ -32,7 +32,8 @@ type Command = {
|
|
|
32
32
|
export declare function parsePath(d: string): Command[];
|
|
33
33
|
interface Filled {
|
|
34
34
|
color: string;
|
|
35
|
-
|
|
35
|
+
id: number;
|
|
36
|
+
haplotype: boolean;
|
|
36
37
|
x0: number;
|
|
37
38
|
x1: number;
|
|
38
39
|
}
|
|
@@ -70,4 +71,6 @@ export interface TubeMapFrame extends TubeMapTransform {
|
|
|
70
71
|
export declare function drawTubeMap(ctx: CanvasRenderingContext2D, picture: TubeMapPicture, frame: TubeMapFrame): void;
|
|
71
72
|
export declare function mismatchesLegible(yScale: number): boolean;
|
|
72
73
|
export declare function mismatchOnScreen(m: TubeMapMismatch, { x, width }: Pick<TubeMapFrame, 'x' | 'width'>): boolean;
|
|
74
|
+
export declare function tubeMapTrackAt(picture: TubeMapPicture, { x, y }: TubeMapTransform, sx: number, sy: number): number | undefined;
|
|
75
|
+
export declare function tubeMapMismatchAt(picture: TubeMapPicture, frame: TubeMapTransform, sx: number, sy: number): TubeMapMismatch | undefined;
|
|
73
76
|
export {};
|
|
@@ -3,7 +3,6 @@ interface MarkBase {
|
|
|
3
3
|
readId: number;
|
|
4
4
|
y: number;
|
|
5
5
|
height: number;
|
|
6
|
-
nodeY: number;
|
|
7
6
|
}
|
|
8
7
|
export type TubeMapMismatch = (MarkBase & {
|
|
9
8
|
kind: 'insertion';
|
|
@@ -14,6 +13,7 @@ export type TubeMapMismatch = (MarkBase & {
|
|
|
14
13
|
kind: 'deletion';
|
|
15
14
|
x0: number;
|
|
16
15
|
x1: number;
|
|
16
|
+
length: number;
|
|
17
17
|
}) | (MarkBase & {
|
|
18
18
|
kind: 'substitution';
|
|
19
19
|
x0: number;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "9.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": "9.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": {
|