@jbrowse/bandage-core 11.7.0 → 11.7.3
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 +58 -40
- package/dist/bubbles/bubbleHalos.js +5 -4
- package/dist/bubbles/classifyBubble.js +4 -3
- package/dist/bubbles/superbubbles.js +6 -5
- package/dist/chunks/{chunk-YEYQFNFQ.js → chunk-2T3V6Z3M.js} +1 -1
- package/dist/chunks/{chunk-6YRSOL4K.js → chunk-2US43KNG.js} +1 -1
- package/dist/chunks/{chunk-OYCQVJYY.js → chunk-33KUO34R.js} +1 -1
- package/dist/chunks/{chunk-KJDERUQF.js → chunk-4KOYS5WR.js} +44 -9
- package/dist/chunks/{chunk-NTKWT6XL.js → chunk-4SN7R4UF.js} +1 -1
- package/dist/chunks/{chunk-SIA75TEG.js → chunk-63XWYNID.js} +1 -1
- package/dist/chunks/{chunk-2XEAITWM.js → chunk-6RB5ZQ34.js} +1 -1
- package/dist/chunks/{chunk-ZHZRAYEM.js → chunk-AJQRKN3X.js} +1 -1
- package/dist/chunks/{chunk-SNF2MIEF.js → chunk-AWJJSA7D.js} +1 -1
- package/dist/chunks/{chunk-KZMSSPS6.js → chunk-BLDUBB7X.js} +1 -1
- package/dist/chunks/{chunk-IJCSW6MV.js → chunk-CL6ELLVF.js} +1 -1
- package/dist/chunks/{chunk-A7Q7RTWX.js → chunk-EPOPGV5G.js} +1 -1
- package/dist/chunks/{chunk-5ZQKQ24Z.js → chunk-F4CDC72I.js} +1 -1
- package/dist/chunks/{chunk-BW2NMXRV.js → chunk-GD6RUZU5.js} +1 -1
- package/dist/chunks/{chunk-GZ36HNPJ.js → chunk-IHM43Y7B.js} +1 -1
- package/dist/chunks/{chunk-DTEXQ65J.js → chunk-K4KVAMEF.js} +1 -1
- package/dist/chunks/{chunk-C6E6HXP5.js → chunk-KMLATBNT.js} +2 -2
- package/dist/chunks/{chunk-56L6R6D2.js → chunk-LH436HS2.js} +1 -1
- package/dist/chunks/{chunk-T3H5ELLA.js → chunk-N73RA4DR.js} +1 -1
- package/dist/chunks/{chunk-DV5B5UU7.js → chunk-P276TWPM.js} +6 -2
- package/dist/chunks/{chunk-HELOUO6K.js → chunk-PKGPSTRW.js} +1 -1
- package/dist/chunks/{chunk-KA4F3N55.js → chunk-QJC63NFR.js} +2 -2
- package/dist/chunks/{chunk-QCOVHLJO.js → chunk-QLLKALSH.js} +1 -1
- package/dist/chunks/{chunk-HERVZPWA.js → chunk-QXBQDHKL.js} +11 -11
- package/dist/chunks/{chunk-SVPR7IZO.js → chunk-SG7VQB4F.js} +1 -1
- package/dist/chunks/{chunk-EH5JZETS.js → chunk-T3MEG5D3.js} +7 -7
- package/dist/chunks/chunk-TLWXLNLY.js +124 -0
- package/dist/chunks/{chunk-WWIUC4N4.js → chunk-UTDMFVC7.js} +7 -7
- package/dist/chunks/{chunk-DD5EZG3T.js → chunk-VNF236GG.js} +1 -1
- package/dist/chunks/{chunk-JGHZ3N34.js → chunk-VXKL2ZLR.js} +2 -2
- package/dist/chunks/{chunk-VO6FKNZE.js → chunk-W5YRBEWQ.js} +1 -1
- package/dist/chunks/{chunk-YER6TUXV.js → chunk-XKPXOIWD.js} +2 -2
- package/dist/chunks/{chunk-65YCFVS4.js → chunk-XTCIKBWM.js} +1 -1
- package/dist/chunks/{chunk-DUREQSOJ.js → chunk-Z4HXW6ZH.js} +2 -2
- package/dist/chunks/{chunk-3PZSBNLI.js → chunk-ZZZ6NVLW.js} +19 -14
- package/dist/cli/figure.js +24 -23
- package/dist/cli/fold.js +5 -4
- package/dist/deletionEdges.js +2 -1
- package/dist/figure.js +21 -20
- package/dist/figureData.js +18 -17
- package/dist/figureScene.js +13 -12
- package/dist/figureSettings.js +5 -4
- package/dist/foldVariants.js +1 -1
- package/dist/graphLabels.js +3 -2
- package/dist/index.js +33 -32
- package/dist/labelLayout.js +7 -6
- package/dist/layout/forceCache.js +5 -4
- package/dist/layout/orientToReference.js +3 -1
- package/dist/layout/trimToWindow.js +9 -101
- package/dist/layout/tubeMapLayout.js +5 -4
- package/dist/layout/walkRowDraw.js +7 -6
- package/dist/layout/walkStrip.js +8 -7
- package/dist/layoutModes.js +6 -5
- package/dist/pathColors.js +4 -3
- package/dist/pipeline.js +4 -3
- package/dist/referenceStrip.js +7 -6
- package/dist/renderer/GeometryBuilder.js +6 -5
- package/dist/tubeMap/axis.js +4 -3
- package/dist/tubeMap/bundle.js +6 -5
- package/dist/tubeMap/coarsen.js +6 -5
- package/dist/tubeMap/deviations.js +7 -6
- package/dist/tubeMap/genes.js +5 -4
- package/dist/tubeMap/nodeColors.js +7 -6
- package/dist/types/deletionEdges.d.ts +1 -1
- package/dist/types/foldVariants.d.ts +3 -1
- package/dist/types/layout/trimToWindow.d.ts +1 -0
- package/dist/types/types.d.ts +5 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/util/SpatialIndex.js +4 -3
- package/dist/util/edgeCurves.js +3 -2
- package/dist/util/hitDetection.js +5 -4
- package/dist/version.js +1 -1
- package/dist/viewport.js +5 -4
- package/dist/walkEncoding.js +7 -6
- package/dist/walkHighlight.js +8 -7
- package/dist/walkKey.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,47 +1,60 @@
|
|
|
1
1
|
# @jbrowse/bandage-core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript library that lays out and draws pangenome graphs, used by
|
|
4
4
|
[jbrowse-plugin-graphgenomeviewer](https://github.com/GMOD/jbrowse-plugin-graphgenomeviewer)
|
|
5
|
-
and [BandageJS](https://github.com/cmdcolin/BandageJS).
|
|
5
|
+
and [BandageJS](https://github.com/cmdcolin/BandageJS). It imports no React,
|
|
6
|
+
MobX or JBrowse code. BandageJS's
|
|
7
|
+
[`src/main.ts`](https://github.com/cmdcolin/BandageJS/blob/main/src/main.ts) is
|
|
8
|
+
the worked example.
|
|
6
9
|
|
|
7
10
|
```
|
|
8
11
|
npm install @jbrowse/bandage-core
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
14
|
+
## Reading a graph
|
|
15
|
+
|
|
16
|
+
- `loadGraph` reads GFA or rGFA text. The caller decompresses a `.gfa.gz` first
|
|
17
|
+
- `loadGraph` also takes `GraphTables`, the typed arrays that
|
|
18
|
+
[@jbrowse/graph-walks](https://github.com/GMOD/graph-walks) cuts from a
|
|
19
|
+
[gfa-to-tabix](https://github.com/GMOD/gfa-to-tabix) walk file
|
|
20
|
+
(`.walks.bed.gz` beside its `.tbi`) for a region on the reference. A worker
|
|
21
|
+
can transfer them without copying, and `graphTablesGFA` writes them as GFA
|
|
22
|
+
- `openGbz` and `cutGbzRegion` cut a window from a
|
|
23
|
+
[gbz-base](https://github.com/jltsiren/gbz-base) database (`.gbz.db`) to GFA
|
|
24
|
+
text
|
|
25
|
+
- In a walk-file cut, the `ws:Z:` and `we:Z:` tags on each W line record what
|
|
26
|
+
lies past the fragment's start and end, such as `break,bp=19021` or
|
|
15
27
|
`elsewhere,trimmed=400,chunk=GRCh38#0#chr22:20316160`
|
|
16
|
-
(`src/gfa/walkStops.ts`). Walk rows split each gap
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
and
|
|
28
|
+
(`src/gfa/walkStops.ts`). Walk rows split each gap at those stops and label
|
|
29
|
+
each part with its cause
|
|
30
|
+
|
|
31
|
+
## Laying out and drawing
|
|
32
|
+
|
|
33
|
+
- `loadBandage` loads Bandage's FMMM engine, compiled to WASM in
|
|
34
|
+
[@jbrowse/graph-fmmm-layout](https://github.com/GMOD/graph-fmmm-layout), and
|
|
35
|
+
`forceLayout` runs it. The other layouts are ordered, anchored, sample rows,
|
|
36
|
+
walk rows and tube map
|
|
37
|
+
- `buildGeometry` and `Canvas2DRenderer` draw to a canvas, with hit testing and
|
|
38
|
+
label placement. The library also finds bubbles and deletion edges and colors
|
|
39
|
+
paths
|
|
40
|
+
- `walkLift` lifts a walk out of the drawing, `facetLifts` and `facetGrid` draw
|
|
41
|
+
one panel per walk, and `walkKey` describes each walk in words
|
|
42
|
+
- `graphBackbone`, `backboneAssembly` and `assemblyWalk` find which assembly a
|
|
43
|
+
backbone lies on. `featuresOnBackbone` renames that assembly's genes onto the
|
|
44
|
+
backbone's refNames, and `genePins` pins only those
|
|
45
|
+
|
|
46
|
+
## Figures and the coarse tier
|
|
47
|
+
|
|
48
|
+
- `figureSvg` draws a graph and its lifted walks to a standalone SVG. The
|
|
49
|
+
`bandage-figure` CLI makes one from a JSON spec with no browser:
|
|
33
50
|
`npx -p @jbrowse/bandage-core bandage-figure spec.json -o figure.svg`. See
|
|
34
51
|
[docs/figures.md](docs/figures.md)
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
[docs/coarse-tier.md](docs/coarse-tier.md)
|
|
38
|
-
- Figure data: `figureData` returns what `figureSvg` would paint as columnar
|
|
39
|
-
tables, for another graphics system to draw;
|
|
52
|
+
- `figureData` returns what `figureSvg` would draw as columnar tables, for
|
|
53
|
+
another graphics system to draw;
|
|
40
54
|
[ggbandage](https://github.com/GMOD/ggbandage) draws them in ggplot2
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[
|
|
44
|
-
the worked example.
|
|
55
|
+
- The `bandage-fold` CLI folds every variant under a size into the reference, so
|
|
56
|
+
a graph track can draw a whole chromosome. See
|
|
57
|
+
[docs/coarse-tier.md](docs/coarse-tier.md)
|
|
45
58
|
|
|
46
59
|
## Developing
|
|
47
60
|
|
|
@@ -51,27 +64,32 @@ pnpm test # unit tests
|
|
|
51
64
|
pnpm build # dist/ with declarations
|
|
52
65
|
```
|
|
53
66
|
|
|
54
|
-
The FMMM engine and its wasm build
|
|
67
|
+
The FMMM engine and its wasm build are in
|
|
55
68
|
[graph-fmmm-layout](https://github.com/GMOD/graph-fmmm-layout).
|
|
56
69
|
|
|
57
|
-
CI also packs the core and runs
|
|
70
|
+
CI also packs the core and runs the typecheck and tests of
|
|
58
71
|
[BandageJS](https://github.com/cmdcolin/BandageJS) and
|
|
59
72
|
[jbrowse-plugin-graphgenomeviewer](https://github.com/GMOD/jbrowse-plugin-graphgenomeviewer)
|
|
60
|
-
against it.
|
|
61
|
-
in that repo, which CI tests in place of `main`
|
|
73
|
+
against it. For an API change, push the consumer's matching change to a
|
|
74
|
+
`core-next` branch in that consumer's repo, which CI tests in place of `main`
|
|
75
|
+
until the release.
|
|
62
76
|
|
|
63
77
|
Release with `pnpm version patch`: it lints, tests, stamps `src/version.ts`,
|
|
64
78
|
writes the changelog with git-cliff and pushes the `v*` tag. `publish.yml` then
|
|
65
79
|
runs CI, consumers included, and publishes to npm with trusted publishing only
|
|
66
|
-
if it passes. When a consumer fails,
|
|
80
|
+
if it passes. When a consumer fails, push its side to `core-next` and rerun the
|
|
67
81
|
failed jobs.
|
|
68
82
|
|
|
69
83
|
## See also
|
|
70
84
|
|
|
71
85
|
- [jbrowse-plugin-graphgenomeviewer](https://github.com/GMOD/jbrowse-plugin-graphgenomeviewer) -
|
|
72
86
|
JBrowse 2 plugin that browses these graphs by locus
|
|
73
|
-
- [BandageJS](https://github.com/cmdcolin/BandageJS) -
|
|
74
|
-
and gbz-base
|
|
87
|
+
- [BandageJS](https://github.com/cmdcolin/BandageJS) - browser viewer for GFA
|
|
88
|
+
files, walk files and gbz-base databases
|
|
89
|
+
- [gfa-to-tabix](https://github.com/GMOD/gfa-to-tabix) - indexes a GFA by
|
|
90
|
+
reference position, writing the `.walks.bed.gz` walk files
|
|
91
|
+
- [@jbrowse/graph-walks](https://github.com/GMOD/graph-walks) - range-request
|
|
92
|
+
reader for walk files
|
|
75
93
|
- [@jbrowse/graph-fmmm-layout](https://github.com/GMOD/graph-fmmm-layout) -
|
|
76
94
|
Bandage's FMMM layout as wasm
|
|
77
95
|
- [@jbrowse/graph-stress-layout](https://github.com/GMOD/graph-stress-layout) -
|
|
@@ -83,7 +101,7 @@ failed jobs.
|
|
|
83
101
|
- [@jbrowse/tubemap-core](https://github.com/GMOD/tubemap-core) -
|
|
84
102
|
sequenceTubeMap's layout, without the DOM
|
|
85
103
|
|
|
86
|
-
Tutorials on [jbrowse.org](https://jbrowse.org/jb2/docs/tutorials/)
|
|
104
|
+
Tutorials on [jbrowse.org](https://jbrowse.org/jb2/docs/tutorials/):
|
|
87
105
|
|
|
88
106
|
- [HPRC part 1: graph alleles and haplotypes](https://jbrowse.org/jb2/docs/tutorials/pangenome_hprc/)
|
|
89
107
|
- [HPRC part 3: repeat lengths](https://jbrowse.org/jb2/docs/tutorials/pangenome_hprc_repeats/)
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubbleHalos,
|
|
3
3
|
coversGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-BLDUBB7X.js";
|
|
5
|
+
import "../chunks/chunk-AWJJSA7D.js";
|
|
6
6
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
7
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-N73RA4DR.js";
|
|
8
8
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
9
9
|
import "../chunks/chunk-AB35TJST.js";
|
|
10
10
|
import "../chunks/chunk-2VMKQKVO.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
11
|
+
import "../chunks/chunk-P276TWPM.js";
|
|
12
|
+
import "../chunks/chunk-TLWXLNLY.js";
|
|
12
13
|
import "../chunks/chunk-3YBP46PB.js";
|
|
13
14
|
import "../chunks/chunk-VACK24HF.js";
|
|
14
15
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
BUBBLE_KIND_NAMES,
|
|
4
4
|
bubbleSegmentIds,
|
|
5
5
|
classifyBubble
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-AWJJSA7D.js";
|
|
7
7
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
8
|
+
import "../chunks/chunk-N73RA4DR.js";
|
|
9
9
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
10
10
|
import "../chunks/chunk-AB35TJST.js";
|
|
11
11
|
import "../chunks/chunk-2VMKQKVO.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-P276TWPM.js";
|
|
13
|
+
import "../chunks/chunk-TLWXLNLY.js";
|
|
13
14
|
import "../chunks/chunk-3YBP46PB.js";
|
|
14
15
|
import "../chunks/chunk-VACK24HF.js";
|
|
15
16
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphBubbles,
|
|
3
3
|
superbubblesFromGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-KMLATBNT.js";
|
|
5
|
+
import "../chunks/chunk-BLDUBB7X.js";
|
|
6
6
|
import "../chunks/chunk-RFG42VIO.js";
|
|
7
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-AWJJSA7D.js";
|
|
8
8
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
9
9
|
import "../chunks/chunk-MHZTTLBU.js";
|
|
10
10
|
import "../chunks/chunk-UAFATXYA.js";
|
|
11
11
|
import "../chunks/chunk-VX656OAZ.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-N73RA4DR.js";
|
|
13
13
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
14
14
|
import "../chunks/chunk-AB35TJST.js";
|
|
15
15
|
import "../chunks/chunk-2VMKQKVO.js";
|
|
16
|
-
import "../chunks/chunk-
|
|
16
|
+
import "../chunks/chunk-P276TWPM.js";
|
|
17
|
+
import "../chunks/chunk-TLWXLNLY.js";
|
|
17
18
|
import "../chunks/chunk-3YBP46PB.js";
|
|
18
19
|
import "../chunks/chunk-VACK24HF.js";
|
|
19
20
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-RJWPJCIB.js";
|
|
10
10
|
|
|
11
11
|
// src/foldVariants.ts
|
|
12
|
-
function foldVariants(graph, belowBp) {
|
|
12
|
+
function foldVariants(graph, belowBp, { cut = false } = {}) {
|
|
13
13
|
if (!(belowBp > 0) || graph.paths?.length || !graph.nodes.some((node) => isBackbone(node))) {
|
|
14
14
|
return graph;
|
|
15
15
|
}
|
|
@@ -41,17 +41,52 @@ function foldVariants(graph, belowBp) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
const b =
|
|
47
|
-
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
const skip = skipped(nodes[a], sides[k].from, nodes[b], sides[k].to);
|
|
51
|
-
return kept[a] && kept[b] && !(skip > 0 && skip < belowBp);
|
|
44
|
+
const ends = edges.map((edge) => [index.get(edge.from), index.get(edge.to)]);
|
|
45
|
+
const keeps = edges.map((_, k) => {
|
|
46
|
+
const [a, b] = ends[k];
|
|
47
|
+
return a !== void 0 && b !== void 0 && !!kept[a] && !!kept[b];
|
|
52
48
|
});
|
|
49
|
+
const smallSkips = edges.flatMap((_, k) => {
|
|
50
|
+
const [a, b] = ends[k];
|
|
51
|
+
if (!keeps[k]) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
const bp = skipped(nodes[a], sides[k].from, nodes[b], sides[k].to);
|
|
55
|
+
return bp > 0 && bp < belowBp ? [{ k, bp }] : [];
|
|
56
|
+
}).sort((x, y) => x.bp - y.bp).map(({ k }) => k);
|
|
57
|
+
for (const k of smallSkips) {
|
|
58
|
+
keeps[k] = false;
|
|
59
|
+
}
|
|
60
|
+
const bridging = new Set(
|
|
61
|
+
cut ? bridges(nodes.length, ends, keeps, smallSkips) : []
|
|
62
|
+
);
|
|
63
|
+
const keptEdges = edges.flatMap(
|
|
64
|
+
(edge, k) => bridging.has(k) ? [{ ...edge, foldBridge: true }] : keeps[k] ? [edge] : []
|
|
65
|
+
);
|
|
53
66
|
return mergeAlleleRuns({ ...graph, nodes, edges: keptEdges }, kept, allele);
|
|
54
67
|
}
|
|
68
|
+
function bridges(count, ends, keeps, smallSkips) {
|
|
69
|
+
const parent = Array.from({ length: count }, (_, i) => i);
|
|
70
|
+
const find = (i) => {
|
|
71
|
+
while (parent[i] !== i) {
|
|
72
|
+
parent[i] = parent[parent[i]];
|
|
73
|
+
i = parent[i];
|
|
74
|
+
}
|
|
75
|
+
return i;
|
|
76
|
+
};
|
|
77
|
+
const join = (k) => {
|
|
78
|
+
const [a, b] = ends[k];
|
|
79
|
+
const [ra, rb] = [find(a), find(b)];
|
|
80
|
+
parent[ra] = rb;
|
|
81
|
+
return ra !== rb;
|
|
82
|
+
};
|
|
83
|
+
keeps.forEach((keep, k) => {
|
|
84
|
+
if (keep) {
|
|
85
|
+
join(k);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
return smallSkips.filter(join);
|
|
89
|
+
}
|
|
55
90
|
function readForward({ nodes, edges }) {
|
|
56
91
|
const reversed = new Set(
|
|
57
92
|
nodes.filter((node) => node.stable?.strand === "-").map((node) => node.id)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coversGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BLDUBB7X.js";
|
|
4
4
|
import {
|
|
5
5
|
bubblesFromGraph,
|
|
6
6
|
derivedBubble,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-RFG42VIO.js";
|
|
11
11
|
import {
|
|
12
12
|
bubbleSegmentIds
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AWJJSA7D.js";
|
|
14
14
|
import {
|
|
15
15
|
bubbleSubgraph
|
|
16
16
|
} from "./chunk-MHZTTLBU.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
unclipped
|
|
3
|
+
} from "./chunk-TLWXLNLY.js";
|
|
1
4
|
import {
|
|
2
5
|
referenceVisitStarts
|
|
3
6
|
} from "./chunk-3YBP46PB.js";
|
|
@@ -117,7 +120,8 @@ function switchesCopy(copies, start, bp) {
|
|
|
117
120
|
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];
|
|
118
121
|
return near !== void 0 && Math.abs(near.at - start) <= near.copy && Math.abs(bp - near.copy) <= near.copy * COPY_SWITCH_SHARE;
|
|
119
122
|
}
|
|
120
|
-
function deletionEdges(
|
|
123
|
+
function deletionEdges(cut) {
|
|
124
|
+
const graph = unclipped(cut);
|
|
121
125
|
const byId = new Map(graph.nodes.map((n) => [n.id, n]));
|
|
122
126
|
const backbone = backboneBySequence(graph);
|
|
123
127
|
const startsOf = referenceVisitStarts(graph);
|
|
@@ -127,7 +131,7 @@ function deletionEdges(graph) {
|
|
|
127
131
|
const edge = graph.edges[edgeIndex];
|
|
128
132
|
const from = byId.get(edge.from);
|
|
129
133
|
const to = byId.get(edge.to);
|
|
130
|
-
if (from !== void 0 && to !== void 0 && isBackbone(from) && isBackbone(to) && from.stable.refName === to.stable.refName) {
|
|
134
|
+
if (!edge.foldBridge && from !== void 0 && to !== void 0 && isBackbone(from) && isBackbone(to) && from.stable.refName === to.stable.refName) {
|
|
131
135
|
const span = skippedSpan(edge, from, to, startsOf);
|
|
132
136
|
const refName = from.stable.refName;
|
|
133
137
|
const bp = span ? span.end - span.start : 0;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
stripGeneGaps,
|
|
3
3
|
walkStripFrame,
|
|
4
4
|
walkStripLabelsTree
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PKGPSTRW.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-EPOPGV5G.js";
|
|
17
17
|
import {
|
|
18
18
|
EXON_COLOR,
|
|
19
19
|
exonOutlineTree,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
} from "./chunk-JSUCGZ6K.js";
|
|
22
22
|
import {
|
|
23
23
|
geneLabelCandidates
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QJC63NFR.js";
|
|
25
25
|
import {
|
|
26
26
|
nodesUnderBox
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LH436HS2.js";
|
|
28
28
|
import {
|
|
29
29
|
escapeAttr,
|
|
30
30
|
serializeEl
|
|
@@ -34,19 +34,19 @@ import {
|
|
|
34
34
|
} from "./chunk-BFUS3ENH.js";
|
|
35
35
|
import {
|
|
36
36
|
version
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-AJQRKN3X.js";
|
|
38
38
|
import {
|
|
39
39
|
axisScaleOf
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-F4CDC72I.js";
|
|
41
41
|
import {
|
|
42
42
|
figureScene
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-UTDMFVC7.js";
|
|
44
44
|
import {
|
|
45
45
|
encodingStops
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-6RB5ZQ34.js";
|
|
47
47
|
import {
|
|
48
48
|
rangeText
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-SG7VQB4F.js";
|
|
50
50
|
import {
|
|
51
51
|
walkRowLabels
|
|
52
52
|
} from "./chunk-SENPGW4O.js";
|
|
@@ -55,11 +55,11 @@ import {
|
|
|
55
55
|
} from "./chunk-ZANALBSX.js";
|
|
56
56
|
import {
|
|
57
57
|
FIGURE_DEFAULTS
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-4SN7R4UF.js";
|
|
59
59
|
import {
|
|
60
60
|
FIT_PADDING,
|
|
61
61
|
fitTransform
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-XKPXOIWD.js";
|
|
63
63
|
import {
|
|
64
64
|
LABEL_CHAR_PX,
|
|
65
65
|
LABEL_PAD,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-CO6RGQAD.js";
|
|
4
4
|
import {
|
|
5
5
|
layoutModeByValue
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VNF236GG.js";
|
|
7
7
|
import {
|
|
8
8
|
parseRegion
|
|
9
9
|
} from "./chunk-FNDNSDKW.js";
|
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
} from "./chunk-BFUS3ENH.js";
|
|
13
13
|
import {
|
|
14
14
|
version
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AJQRKN3X.js";
|
|
16
16
|
import {
|
|
17
17
|
axisScaleOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-F4CDC72I.js";
|
|
19
19
|
import {
|
|
20
20
|
figureScene
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UTDMFVC7.js";
|
|
22
22
|
import {
|
|
23
23
|
encodingStops
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6RB5ZQ34.js";
|
|
25
25
|
import {
|
|
26
26
|
abgrAlpha,
|
|
27
27
|
abgrBlue,
|
|
@@ -30,13 +30,13 @@ import {
|
|
|
30
30
|
} from "./chunk-G2FD7S3C.js";
|
|
31
31
|
import {
|
|
32
32
|
FIGURE_DEFAULTS
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4SN7R4UF.js";
|
|
34
34
|
import {
|
|
35
35
|
engineSettingsOf,
|
|
36
36
|
fitTransform,
|
|
37
37
|
forceLayout,
|
|
38
38
|
loadGraph
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XKPXOIWD.js";
|
|
40
40
|
import {
|
|
41
41
|
referenceVisitStarts
|
|
42
42
|
} from "./chunk-3YBP46PB.js";
|