@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.
Files changed (81) hide show
  1. package/README.md +58 -40
  2. package/dist/bubbles/bubbleHalos.js +5 -4
  3. package/dist/bubbles/classifyBubble.js +4 -3
  4. package/dist/bubbles/superbubbles.js +6 -5
  5. package/dist/chunks/{chunk-YEYQFNFQ.js → chunk-2T3V6Z3M.js} +1 -1
  6. package/dist/chunks/{chunk-6YRSOL4K.js → chunk-2US43KNG.js} +1 -1
  7. package/dist/chunks/{chunk-OYCQVJYY.js → chunk-33KUO34R.js} +1 -1
  8. package/dist/chunks/{chunk-KJDERUQF.js → chunk-4KOYS5WR.js} +44 -9
  9. package/dist/chunks/{chunk-NTKWT6XL.js → chunk-4SN7R4UF.js} +1 -1
  10. package/dist/chunks/{chunk-SIA75TEG.js → chunk-63XWYNID.js} +1 -1
  11. package/dist/chunks/{chunk-2XEAITWM.js → chunk-6RB5ZQ34.js} +1 -1
  12. package/dist/chunks/{chunk-ZHZRAYEM.js → chunk-AJQRKN3X.js} +1 -1
  13. package/dist/chunks/{chunk-SNF2MIEF.js → chunk-AWJJSA7D.js} +1 -1
  14. package/dist/chunks/{chunk-KZMSSPS6.js → chunk-BLDUBB7X.js} +1 -1
  15. package/dist/chunks/{chunk-IJCSW6MV.js → chunk-CL6ELLVF.js} +1 -1
  16. package/dist/chunks/{chunk-A7Q7RTWX.js → chunk-EPOPGV5G.js} +1 -1
  17. package/dist/chunks/{chunk-5ZQKQ24Z.js → chunk-F4CDC72I.js} +1 -1
  18. package/dist/chunks/{chunk-BW2NMXRV.js → chunk-GD6RUZU5.js} +1 -1
  19. package/dist/chunks/{chunk-GZ36HNPJ.js → chunk-IHM43Y7B.js} +1 -1
  20. package/dist/chunks/{chunk-DTEXQ65J.js → chunk-K4KVAMEF.js} +1 -1
  21. package/dist/chunks/{chunk-C6E6HXP5.js → chunk-KMLATBNT.js} +2 -2
  22. package/dist/chunks/{chunk-56L6R6D2.js → chunk-LH436HS2.js} +1 -1
  23. package/dist/chunks/{chunk-T3H5ELLA.js → chunk-N73RA4DR.js} +1 -1
  24. package/dist/chunks/{chunk-DV5B5UU7.js → chunk-P276TWPM.js} +6 -2
  25. package/dist/chunks/{chunk-HELOUO6K.js → chunk-PKGPSTRW.js} +1 -1
  26. package/dist/chunks/{chunk-KA4F3N55.js → chunk-QJC63NFR.js} +2 -2
  27. package/dist/chunks/{chunk-QCOVHLJO.js → chunk-QLLKALSH.js} +1 -1
  28. package/dist/chunks/{chunk-HERVZPWA.js → chunk-QXBQDHKL.js} +11 -11
  29. package/dist/chunks/{chunk-SVPR7IZO.js → chunk-SG7VQB4F.js} +1 -1
  30. package/dist/chunks/{chunk-EH5JZETS.js → chunk-T3MEG5D3.js} +7 -7
  31. package/dist/chunks/chunk-TLWXLNLY.js +124 -0
  32. package/dist/chunks/{chunk-WWIUC4N4.js → chunk-UTDMFVC7.js} +7 -7
  33. package/dist/chunks/{chunk-DD5EZG3T.js → chunk-VNF236GG.js} +1 -1
  34. package/dist/chunks/{chunk-JGHZ3N34.js → chunk-VXKL2ZLR.js} +2 -2
  35. package/dist/chunks/{chunk-VO6FKNZE.js → chunk-W5YRBEWQ.js} +1 -1
  36. package/dist/chunks/{chunk-YER6TUXV.js → chunk-XKPXOIWD.js} +2 -2
  37. package/dist/chunks/{chunk-65YCFVS4.js → chunk-XTCIKBWM.js} +1 -1
  38. package/dist/chunks/{chunk-DUREQSOJ.js → chunk-Z4HXW6ZH.js} +2 -2
  39. package/dist/chunks/{chunk-3PZSBNLI.js → chunk-ZZZ6NVLW.js} +19 -14
  40. package/dist/cli/figure.js +24 -23
  41. package/dist/cli/fold.js +5 -4
  42. package/dist/deletionEdges.js +2 -1
  43. package/dist/figure.js +21 -20
  44. package/dist/figureData.js +18 -17
  45. package/dist/figureScene.js +13 -12
  46. package/dist/figureSettings.js +5 -4
  47. package/dist/foldVariants.js +1 -1
  48. package/dist/graphLabels.js +3 -2
  49. package/dist/index.js +33 -32
  50. package/dist/labelLayout.js +7 -6
  51. package/dist/layout/forceCache.js +5 -4
  52. package/dist/layout/orientToReference.js +3 -1
  53. package/dist/layout/trimToWindow.js +9 -101
  54. package/dist/layout/tubeMapLayout.js +5 -4
  55. package/dist/layout/walkRowDraw.js +7 -6
  56. package/dist/layout/walkStrip.js +8 -7
  57. package/dist/layoutModes.js +6 -5
  58. package/dist/pathColors.js +4 -3
  59. package/dist/pipeline.js +4 -3
  60. package/dist/referenceStrip.js +7 -6
  61. package/dist/renderer/GeometryBuilder.js +6 -5
  62. package/dist/tubeMap/axis.js +4 -3
  63. package/dist/tubeMap/bundle.js +6 -5
  64. package/dist/tubeMap/coarsen.js +6 -5
  65. package/dist/tubeMap/deviations.js +7 -6
  66. package/dist/tubeMap/genes.js +5 -4
  67. package/dist/tubeMap/nodeColors.js +7 -6
  68. package/dist/types/deletionEdges.d.ts +1 -1
  69. package/dist/types/foldVariants.d.ts +3 -1
  70. package/dist/types/layout/trimToWindow.d.ts +1 -0
  71. package/dist/types/types.d.ts +5 -0
  72. package/dist/types/version.d.ts +1 -1
  73. package/dist/util/SpatialIndex.js +4 -3
  74. package/dist/util/edgeCurves.js +3 -2
  75. package/dist/util/hitDetection.js +5 -4
  76. package/dist/version.js +1 -1
  77. package/dist/viewport.js +5 -4
  78. package/dist/walkEncoding.js +7 -6
  79. package/dist/walkHighlight.js +8 -7
  80. package/dist/walkKey.js +4 -3
  81. package/package.json +1 -1
package/README.md CHANGED
@@ -1,47 +1,60 @@
1
1
  # @jbrowse/bandage-core
2
2
 
3
- Pangenome graph layout and drawing with no host, the engine behind
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
- - GFA and rGFA text in (`loadGraph`), or the same graph as typed arrays a worker
12
- can transfer (`GraphTables`)
13
- - A walk-file cut's W lines tag what lies past each fragment's start and end as
14
- `ws:Z:`/`we:Z:`, such as `break,bp=19021` or
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 by those stops into parts
17
- that name their cause
18
- - Layouts: Bandage's FMMM engine as WASM from
19
- [@jbrowse/graph-fmmm-layout](https://github.com/GMOD/graph-fmmm-layout)
20
- (`loadBandage`, `forceLayout`), ordered, anchored, sample rows, walk rows,
21
- tube map
22
- - A Canvas2D renderer (`buildGeometry`, `Canvas2DRenderer`), hit testing and
23
- label placement
24
- - Bubbles, deletion edges, path colors, gbz-base windows cut to GFA
25
- - Walks lifted out of the drawing (`walkLift`), one facet panel per walk
26
- (`facetLifts`, `facetGrid`) and each walk's key in words (`walkKey`)
27
- - Which assembly a backbone lies on (`graphBackbone`, `backboneAssembly`,
28
- `assemblyWalk`), and the genes on it: `featuresOnBackbone` renames an
29
- assembly's genes onto the backbone's refNames, and `genePins` pins only those
30
-
31
- - Figures: `figureSvg` draws a graph and its lifted walks to a standalone SVG,
32
- and the `bandage-figure` CLI makes one from a JSON spec with no browser:
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
- - Coarse tier: the `bandage-fold` CLI folds every variant under a size into the
36
- reference, so a graph track draws a whole chromosome. See
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
- Nothing here imports React, MobX or a JBrowse host. BandageJS's
43
- [`src/main.ts`](https://github.com/cmdcolin/BandageJS/blob/main/src/main.ts) is
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 live in
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. An API change lands with the consumer's side on a `core-next` branch
61
- in that repo, which CI tests in place of `main` until the release.
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, land its side on `core-next` and rerun the
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) - standalone page for GFA
74
- and gbz-base graphs
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-KZMSSPS6.js";
5
- import "../chunks/chunk-SNF2MIEF.js";
4
+ } from "../chunks/chunk-BLDUBB7X.js";
5
+ import "../chunks/chunk-AWJJSA7D.js";
6
6
  import "../chunks/chunk-FX4RDMDN.js";
7
- import "../chunks/chunk-T3H5ELLA.js";
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-DV5B5UU7.js";
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-SNF2MIEF.js";
6
+ } from "../chunks/chunk-AWJJSA7D.js";
7
7
  import "../chunks/chunk-FX4RDMDN.js";
8
- import "../chunks/chunk-T3H5ELLA.js";
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-DV5B5UU7.js";
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-C6E6HXP5.js";
5
- import "../chunks/chunk-KZMSSPS6.js";
4
+ } from "../chunks/chunk-KMLATBNT.js";
5
+ import "../chunks/chunk-BLDUBB7X.js";
6
6
  import "../chunks/chunk-RFG42VIO.js";
7
- import "../chunks/chunk-SNF2MIEF.js";
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-T3H5ELLA.js";
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-DV5B5UU7.js";
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";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeColorSchemeRange,
3
3
  getNodeColor
4
- } from "./chunk-JGHZ3N34.js";
4
+ } from "./chunk-VXKL2ZLR.js";
5
5
  import {
6
6
  abgrToCssRgba
7
7
  } from "./chunk-G2FD7S3C.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  baseEdgeCurves
3
- } from "./chunk-OYCQVJYY.js";
3
+ } from "./chunk-33KUO34R.js";
4
4
  import {
5
5
  curveBounds,
6
6
  pathRibbonOffsets
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-HMXCN6PG.js";
4
4
  import {
5
5
  edgeCurvesOf
6
- } from "./chunk-DV5B5UU7.js";
6
+ } from "./chunk-P276TWPM.js";
7
7
 
8
8
  // src/util/edgeCurves.ts
9
9
  var cache = weakMemo();
@@ -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 keptEdges = edges.filter((edge, k) => {
45
- const a = index.get(edge.from);
46
- const b = index.get(edge.to);
47
- if (a === void 0 || b === void 0) {
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
  ENGINE_DEFAULTS
3
- } from "./chunk-YER6TUXV.js";
3
+ } from "./chunk-XKPXOIWD.js";
4
4
 
5
5
  // src/figureSettings.ts
6
6
  var FIGURE_DEFAULTS = {
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  pathCssColor,
10
10
  pathGreyCssColor
11
- } from "./chunk-BW2NMXRV.js";
11
+ } from "./chunk-GD6RUZU5.js";
12
12
  import {
13
13
  pathOrigin
14
14
  } from "./chunk-3YBP46PB.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  REFERENCE_RAMP_ALT_COLOR,
3
3
  hslToRgb
4
- } from "./chunk-JGHZ3N34.js";
4
+ } from "./chunk-VXKL2ZLR.js";
5
5
  import {
6
6
  packAbgr
7
7
  } from "./chunk-G2FD7S3C.js";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "11.7.0";
2
+ var version = "11.7.3";
3
3
 
4
4
  export {
5
5
  version
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-FX4RDMDN.js";
4
4
  import {
5
5
  formatBp
6
- } from "./chunk-T3H5ELLA.js";
6
+ } from "./chunk-N73RA4DR.js";
7
7
 
8
8
  // src/bubbles/classifyBubble.ts
9
9
  var REPEAT_GROWTH = 10;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  bubbleSegmentIds,
3
3
  classifyBubble
4
- } from "./chunk-SNF2MIEF.js";
4
+ } from "./chunk-AWJJSA7D.js";
5
5
  import {
6
6
  svgPath
7
7
  } from "./chunk-VACK24HF.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathSteps
3
- } from "./chunk-SIA75TEG.js";
3
+ } from "./chunk-63XWYNID.js";
4
4
  import {
5
5
  pathOrigin
6
6
  } from "./chunk-3YBP46PB.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-H2H4Y3TV.js";
4
4
  import {
5
5
  REFERENCE_RAMP_ALT_CSS
6
- } from "./chunk-JGHZ3N34.js";
6
+ } from "./chunk-VXKL2ZLR.js";
7
7
  import {
8
8
  RAMP_GRADIENT_CSS,
9
9
  RAMP_GRADIENT_STOPS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clampZoom
3
- } from "./chunk-YER6TUXV.js";
3
+ } from "./chunk-XKPXOIWD.js";
4
4
 
5
5
  // src/viewport.ts
6
6
  function axisScaleOf(scale, pixelRows) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  groupDigits
3
- } from "./chunk-T3H5ELLA.js";
3
+ } from "./chunk-N73RA4DR.js";
4
4
  import {
5
5
  pathOrigin
6
6
  } from "./chunk-3YBP46PB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tubeSpan
3
- } from "./chunk-VO6FKNZE.js";
3
+ } from "./chunk-W5YRBEWQ.js";
4
4
 
5
5
  // src/tubeMap/genes.ts
6
6
  function tubeMapGenes(byRefName, genes) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  engineKey,
3
3
  forceLayout
4
- } from "./chunk-YER6TUXV.js";
4
+ } from "./chunk-XKPXOIWD.js";
5
5
 
6
6
  // src/layout/forceCache.ts
7
7
  var DEFAULT_SIZE = 4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  coversGraph
3
- } from "./chunk-KZMSSPS6.js";
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-SNF2MIEF.js";
13
+ } from "./chunk-AWJJSA7D.js";
14
14
  import {
15
15
  bubbleSubgraph
16
16
  } from "./chunk-MHZTTLBU.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EdgeSpatialIndex,
3
3
  SpatialIndex
4
- } from "./chunk-6YRSOL4K.js";
4
+ } from "./chunk-2US43KNG.js";
5
5
  import {
6
6
  weakMemo
7
7
  } from "./chunk-HMXCN6PG.js";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-2VMKQKVO.js";
11
11
  import {
12
12
  edgeCurvesOf
13
- } from "./chunk-DV5B5UU7.js";
13
+ } from "./chunk-P276TWPM.js";
14
14
  import {
15
15
  curveBounds,
16
16
  curveMidpoint,
@@ -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(graph) {
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;
@@ -3,7 +3,7 @@ import {
3
3
  boxesGenes,
4
4
  rowPitch,
5
5
  rowSpan
6
- } from "./chunk-A7Q7RTWX.js";
6
+ } from "./chunk-EPOPGV5G.js";
7
7
  import {
8
8
  el
9
9
  } from "./chunk-H2H4Y3TV.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  nodesUnderBox
3
- } from "./chunk-56L6R6D2.js";
3
+ } from "./chunk-LH436HS2.js";
4
4
  import {
5
5
  graphLabels,
6
6
  rowLabelBox
7
- } from "./chunk-T3H5ELLA.js";
7
+ } from "./chunk-N73RA4DR.js";
8
8
  import {
9
9
  LABEL_CHAR_PX,
10
10
  LABEL_PAD,
@@ -2,7 +2,7 @@ import {
2
2
  LIFT_BACKDROP_CSS,
3
3
  computeColorSchemeRange,
4
4
  getNodeColor
5
- } from "./chunk-JGHZ3N34.js";
5
+ } from "./chunk-VXKL2ZLR.js";
6
6
  import {
7
7
  abgrToCssRgba
8
8
  } from "./chunk-G2FD7S3C.js";
@@ -2,7 +2,7 @@ import {
2
2
  stripGeneGaps,
3
3
  walkStripFrame,
4
4
  walkStripLabelsTree
5
- } from "./chunk-HELOUO6K.js";
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-A7Q7RTWX.js";
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-KA4F3N55.js";
24
+ } from "./chunk-QJC63NFR.js";
25
25
  import {
26
26
  nodesUnderBox
27
- } from "./chunk-56L6R6D2.js";
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-ZHZRAYEM.js";
37
+ } from "./chunk-AJQRKN3X.js";
38
38
  import {
39
39
  axisScaleOf
40
- } from "./chunk-5ZQKQ24Z.js";
40
+ } from "./chunk-F4CDC72I.js";
41
41
  import {
42
42
  figureScene
43
- } from "./chunk-WWIUC4N4.js";
43
+ } from "./chunk-UTDMFVC7.js";
44
44
  import {
45
45
  encodingStops
46
- } from "./chunk-2XEAITWM.js";
46
+ } from "./chunk-6RB5ZQ34.js";
47
47
  import {
48
48
  rangeText
49
- } from "./chunk-SVPR7IZO.js";
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-NTKWT6XL.js";
58
+ } from "./chunk-4SN7R4UF.js";
59
59
  import {
60
60
  FIT_PADDING,
61
61
  fitTransform
62
- } from "./chunk-YER6TUXV.js";
62
+ } from "./chunk-XKPXOIWD.js";
63
63
  import {
64
64
  LABEL_CHAR_PX,
65
65
  LABEL_PAD,
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  formatBp,
7
7
  groupDigits
8
- } from "./chunk-T3H5ELLA.js";
8
+ } from "./chunk-N73RA4DR.js";
9
9
 
10
10
  // src/walkKey.ts
11
11
  function rangeText(contig, start, end) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-CO6RGQAD.js";
4
4
  import {
5
5
  layoutModeByValue
6
- } from "./chunk-DD5EZG3T.js";
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-ZHZRAYEM.js";
15
+ } from "./chunk-AJQRKN3X.js";
16
16
  import {
17
17
  axisScaleOf
18
- } from "./chunk-5ZQKQ24Z.js";
18
+ } from "./chunk-F4CDC72I.js";
19
19
  import {
20
20
  figureScene
21
- } from "./chunk-WWIUC4N4.js";
21
+ } from "./chunk-UTDMFVC7.js";
22
22
  import {
23
23
  encodingStops
24
- } from "./chunk-2XEAITWM.js";
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-NTKWT6XL.js";
33
+ } from "./chunk-4SN7R4UF.js";
34
34
  import {
35
35
  engineSettingsOf,
36
36
  fitTransform,
37
37
  forceLayout,
38
38
  loadGraph
39
- } from "./chunk-YER6TUXV.js";
39
+ } from "./chunk-XKPXOIWD.js";
40
40
  import {
41
41
  referenceVisitStarts
42
42
  } from "./chunk-3YBP46PB.js";