@jbrowse/bandage-core 0.1.11 → 0.1.13

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/index.js CHANGED
@@ -1982,19 +1982,6 @@ function tubeMapReferenceLayout(graph) {
1982
1982
  };
1983
1983
  }
1984
1984
 
1985
- // src/layout/variantMapLayout.ts
1986
- function variantMapLayout(graph) {
1987
- const backbone = backboneNodes(graph);
1988
- if (backbone.length === 0) {
1989
- return void 0;
1990
- }
1991
- return {
1992
- nodePositions: backbonePositions(backbone),
1993
- referenceAxis: true,
1994
- pixelRows: true
1995
- };
1996
- }
1997
-
1998
1985
  // src/layout/walkRows.ts
1999
1986
  function sampleOf(path) {
2000
1987
  return path.sample ?? panSNSample(path.name);
@@ -2190,15 +2177,6 @@ var LAYOUT_MODES = [
2190
2177
  available: hasBackbone,
2191
2178
  drawsLocally: hasBackbone
2192
2179
  },
2193
- {
2194
- value: "variants",
2195
- label: "Variant map",
2196
- description: "The reference as a line with one typed glyph per bubble, from the bubble index or from the graph itself: SNP, indel, deletion, inversion, repeat array. Click a glyph to open the graph inside it.",
2197
- run: variantMapLayout,
2198
- cutMargins: true,
2199
- available: hasBackbone,
2200
- drawsLocally: hasBackbone
2201
- },
2202
2180
  {
2203
2181
  value: "tubemap",
2204
2182
  label: "Tube map",
@@ -5612,8 +5590,6 @@ var LEGEND_INSET_PX = 6;
5612
5590
  var ROUTE_STACK = 8;
5613
5591
  var GENE_PIN_DROP_PX = 18;
5614
5592
  var GENE_STACK = 2;
5615
- var GLYPH_ROOM_PX = 60;
5616
- var MAX_GLYPH_LABEL_ROWS = 8;
5617
5593
  var TOPMOST_BASELINE = LABEL_PX + LABEL_PAD;
5618
5594
  function byExtent(items, extent) {
5619
5595
  return [...items].sort((a, b) => extent(b) - extent(a));
@@ -5671,32 +5647,6 @@ function layoutLabels(m) {
5671
5647
  frame,
5672
5648
  take
5673
5649
  );
5674
- const glyphRows = Math.max(
5675
- 2,
5676
- Math.min(
5677
- MAX_GLYPH_LABEL_ROWS,
5678
- Math.floor((translateY - GLYPH_ROOM_PX) / (LABEL_PX + LABEL_PAD * 2))
5679
- )
5680
- );
5681
- const glyphs = placeLabels(
5682
- byExtent(m.bubbleGlyphs, (g) => g.bubble.end - g.bubble.start).flatMap(
5683
- (glyph) => {
5684
- const glyphX = (glyph.bubble.start + glyph.bubble.end) / 2 * scaleX + translateX;
5685
- const half = labelWidth(glyph.label) / 2;
5686
- return glyphX < 0 || glyphX > width ? [] : [
5687
- {
5688
- item: { glyph, glyphX },
5689
- x: Math.min(Math.max(glyphX, half), width - half),
5690
- y: TOPMOST_BASELINE,
5691
- text: glyph.label,
5692
- stack: glyphRows - 1
5693
- }
5694
- ];
5695
- }
5696
- ),
5697
- frame,
5698
- take
5699
- );
5700
5650
  const genes = placeLabels(
5701
5651
  byExtent(m.genePins, (pin) => pin.gene.end - pin.gene.start).map((pin) => {
5702
5652
  const { x, y } = screen(pin.at);
@@ -5747,7 +5697,6 @@ function layoutLabels(m) {
5747
5697
  );
5748
5698
  return {
5749
5699
  bubbles,
5750
- glyphs,
5751
5700
  genes,
5752
5701
  routes: routes2,
5753
5702
  sizes: [...deletionLabels, ...nodeLabels]
@@ -45,7 +45,7 @@ export type { WalkRows } from './layout/walkRows.js';
45
45
  export { walkRowsExtent } from './layout/walkRowLayout.js';
46
46
  export { ROW_HEIGHT_PX } from './layout/rowSpacing.js';
47
47
  export { HALO_FACTOR, LEGEND_INSET_PX, layoutLabels } from './labelLayout.js';
48
- export type { BubbleGlyph, LabelLayout, LabelLayoutSource } from './labelLayout.js';
48
+ export type { LabelLayout, LabelLayoutSource } from './labelLayout.js';
49
49
  export { formatBp } from './graphLabels.js';
50
50
  export { genePins } from './genes/genePins.js';
51
51
  export type { GeneModel, GenePin } from './genes/genePins.js';
@@ -1,6 +1,4 @@
1
1
  import type { BubbleHalo, RouteLabel } from './bubbles/bubbleHalos.js';
2
- import type { MinigraphBubble } from './bubbles/bubbleLine.js';
3
- import type { BubbleKind } from './bubbles/classifyBubble.js';
4
2
  import type { DeletionEdge } from './deletionEdges.js';
5
3
  import type { GenePin } from './genes/genePins.js';
6
4
  import type { GraphLabel } from './graphLabels.js';
@@ -9,11 +7,6 @@ import type { AlleleDeletion, NodeSegment } from './types.js';
9
7
  import type { AxisScale } from './util/geometry.js';
10
8
  export declare const HALO_FACTOR = 3.4;
11
9
  export declare const LEGEND_INSET_PX = 6;
12
- export interface BubbleGlyph {
13
- bubble: MinigraphBubble;
14
- kind: BubbleKind;
15
- label: string;
16
- }
17
10
  export interface LabelLayoutSource {
18
11
  paneWidth: number;
19
12
  canvasHeight: number;
@@ -31,7 +24,6 @@ export interface LabelLayoutSource {
31
24
  y: number;
32
25
  }[];
33
26
  bubbleHalos: BubbleHalo[];
34
- bubbleGlyphs: BubbleGlyph[];
35
27
  genePins: GenePin[];
36
28
  poppedFrom?: {
37
29
  label: string;
@@ -46,10 +38,6 @@ export interface LabelLayoutSource {
46
38
  }
47
39
  export interface LabelLayout {
48
40
  bubbles: PlacedLabel<BubbleHalo>[];
49
- glyphs: PlacedLabel<{
50
- glyph: BubbleGlyph;
51
- glyphX: number;
52
- }>[];
53
41
  genes: PlacedLabel<GenePin>[];
54
42
  routes: PlacedLabel<{
55
43
  halo: BubbleHalo;
@@ -2,7 +2,6 @@ import { anchoredLayout } from './layout/anchoredLayout.js';
2
2
  import { orderedLayout } from './layout/orderedLayout.js';
3
3
  import { sampleRowLayout } from './layout/sampleRowLayout.js';
4
4
  import { hasTubeMapPaths, tubeMapLayout, tubeMapReferenceLayout } from './layout/tubeMapLayout.js';
5
- import { variantMapLayout } from './layout/variantMapLayout.js';
6
5
  import { walkRowLayout } from './layout/walkRowLayout.js';
7
6
  import type { Graph, LayoutResult } from './types.js';
8
7
  export declare const FORCE_LAYOUT_LABEL = "Force-directed layout";
@@ -50,14 +49,6 @@ export declare const LAYOUT_MODES: readonly [{
50
49
  readonly cutMargins: false;
51
50
  readonly available: (graph: Graph) => boolean;
52
51
  readonly drawsLocally: (graph: Graph) => boolean;
53
- }, {
54
- readonly value: "variants";
55
- readonly label: "Variant map";
56
- readonly description: "The reference as a line with one typed glyph per bubble, from the bubble index or from the graph itself: SNP, indel, deletion, inversion, repeat array. Click a glyph to open the graph inside it.";
57
- readonly run: typeof variantMapLayout;
58
- readonly cutMargins: true;
59
- readonly available: (graph: Graph) => boolean;
60
- readonly drawsLocally: (graph: Graph) => boolean;
61
52
  }, {
62
53
  readonly value: "tubemap";
63
54
  readonly label: "Tube map";
@@ -84,7 +75,7 @@ export declare const LAYOUT_MODES: readonly [{
84
75
  readonly drawsLocally: () => false;
85
76
  }];
86
77
  export type LayoutModeValue = (typeof LAYOUT_MODES)[number]['value'];
87
- export declare const LAYOUT_MODE_VALUES: ("auto" | "ordered" | "samplerows" | "walkrows" | "variants" | "tubemap" | "tubemapref" | "force")[];
78
+ export declare const LAYOUT_MODE_VALUES: ("auto" | "ordered" | "samplerows" | "walkrows" | "tubemap" | "tubemapref" | "force")[];
88
79
  export declare function modeUsesLayoutEngine(value: string, graph: Graph): boolean;
89
80
  export declare function layoutModeByValue(value: string): {
90
81
  readonly value: "auto";
@@ -118,14 +109,6 @@ export declare function layoutModeByValue(value: string): {
118
109
  readonly cutMargins: false;
119
110
  readonly available: (graph: Graph) => boolean;
120
111
  readonly drawsLocally: (graph: Graph) => boolean;
121
- } | {
122
- readonly value: "variants";
123
- readonly label: "Variant map";
124
- readonly description: "The reference as a line with one typed glyph per bubble, from the bubble index or from the graph itself: SNP, indel, deletion, inversion, repeat array. Click a glyph to open the graph inside it.";
125
- readonly run: typeof variantMapLayout;
126
- readonly cutMargins: true;
127
- readonly available: (graph: Graph) => boolean;
128
- readonly drawsLocally: (graph: Graph) => boolean;
129
112
  } | {
130
113
  readonly value: "tubemap";
131
114
  readonly label: "Tube map";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/bandage-core",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
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": {
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@gmod/gbz-base": "^3.0.0",
31
+ "@gmod/gbz-base": "^4.0.0",
32
32
  "@gmod/tubemap-core": "^0.1.0",
33
33
  "@jbrowse/core": "5.0.0-beta.9",
34
34
  "@jbrowse/render-core": "5.0.0-beta.9"
@@ -1,2 +0,0 @@
1
- import type { Graph, LayoutResult } from '../types.js';
2
- export declare function variantMapLayout(graph: Graph): LayoutResult | undefined;