@jbrowse/bandage-core 10.3.1 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +5 -0
  2. package/dist/chunks/{chunk-DBLV7PGG.js → chunk-3XSRT7RQ.js} +16 -2
  3. package/dist/chunks/{chunk-BS6HPYCZ.js → chunk-77EGQQJU.js} +3 -1
  4. package/dist/chunks/chunk-7BTO7MZS.js +46 -0
  5. package/dist/chunks/{chunk-BKEZLETL.js → chunk-AI5PTOSV.js} +1 -1
  6. package/dist/chunks/{chunk-CGFPFBT2.js → chunk-D4ZFRBB4.js} +11 -2
  7. package/dist/chunks/{chunk-OOIOX36I.js → chunk-DEDD7TFJ.js} +40 -9
  8. package/dist/chunks/{chunk-YZQI35UJ.js → chunk-DR24UTRS.js} +23 -2
  9. package/dist/chunks/{chunk-Z6XZWPXK.js → chunk-DZR37KXT.js} +51 -2
  10. package/dist/chunks/chunk-EIY2SKD3.js +164 -0
  11. package/dist/chunks/{chunk-NZTYV3JL.js → chunk-FFHJGWDK.js} +5 -1
  12. package/dist/chunks/{chunk-QH2MIXBA.js → chunk-IVOK5V3H.js} +6 -6
  13. package/dist/chunks/{chunk-SFP3E4RI.js → chunk-IZ6Y5D23.js} +2 -2
  14. package/dist/chunks/{chunk-EWLXU3UG.js → chunk-JFHYG25O.js} +13 -13
  15. package/dist/chunks/{chunk-KMBE2Q42.js → chunk-KDU4EF66.js} +3 -3
  16. package/dist/chunks/{chunk-FW2R7UDZ.js → chunk-LMH5KVJZ.js} +1 -1
  17. package/dist/chunks/{chunk-AZ4EEF6Q.js → chunk-NGUM77EP.js} +5 -5
  18. package/dist/chunks/{chunk-GIHTHYXY.js → chunk-NMWQUFPF.js} +1 -1
  19. package/dist/chunks/{chunk-CHNESV7L.js → chunk-OI4YVAMM.js} +56 -9
  20. package/dist/chunks/{chunk-R2PJKD3Y.js → chunk-RETNT73O.js} +1 -1
  21. package/dist/chunks/{chunk-OXRUPNSV.js → chunk-RNYPCQZ3.js} +1 -1
  22. package/dist/chunks/{chunk-DO62DG26.js → chunk-TABI4JEU.js} +6 -4
  23. package/dist/chunks/{chunk-M5NPD55W.js → chunk-TUQKGAK3.js} +1 -1
  24. package/dist/chunks/{chunk-MWOVW4AH.js → chunk-V5MAL7LU.js} +1 -1
  25. package/dist/chunks/{chunk-D7WIYPG3.js → chunk-W6EXQDV5.js} +1 -1
  26. package/dist/chunks/{chunk-ZJBOM73S.js → chunk-XZ6PQBU6.js} +58 -12
  27. package/dist/chunks/{chunk-AQCOIE5R.js → chunk-Y3FDMDNT.js} +1 -1
  28. package/dist/chunks/{chunk-A2TJ5UX6.js → chunk-YHJ5JLBI.js} +1 -1
  29. package/dist/chunks/{chunk-WYJQIC75.js → chunk-ZUL52ZX2.js} +4 -4
  30. package/dist/cli/figure.js +42 -67
  31. package/dist/cli/fold.js +5 -4
  32. package/dist/figure.js +18 -17
  33. package/dist/figureData.js +21 -19
  34. package/dist/figureScene.js +12 -11
  35. package/dist/figureSettings.js +6 -5
  36. package/dist/gbzCut.js +4 -3
  37. package/dist/gbzWindow.js +3 -2
  38. package/dist/genes/backboneGenes.js +12 -0
  39. package/dist/genes/genePins.js +1 -1
  40. package/dist/gfa/gfaConverter.js +2 -1
  41. package/dist/gfa/gfaTables.js +2 -1
  42. package/dist/gfa/graphTables.js +2 -1
  43. package/dist/gfa/walkStops.js +28 -0
  44. package/dist/index.js +60 -38
  45. package/dist/layout/forceCache.js +6 -5
  46. package/dist/layout/tubeMapLayout.js +3 -2
  47. package/dist/layout/walkRowDraw.js +10 -1
  48. package/dist/layout/walkRowLayout.js +3 -2
  49. package/dist/layout/walkRows.js +2 -1
  50. package/dist/layout/walkStrip.js +5 -4
  51. package/dist/layoutModes.js +6 -5
  52. package/dist/pipeline.js +5 -4
  53. package/dist/tubeMap/bundle.js +4 -3
  54. package/dist/tubeMap/coarsen.js +4 -3
  55. package/dist/tubeMap/deviations.js +4 -3
  56. package/dist/tubeMap/draw.js +4 -3
  57. package/dist/types/figureData.d.ts +31 -2
  58. package/dist/types/genes/backboneGenes.d.ts +25 -0
  59. package/dist/types/genes/genePins.d.ts +1 -0
  60. package/dist/types/gfa/graphTables.d.ts +3 -0
  61. package/dist/types/gfa/walkStops.d.ts +59 -0
  62. package/dist/types/index.d.ts +7 -3
  63. package/dist/types/layout/walkRowDraw.d.ts +14 -1
  64. package/dist/types/layout/walkRows.d.ts +10 -1
  65. package/dist/types/types.d.ts +19 -0
  66. package/dist/types/version.d.ts +1 -1
  67. package/dist/types/walkEncoding.d.ts +1 -0
  68. package/dist/types/walkHighlight.d.ts +2 -0
  69. package/dist/types/walkKey.d.ts +1 -1
  70. package/dist/version.js +1 -1
  71. package/dist/viewport.js +6 -5
  72. package/dist/walkEncoding.js +1 -1
  73. package/dist/walkHighlight.js +3 -2
  74. package/dist/walkKey.js +2 -1
  75. package/package.json +1 -1
@@ -5,12 +5,12 @@ import {
5
5
  stripGeneGaps,
6
6
  walkStripFrame,
7
7
  walkStripLabelsTree
8
- } from "./chunk-SFP3E4RI.js";
8
+ } from "./chunk-IZ6Y5D23.js";
9
9
  import {
10
10
  walkRowsKey,
11
11
  walkRowsKeyTree,
12
12
  walkRowsTree
13
- } from "./chunk-ZJBOM73S.js";
13
+ } from "./chunk-XZ6PQBU6.js";
14
14
  import {
15
15
  Canvas2DRenderer
16
16
  } from "./chunk-EJRJAAN7.js";
@@ -19,9 +19,6 @@ import {
19
19
  exonOutlineTree,
20
20
  exonStretches
21
21
  } from "./chunk-JSUCGZ6K.js";
22
- import {
23
- genePins
24
- } from "./chunk-BS6HPYCZ.js";
25
22
  import {
26
23
  geneLabelCandidates
27
24
  } from "./chunk-PSCSZSVK.js";
@@ -32,34 +29,37 @@ import {
32
29
  escapeAttr,
33
30
  serializeEl
34
31
  } from "./chunk-H2H4Y3TV.js";
32
+ import {
33
+ genePins
34
+ } from "./chunk-77EGQQJU.js";
35
35
  import {
36
36
  version
37
- } from "./chunk-AQCOIE5R.js";
37
+ } from "./chunk-Y3FDMDNT.js";
38
38
  import {
39
39
  axisScaleOf
40
- } from "./chunk-BKEZLETL.js";
40
+ } from "./chunk-AI5PTOSV.js";
41
41
  import {
42
42
  figureScene
43
- } from "./chunk-QH2MIXBA.js";
43
+ } from "./chunk-IVOK5V3H.js";
44
44
  import {
45
45
  encodingStops
46
- } from "./chunk-DO62DG26.js";
46
+ } from "./chunk-TABI4JEU.js";
47
47
  import {
48
48
  rangeText
49
- } from "./chunk-CGFPFBT2.js";
49
+ } from "./chunk-D4ZFRBB4.js";
50
50
  import {
51
51
  walkRowLabels
52
- } from "./chunk-A2TJ5UX6.js";
52
+ } from "./chunk-YHJ5JLBI.js";
53
53
  import {
54
54
  nodeInk
55
55
  } from "./chunk-CRCD3ODN.js";
56
56
  import {
57
57
  FIGURE_DEFAULTS
58
- } from "./chunk-D7WIYPG3.js";
58
+ } from "./chunk-W6EXQDV5.js";
59
59
  import {
60
60
  FIT_PADDING,
61
61
  fitTransform
62
- } from "./chunk-KMBE2Q42.js";
62
+ } from "./chunk-KDU4EF66.js";
63
63
  import {
64
64
  LABEL_CHAR_PX,
65
65
  LABEL_PAD,
@@ -14,19 +14,19 @@ import {
14
14
  } from "./chunk-VPE4AYP7.js";
15
15
  import {
16
16
  convertGFAToGraph
17
- } from "./chunk-NZTYV3JL.js";
17
+ } from "./chunk-FFHJGWDK.js";
18
18
  import {
19
19
  parseGFA
20
20
  } from "./chunk-5I3K4R2G.js";
21
21
  import {
22
22
  graphFromTables
23
- } from "./chunk-DBLV7PGG.js";
23
+ } from "./chunk-3XSRT7RQ.js";
24
24
  import {
25
25
  anchorGraph
26
26
  } from "./chunk-B5X2RLJG.js";
27
27
  import {
28
28
  gfaTables
29
- } from "./chunk-Z6XZWPXK.js";
29
+ } from "./chunk-DZR37KXT.js";
30
30
  import {
31
31
  mergeRuns,
32
32
  splitRuns
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-A7H753BA.js";
6
6
  import {
7
7
  referenceWalkName
8
- } from "./chunk-OOIOX36I.js";
8
+ } from "./chunk-DEDD7TFJ.js";
9
9
  import {
10
10
  pathCssColor,
11
11
  pathGreyCssColor
@@ -1,12 +1,12 @@
1
- import {
2
- sampleRowLayout
3
- } from "./chunk-GJU6BJJA.js";
4
1
  import {
5
2
  hasTubeMapBackbone,
6
3
  hasTubeMapPaths,
7
4
  tubeMapLayout,
8
5
  tubeMapReferenceLayout
9
- } from "./chunk-FW2R7UDZ.js";
6
+ } from "./chunk-LMH5KVJZ.js";
7
+ import {
8
+ sampleRowLayout
9
+ } from "./chunk-GJU6BJJA.js";
10
10
  import {
11
11
  anchoredLayout
12
12
  } from "./chunk-GJLZ2MKE.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-UAFATXYA.js";
16
16
  import {
17
17
  walkRowLayout
18
- } from "./chunk-A2TJ5UX6.js";
18
+ } from "./chunk-YHJ5JLBI.js";
19
19
  import {
20
20
  isBackbone,
21
21
  isOffReference
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-234NFZS4.js";
7
7
  import {
8
8
  gfaTables
9
- } from "./chunk-Z6XZWPXK.js";
9
+ } from "./chunk-DZR37KXT.js";
10
10
  import {
11
11
  panSNMatchesPrefix,
12
12
  panSNSample
@@ -3,19 +3,25 @@ import {
3
3
  } from "./chunk-JMABOQWL.js";
4
4
  import {
5
5
  layoutModeByValue
6
- } from "./chunk-AZ4EEF6Q.js";
6
+ } from "./chunk-NGUM77EP.js";
7
7
  import {
8
8
  parseRegion
9
- } from "./chunk-M5NPD55W.js";
9
+ } from "./chunk-TUQKGAK3.js";
10
+ import {
11
+ genePins
12
+ } from "./chunk-77EGQQJU.js";
10
13
  import {
11
14
  version
12
- } from "./chunk-AQCOIE5R.js";
15
+ } from "./chunk-Y3FDMDNT.js";
13
16
  import {
14
17
  axisScaleOf
15
- } from "./chunk-BKEZLETL.js";
18
+ } from "./chunk-AI5PTOSV.js";
16
19
  import {
17
20
  figureScene
18
- } from "./chunk-QH2MIXBA.js";
21
+ } from "./chunk-IVOK5V3H.js";
22
+ import {
23
+ encodingStops
24
+ } from "./chunk-TABI4JEU.js";
19
25
  import {
20
26
  abgrAlpha,
21
27
  abgrBlue,
@@ -24,13 +30,13 @@ import {
24
30
  } from "./chunk-G2FD7S3C.js";
25
31
  import {
26
32
  FIGURE_DEFAULTS
27
- } from "./chunk-D7WIYPG3.js";
33
+ } from "./chunk-W6EXQDV5.js";
28
34
  import {
29
35
  engineSettingsOf,
30
36
  fitTransform,
31
37
  forceLayout,
32
38
  loadGraph
33
- } from "./chunk-KMBE2Q42.js";
39
+ } from "./chunk-KDU4EF66.js";
34
40
  import {
35
41
  isBackbone
36
42
  } from "./chunk-RJWPJCIB.js";
@@ -76,21 +82,58 @@ function figureData(graph, layout, o = {}) {
76
82
  }
77
83
  const axis = axisScaleOf(fit.scale, pixelRows);
78
84
  const panels = [];
85
+ const keys = columns(["panel", "walk", "note", "scale", "stops"]);
86
+ const pushKey = (walk, panel) => {
87
+ const key = keyText(walk);
88
+ keys.push({
89
+ panel,
90
+ walk: labelOf(walk.name),
91
+ note: key.note,
92
+ scale: key.scale ?? "",
93
+ stops: encodingStops(walk.encoding).map((s) => cssHex(s.abgr)).join(",")
94
+ });
95
+ return key;
96
+ };
79
97
  if (facets) {
80
98
  const ordered = facets.panels.map((panel, i) => ({ panel, cell: facets.place.cells[i] })).sort((a, b) => a.cell - b.cell);
81
99
  for (const { panel } of ordered) {
82
100
  const walk = panel.walks[0];
83
- const key = keyText(walk);
101
+ const name = labelOf(walk.name);
102
+ const key = pushKey(walk, name);
84
103
  panels.push({
85
104
  highlight: panel,
86
- name: labelOf(walk.name),
105
+ name,
87
106
  key: key.note,
88
107
  range: key.scale ?? ""
89
108
  });
90
109
  }
91
110
  } else {
111
+ for (const walk of lift?.walks ?? []) {
112
+ pushKey(walk, "");
113
+ }
92
114
  panels.push({ highlight: lift, name: "", key: "", range: "" });
93
115
  }
116
+ const pins = columns(["gene", "x", "y", "covered", "bp"]);
117
+ const exons = columns(["gene", "node", "stretch", "x", "y"]);
118
+ let stretch = 0;
119
+ for (const pin of o.genes?.length ? genePins(graph, o.genes, layout.nodePositions) : []) {
120
+ const gene = pin.gene.name;
121
+ pins.push({
122
+ gene,
123
+ x: pin.at.x,
124
+ y: pin.at.y,
125
+ covered: pin.covered,
126
+ bp: pin.gene.end - pin.gene.start
127
+ });
128
+ for (const { nodeId, stretches } of pin.exonsByNode) {
129
+ for (const points of stretches) {
130
+ stretch++;
131
+ for (const { x, y } of points) {
132
+ exons.push({ gene, node: nodeId, stretch, x, y });
133
+ }
134
+ }
135
+ }
136
+ }
94
137
  const nodes = columns([
95
138
  "panel",
96
139
  "node",
@@ -198,6 +241,10 @@ function figureData(graph, layout, o = {}) {
198
241
  key: panels.map((p) => p.key),
199
242
  range: panels.map((p) => p.range)
200
243
  },
244
+ keys: keys.out,
245
+ pins: pins.out,
246
+ exons: exons.out,
247
+ walkNames: [...new Set((graph.paths ?? []).map((p) => p.name))],
201
248
  nodes: nodes.out,
202
249
  edges: edges.out,
203
250
  arrows: arrows.out,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathSteps
3
- } from "./chunk-FW2R7UDZ.js";
3
+ } from "./chunk-LMH5KVJZ.js";
4
4
  import {
5
5
  pathOrigin
6
6
  } from "./chunk-B5X2RLJG.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  engineKey,
3
3
  forceLayout
4
- } from "./chunk-KMBE2Q42.js";
4
+ } from "./chunk-KDU4EF66.js";
5
5
 
6
6
  // src/layout/forceCache.ts
7
7
  var DEFAULT_SIZE = 4;
@@ -88,10 +88,12 @@ function encodedColor({ field, scheme }, t) {
88
88
  }
89
89
  var NO_VALUE_COLOR = REFERENCE_RAMP_ALT_COLOR;
90
90
  function encodingStops({ field, scheme }) {
91
- return field === "walk" ? [{ offset: 0, color: schemeCss(scheme, BASE_T) }] : Array.from({ length: 7 }, (_, i) => ({
92
- offset: i / 6,
93
- color: schemeCss(scheme, i / 6)
94
- }));
91
+ const stop = (offset, t) => ({
92
+ offset,
93
+ color: schemeCss(scheme, t),
94
+ abgr: schemeColor(scheme, t)
95
+ });
96
+ return field === "walk" ? [stop(0, BASE_T)] : Array.from({ length: 7 }, (_, i) => stop(i / 6, i / 6));
95
97
  }
96
98
  function encodingSwatchCss(encoding) {
97
99
  const stops = encodingStops(encoding);
@@ -6,7 +6,7 @@ import {
6
6
  haplotypeWanted,
7
7
  referencePathQuery,
8
8
  referenceSamplesOf
9
- } from "./chunk-GIHTHYXY.js";
9
+ } from "./chunk-NMWQUFPF.js";
10
10
  import {
11
11
  panSNSample
12
12
  } from "./chunk-4XWZNPQ2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathSteps
3
- } from "./chunk-FW2R7UDZ.js";
3
+ } from "./chunk-LMH5KVJZ.js";
4
4
  import {
5
5
  pathOrigin
6
6
  } from "./chunk-B5X2RLJG.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ENGINE_DEFAULTS
3
- } from "./chunk-KMBE2Q42.js";
3
+ } from "./chunk-KDU4EF66.js";
4
4
 
5
5
  // src/figureSettings.ts
6
6
  var FIGURE_DEFAULTS = {
@@ -10,20 +10,30 @@ import {
10
10
  rampHueCss,
11
11
  rampStops
12
12
  } from "./chunk-GQZVR5DW.js";
13
+ import {
14
+ GAP_CAUSE_TEXT,
15
+ OUTSIDE_TEXT
16
+ } from "./chunk-EIY2SKD3.js";
13
17
  import {
14
18
  LABEL_CHAR_PX
15
19
  } from "./chunk-AB35TJST.js";
16
20
  import {
17
21
  ROW_HEIGHT_PX
18
22
  } from "./chunk-CPMHA4W5.js";
23
+ import {
24
+ panSNContig
25
+ } from "./chunk-4XWZNPQ2.js";
19
26
 
20
27
  // src/layout/walkRowDraw.ts
21
28
  var ON_REFERENCE = "#2f8fd6";
22
29
  var OFF_REFERENCE = "#8e3fbf";
23
30
  var OUTSIDE_CUT = "#bdbdbd";
31
+ var MISSING_INK = "#8a8a8a";
32
+ var UNKNOWN_GAP = "#e2e2e2";
24
33
  var GENE_INK = "#1c1c22";
25
34
  var BAR_PX = 12;
26
35
  var GAP_PX = 4;
36
+ var MISSING_PX = 1;
27
37
  var LABELLED_ROW_PX = 12;
28
38
  var MIN_TILED_BAR_PX = 6;
29
39
  var MIN_TILE_PX = 3;
@@ -37,12 +47,36 @@ function signedLength(delta) {
37
47
  function units(bp, unit) {
38
48
  return unit ? ` \u2248 ${Math.round(bp / unit)} units` : "";
39
49
  }
50
+ var near = ({ refName, start }) => `${panSNContig(refName)}:${start < 1e6 ? `${Math.round(start / 1e3)} kb` : `${(start / 1e6).toFixed(1)} Mb`}`;
51
+ function gapsText(gapBp, runs) {
52
+ const gaps = (runs ?? []).filter((r) => r.gap);
53
+ if (gapBp <= 0) {
54
+ return "";
55
+ }
56
+ if (!gaps.some((g) => g.cause)) {
57
+ return ` \xB7 ${kb(gapBp)} ${OUTSIDE_TEXT}`;
58
+ }
59
+ const bpOf = (cause) => gaps.filter((g) => g.cause === cause).reduce((sum, g) => sum + g.bp, 0);
60
+ const places = [
61
+ ...new Set(gaps.flatMap((g) => g.chunk ? [near(g.chunk)] : []))
62
+ ];
63
+ const parts = [
64
+ [bpOf("missing"), GAP_CAUSE_TEXT.missing],
65
+ [
66
+ bpOf("elsewhere"),
67
+ `on nodes filed near ${places[0]}${places.length > 1 ? ` and ${places.length - 1} more place${places.length > 2 ? "s" : ""}` : ""}`
68
+ ],
69
+ [bpOf("unknown"), GAP_CAUSE_TEXT.unknown],
70
+ [bpOf(void 0), OUTSIDE_TEXT]
71
+ ];
72
+ return parts.filter(([bp]) => bp > 0).map(([bp, text]) => ` \xB7 ${kb(bp)} ${text}`).join("");
73
+ }
40
74
  function walkRowReadout(row, reference, unit, call) {
41
75
  const { bp, gapBp, complete, stop } = row;
42
76
  if (!reference) {
43
77
  return `${kb(bp)}${units(bp, unit)}`;
44
78
  }
45
- const outside = gapBp > 0 ? ` \xB7 ${kb(gapBp)} outside the cut` : "";
79
+ const outside = gapsText(gapBp, row.runs);
46
80
  const called = call ? ` \xB7 called ${kb(call.bp)}${call.spanningReads === 0 ? " \xB7 no spanning read" : ""}` : "";
47
81
  if (complete) {
48
82
  const delta = bp - reference.bp;
@@ -54,7 +88,7 @@ function walkRowReadout(row, reference, unit, call) {
54
88
  const where = stop.shortBp > 0 ? `${kb(stop.shortBp)} before` : "at";
55
89
  return `contig ends ${where} the ${region}${called}`;
56
90
  }
57
- const why = !stop ? "partial walk" : stop.contigEnds ? `contig ends inside the ${region}` : "does not rejoin the reference within the cut";
91
+ const why = !stop ? "partial walk" : stop.contigEnds ? `contig ends inside the ${region}` : "does not rejoin the reference within the extracted subgraph";
58
92
  return `\u2265 ${kb(bp)}${units(bp, unit)} \xB7 ${why}${outside}${called}`;
59
93
  }
60
94
  function readoutPlacement(text, endX, width) {
@@ -72,9 +106,12 @@ function unitTicks(bp, unit, pxPerBp) {
72
106
  }
73
107
  return ticks;
74
108
  }
109
+ function gapStyle(cause) {
110
+ return cause === "missing" ? { fill: MISSING_INK, px: MISSING_PX, label: GAP_CAUSE_TEXT.missing } : cause === "unknown" ? { fill: UNKNOWN_GAP, px: GAP_PX, label: GAP_CAUSE_TEXT.unknown } : { fill: OUTSIDE_CUT, px: GAP_PX, label: OUTSIDE_TEXT };
111
+ }
75
112
  function runPaint(run, ramp) {
76
113
  if (run.gap) {
77
- return { fill: OUTSIDE_CUT };
114
+ return { fill: gapStyle(run.cause).fill };
78
115
  }
79
116
  if (!ramp) {
80
117
  return { fill: run.onReference ? ON_REFERENCE : OFF_REFERENCE };
@@ -180,11 +217,15 @@ function walkRowsKey(bars, o = {}) {
180
217
  label: `off ${bars.reference.label}'s path`
181
218
  }
182
219
  ];
183
- if ([bars.reference, ...bars.rows].some((row) => row.gapBp > 0)) {
184
- entries.push({
185
- swatch: { kind: "gap", fill: OUTSIDE_CUT },
186
- label: "walked outside the cut"
187
- });
220
+ const gaps = [bars.reference, ...bars.rows].flatMap(
221
+ (row) => row.runs.filter((run) => run.gap)
222
+ );
223
+ const labels = new Set(gaps.map((run) => gapStyle(run.cause).label));
224
+ for (const cause of [void 0, "missing", "unknown"]) {
225
+ const { fill, px, label } = gapStyle(cause);
226
+ if (labels.has(label)) {
227
+ entries.push({ swatch: { kind: "gap", fill, px }, label });
228
+ }
188
229
  }
189
230
  if (o.genes?.crowded) {
190
231
  entries.push({
@@ -248,9 +289,9 @@ function walkRowsKeyTree(entries, x, y, idPrefix = "walk-key") {
248
289
  "stroke-width": 1.5
249
290
  }) : el("rect", {
250
291
  x: at,
251
- y: e.swatch.kind === "gap" ? 7 : 5,
292
+ y: e.swatch.kind === "gap" ? 9 - e.swatch.px / 2 : 5,
252
293
  width: 18,
253
- height: e.swatch.kind === "gap" ? GAP_PX : 8,
294
+ height: e.swatch.kind === "gap" ? e.swatch.px : 8,
254
295
  rx: 2,
255
296
  fill: ramp ? `url(#${rampId})` : e.swatch.fill
256
297
  });
@@ -399,9 +440,10 @@ function walkRowsTree(bars, frame, o = {}) {
399
440
  if (y < -barPx || y > frame.height + barPx) {
400
441
  return void 0;
401
442
  }
402
- const runs = coalesceRuns(row.runs, frame.scaleX).flatMap((run) => {
443
+ const drawn = frame.bars === false ? [] : row.runs;
444
+ const runs = coalesceRuns(drawn, frame.scaleX).flatMap((run) => {
403
445
  const paint = runPaint(run, o.ramp);
404
- const h = run.gap ? Math.min(GAP_PX, barPx) : barPx;
446
+ const h = run.gap ? Math.min(gapStyle(run.cause).px, barPx) : barPx;
405
447
  const id = `${prefix}-${i}-${run.start}`;
406
448
  const rect = el("rect", {
407
449
  x: along(run.start),
@@ -486,13 +528,17 @@ export {
486
528
  ON_REFERENCE,
487
529
  OFF_REFERENCE,
488
530
  OUTSIDE_CUT,
531
+ MISSING_INK,
532
+ UNKNOWN_GAP,
489
533
  GENE_INK,
490
534
  BAR_PX,
491
535
  GAP_PX,
536
+ MISSING_PX,
492
537
  LABELLED_ROW_PX,
493
538
  walkRowReadout,
494
539
  readoutPlacement,
495
540
  unitTicks,
541
+ gapStyle,
496
542
  runPaint,
497
543
  alongRow,
498
544
  rowSpan,
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "10.3.1";
2
+ var version = "11.1.0";
3
3
 
4
4
  export {
5
5
  version
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  walkRows
3
- } from "./chunk-OOIOX36I.js";
3
+ } from "./chunk-DEDD7TFJ.js";
4
4
  import {
5
5
  ROW_HEIGHT_PX
6
6
  } from "./chunk-CPMHA4W5.js";
@@ -1,15 +1,15 @@
1
- import {
2
- tubeMapMismatches
3
- } from "./chunk-BX4AUMZE.js";
4
1
  import {
5
2
  MAX_GAP_PX
6
3
  } from "./chunk-MYDHU2UV.js";
4
+ import {
5
+ tubeMapMismatches
6
+ } from "./chunk-BX4AUMZE.js";
7
7
  import {
8
8
  readColor
9
9
  } from "./chunk-A7H753BA.js";
10
10
  import {
11
11
  referenceWalkName
12
- } from "./chunk-OOIOX36I.js";
12
+ } from "./chunk-DEDD7TFJ.js";
13
13
  import {
14
14
  pathOrigin
15
15
  } from "./chunk-B5X2RLJG.js";