@jbrowse/bandage-core 10.2.7 → 10.3.1

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 (190) hide show
  1. package/dist/alleleProjection/projectAlleles.js +8 -4
  2. package/dist/anchoredNodes.js +2 -1
  3. package/dist/bubbleSpreads.js +2 -2
  4. package/dist/bubbles/bubbleHalos.js +10 -11
  5. package/dist/bubbles/bubblesFromGraph.js +8 -3
  6. package/dist/bubbles/classifyBubble.js +9 -6
  7. package/dist/bubbles/popBubble.js +7 -5
  8. package/dist/bubbles/superbubbles.js +18 -14
  9. package/dist/chunks/{chunk-RAKOB6IV.js → chunk-234NFZS4.js} +8 -6
  10. package/dist/chunks/{chunk-ABUIN5AK.js → chunk-2Q22S52W.js} +29 -24
  11. package/dist/chunks/{chunk-6JEWNXCQ.js → chunk-34BOZKIE.js} +0 -2
  12. package/dist/chunks/{chunk-RVS2QCOX.js → chunk-3GLG3ZLE.js} +2 -11
  13. package/dist/chunks/{chunk-3XSM4OZU.js → chunk-3GP3KT5L.js} +5 -5
  14. package/dist/chunks/{chunk-PUG7LXDF.js → chunk-3PZSBNLI.js} +4 -1
  15. package/dist/chunks/{chunk-JLSJMCDJ.js → chunk-3UST3ZQE.js} +3 -3
  16. package/dist/chunks/{chunk-KBEP7VYK.js → chunk-3VCKBSML.js} +4 -4
  17. package/dist/chunks/{chunk-BPLIXMH7.js → chunk-4XWZNPQ2.js} +14 -0
  18. package/dist/chunks/{chunk-4DRQTBBE.js → chunk-6EOB6ANX.js} +1 -1
  19. package/dist/chunks/{chunk-L2HDM2R3.js → chunk-A2TJ5UX6.js} +7 -7
  20. package/dist/chunks/{chunk-URZ3CH2R.js → chunk-A4JDEUAI.js} +1 -1
  21. package/dist/chunks/{chunk-CWFNEKST.js → chunk-A7H753BA.js} +3 -3
  22. package/dist/chunks/{chunk-CG35S2S2.js → chunk-AQCOIE5R.js} +1 -1
  23. package/dist/chunks/{chunk-TKIJ5535.js → chunk-AZ4EEF6Q.js} +6 -6
  24. package/dist/chunks/{chunk-M6LK4GII.js → chunk-B5X2RLJG.js} +17 -10
  25. package/dist/chunks/{chunk-A7CFWFQS.js → chunk-BKEZLETL.js} +1 -1
  26. package/dist/chunks/{chunk-RPRHR56C.js → chunk-BS6HPYCZ.js} +3 -3
  27. package/dist/chunks/chunk-BSOZW3FC.js +30 -0
  28. package/dist/chunks/{chunk-XXT2JCAC.js → chunk-BX4AUMZE.js} +11 -13
  29. package/dist/chunks/{chunk-N73TI3VG.js → chunk-BZFOFC4D.js} +6 -9
  30. package/dist/chunks/{chunk-4ETPXDO6.js → chunk-CGFPFBT2.js} +1 -1
  31. package/dist/chunks/{chunk-24WITXQY.js → chunk-CGMSKIEO.js} +9 -25
  32. package/dist/chunks/{chunk-VV6KGJ7M.js → chunk-CHNESV7L.js} +18 -27
  33. package/dist/chunks/{chunk-IGVV37VI.js → chunk-CKUVEHSS.js} +3 -3
  34. package/dist/chunks/{chunk-JBCZIBFC.js → chunk-CRCD3ODN.js} +0 -1
  35. package/dist/chunks/{chunk-AUFAPUO4.js → chunk-D7WIYPG3.js} +3 -1
  36. package/dist/chunks/{chunk-OIV2GBAJ.js → chunk-DBLV7PGG.js} +27 -17
  37. package/dist/chunks/{chunk-VQC7KELB.js → chunk-DO62DG26.js} +11 -3
  38. package/dist/chunks/{chunk-JA2HJIYS.js → chunk-E4ZM4OOJ.js} +3 -5
  39. package/dist/chunks/{chunk-QLWI2PZ3.js → chunk-EJRJAAN7.js} +24 -21
  40. package/dist/chunks/{chunk-QBHPHLAQ.js → chunk-EWLXU3UG.js} +41 -36
  41. package/dist/chunks/{chunk-XI3ZUTWF.js → chunk-FW2R7UDZ.js} +14 -20
  42. package/dist/chunks/{chunk-Q7LYHGGQ.js → chunk-GIHTHYXY.js} +5 -4
  43. package/dist/chunks/{chunk-L3O7AWLI.js → chunk-GJLZ2MKE.js} +2 -2
  44. package/dist/chunks/{chunk-LOEA5IHZ.js → chunk-GJU6BJJA.js} +8 -8
  45. package/dist/chunks/{chunk-XL472HHD.js → chunk-GQZVR5DW.js} +12 -7
  46. package/dist/chunks/{chunk-UVBGRJQX.js → chunk-HKYXWZQS.js} +1 -1
  47. package/dist/chunks/chunk-HMXCN6PG.js +17 -0
  48. package/dist/chunks/{chunk-WSIFAZU7.js → chunk-HNWJ4B7S.js} +12 -13
  49. package/dist/chunks/chunk-HOAIOEI7.js +18 -0
  50. package/dist/chunks/{chunk-XMW266WS.js → chunk-HSVFCA2J.js} +18 -20
  51. package/dist/chunks/{chunk-QXUEF3AJ.js → chunk-KMBE2Q42.js} +22 -17
  52. package/dist/chunks/{chunk-VQWHMWLF.js → chunk-M5NPD55W.js} +18 -14
  53. package/dist/chunks/chunk-MWOVW4AH.js +327 -0
  54. package/dist/chunks/{chunk-HK5Y2YWV.js → chunk-MYDHU2UV.js} +6 -11
  55. package/dist/chunks/{chunk-TZFWUT2C.js → chunk-MYLAJDKB.js} +2 -2
  56. package/dist/chunks/{chunk-AR4BUBMU.js → chunk-NZTYV3JL.js} +34 -35
  57. package/dist/chunks/{chunk-4HWM3FNK.js → chunk-OMUPUB4J.js} +39 -56
  58. package/dist/chunks/{chunk-LKW2TP4N.js → chunk-OOIOX36I.js} +18 -16
  59. package/dist/chunks/{chunk-EQ2NIFRH.js → chunk-OXRUPNSV.js} +1 -1
  60. package/dist/chunks/{chunk-PTABFYQ7.js → chunk-PFRQBCGC.js} +49 -60
  61. package/dist/chunks/{chunk-T6V4KI2L.js → chunk-PNMJFFNB.js} +1 -1
  62. package/dist/chunks/{chunk-KC7T5RWG.js → chunk-PSCSZSVK.js} +9 -16
  63. package/dist/chunks/{chunk-23YFB5BB.js → chunk-QH2MIXBA.js} +29 -13
  64. package/dist/chunks/{chunk-5GMFEPWR.js → chunk-R2PJKD3Y.js} +16 -28
  65. package/dist/chunks/{chunk-CQHUZHET.js → chunk-RFG42VIO.js} +46 -30
  66. package/dist/chunks/{chunk-FYQWPEEY.js → chunk-RJWPJCIB.js} +5 -11
  67. package/dist/chunks/{chunk-WBSWROE6.js → chunk-SFP3E4RI.js} +14 -18
  68. package/dist/chunks/{chunk-2CMYNW3E.js → chunk-SI3BB4DO.js} +1 -1
  69. package/dist/chunks/{chunk-DY3JCAMX.js → chunk-SOMZGDVS.js} +7 -16
  70. package/dist/chunks/{chunk-A4PFFC4Q.js → chunk-SWCULW6S.js} +60 -102
  71. package/dist/chunks/{chunk-XV4P5KEQ.js → chunk-TGUFT6KK.js} +6 -3
  72. package/dist/chunks/{chunk-CM6LO6OC.js → chunk-UAFATXYA.js} +10 -14
  73. package/dist/chunks/{chunk-7SRWJLSC.js → chunk-UBQSRCWR.js} +11 -8
  74. package/dist/chunks/{chunk-RUCH6ZFL.js → chunk-V4YML3GR.js} +2 -1
  75. package/dist/chunks/{chunk-ES2N6V56.js → chunk-VX656OAZ.js} +6 -11
  76. package/dist/chunks/chunk-WA5WNP6V.js +37 -0
  77. package/dist/chunks/{chunk-B6IW3IRE.js → chunk-WYJQIC75.js} +14 -15
  78. package/dist/chunks/{chunk-T2PCSAFY.js → chunk-XVS52NMZ.js} +2 -2
  79. package/dist/chunks/{chunk-CU6P5RUG.js → chunk-YZQI35UJ.js} +22 -16
  80. package/dist/chunks/{chunk-G45YY72K.js → chunk-Z6XZWPXK.js} +17 -25
  81. package/dist/chunks/{chunk-EFQLEGWM.js → chunk-ZJBOM73S.js} +7 -8
  82. package/dist/chunks/{chunk-RAEABQNW.js → chunk-ZPZ7GNBT.js} +1 -0
  83. package/dist/cli/figure.js +59 -56
  84. package/dist/cli/fold.js +19 -17
  85. package/dist/deletionEdges.js +5 -7
  86. package/dist/facetGrid.js +2 -1
  87. package/dist/figure.js +45 -42
  88. package/dist/figureData.js +48 -44
  89. package/dist/figureScene.js +34 -29
  90. package/dist/figureSettings.js +19 -17
  91. package/dist/foldVariants.js +5 -3
  92. package/dist/gbzCut.js +12 -7
  93. package/dist/gbzJoin.js +2 -1
  94. package/dist/gbzWindow.js +11 -6
  95. package/dist/genes/genePins.js +6 -4
  96. package/dist/gfa/gfaConverter.js +7 -5
  97. package/dist/gfa/gfaTables.js +2 -1
  98. package/dist/gfa/graphTables.js +3 -3
  99. package/dist/graphLabels.js +8 -5
  100. package/dist/index.js +88 -85
  101. package/dist/labelLayout.js +12 -9
  102. package/dist/layout/anchoredLayout.js +8 -5
  103. package/dist/layout/drawnScale.js +1 -5
  104. package/dist/layout/forceCache.js +19 -17
  105. package/dist/layout/mergeRuns.js +5 -3
  106. package/dist/layout/orderedLayout.js +5 -2
  107. package/dist/layout/orientToReference.js +3 -2
  108. package/dist/layout/placeOffReference.js +7 -4
  109. package/dist/layout/referenceSeeds.js +6 -4
  110. package/dist/layout/sampleRowLayout.js +8 -5
  111. package/dist/layout/trimToWindow.js +6 -4
  112. package/dist/layout/tubeMapLayout.js +17 -19
  113. package/dist/layout/walkRowDraw.js +18 -17
  114. package/dist/layout/walkRowLayout.js +10 -6
  115. package/dist/layout/walkRows.js +9 -5
  116. package/dist/layout/walkStrip.js +21 -18
  117. package/dist/layoutModes.js +23 -20
  118. package/dist/nodeWidths.js +1 -3
  119. package/dist/pansn.js +5 -1
  120. package/dist/pathAnchoring.js +6 -4
  121. package/dist/pathColors.js +12 -9
  122. package/dist/pathVisits.js +3 -1
  123. package/dist/pipeline.js +18 -16
  124. package/dist/reference.js +5 -3
  125. package/dist/referenceRampCss.js +9 -17
  126. package/dist/referenceSpan.js +4 -2
  127. package/dist/referenceStrip.js +18 -14
  128. package/dist/renderer/Canvas2DRenderer.js +1 -1
  129. package/dist/renderer/GeometryBuilder.js +19 -14
  130. package/dist/renderer/svgCanvas.js +1 -1
  131. package/dist/tubeMap/axis.js +11 -6
  132. package/dist/tubeMap/bundle.js +16 -12
  133. package/dist/tubeMap/coarsen.js +20 -345
  134. package/dist/tubeMap/deviations.js +53 -23
  135. package/dist/tubeMap/draw.js +11 -8
  136. package/dist/tubeMap/frame.js +3 -2
  137. package/dist/tubeMap/genes.js +10 -7
  138. package/dist/tubeMap/mismatches.js +1 -1
  139. package/dist/tubeMap/nodeColors.js +18 -14
  140. package/dist/tubeMap/reads.js +1 -1
  141. package/dist/tubeMap/warp.js +2 -1
  142. package/dist/types/alleleProjection/projectAlleles.d.ts +1 -4
  143. package/dist/types/bubbles/bubbleHalos.d.ts +0 -2
  144. package/dist/types/bubbles/bubblesFromGraph.d.ts +6 -4
  145. package/dist/types/bubbles/classifyBubble.d.ts +2 -1
  146. package/dist/types/deletionEdges.d.ts +0 -8
  147. package/dist/types/figureScene.d.ts +17 -7
  148. package/dist/types/figureSettings.d.ts +2 -0
  149. package/dist/types/gbzCut.d.ts +4 -0
  150. package/dist/types/gbzWindow.d.ts +1 -0
  151. package/dist/types/gfa-core/gfaParser.d.ts +1 -1
  152. package/dist/types/graphLabels.d.ts +2 -1
  153. package/dist/types/layout/drawnScale.d.ts +0 -2
  154. package/dist/types/layout/referenceSeeds.d.ts +2 -1
  155. package/dist/types/layout/tubeMapLayout.d.ts +0 -7
  156. package/dist/types/layout/walkRowDraw.d.ts +0 -1
  157. package/dist/types/layout/walkRowLayout.d.ts +1 -0
  158. package/dist/types/layout/walkRows.d.ts +1 -0
  159. package/dist/types/nodeWidths.d.ts +0 -1
  160. package/dist/types/pansn.d.ts +9 -0
  161. package/dist/types/pathVisits.d.ts +6 -0
  162. package/dist/types/referenceRampCss.d.ts +4 -0
  163. package/dist/types/renderer/Canvas2DRenderer.d.ts +1 -0
  164. package/dist/types/renderer/GeometryBuilder.d.ts +3 -2
  165. package/dist/types/tubeMap/axis.d.ts +3 -1
  166. package/dist/types/tubeMap/coarsen.d.ts +3 -1
  167. package/dist/types/tubeMap/deviations.d.ts +2 -1
  168. package/dist/types/tubeMap/mismatches.d.ts +0 -1
  169. package/dist/types/tubeMap/warp.d.ts +2 -1
  170. package/dist/types/util/SpatialIndex.d.ts +1 -1
  171. package/dist/types/util/geometry.d.ts +4 -0
  172. package/dist/types/util/groups.d.ts +3 -0
  173. package/dist/types/util/hitDetection.d.ts +2 -2
  174. package/dist/types/util/partitionPoint.d.ts +1 -0
  175. package/dist/types/util/weakMemo.d.ts +1 -0
  176. package/dist/types/version.d.ts +1 -1
  177. package/dist/util/SpatialIndex.js +8 -5
  178. package/dist/util/edgeCurves.js +7 -4
  179. package/dist/util/geometry.js +3 -1
  180. package/dist/util/groups.js +10 -0
  181. package/dist/util/hitDetection.js +9 -6
  182. package/dist/util/partitionPoint.js +6 -0
  183. package/dist/util/weakMemo.js +6 -0
  184. package/dist/version.js +1 -1
  185. package/dist/viewport.js +19 -17
  186. package/dist/walkEncoding.js +18 -14
  187. package/dist/walkHighlight.js +19 -15
  188. package/dist/walkKey.js +9 -6
  189. package/package.json +2 -2
  190. package/dist/chunks/chunk-ZY2AFL4Y.js +0 -43
@@ -9,7 +9,9 @@ export declare function relax<K>(best: Map<K, Routes>, to: K, cur: Routes, add:
9
9
  export declare function bubblesFromGraph(graph: Graph): MinigraphBubble[];
10
10
  export type WalkIndex = Map<string, Int32Array>;
11
11
  export declare function walkIndexOf(graph: Graph, ids: Iterable<string>): WalkIndex | undefined;
12
- export declare function walkRoutes(graph: Graph, byId: Map<string, GraphNode>, walkIndex: WalkIndex, startId: string, endId: string): (Routes & {
13
- left: number;
14
- routes: BubbleRoute[];
15
- }) | undefined;
12
+ export interface WalkedRoutes extends Routes {
13
+ routes?: BubbleRoute[];
14
+ walksLeave: boolean;
15
+ }
16
+ export declare function walkRoutes(graph: Graph, byId: Map<string, GraphNode>, walkIndex: WalkIndex | undefined, startId: string, endId: string, fallback: () => Routes): WalkedRoutes;
17
+ export declare function derivedBubble(place: Pick<MinigraphBubble, 'refName' | 'start' | 'end'>, segments: readonly GraphNode[], { min, max, n, routes }: WalkedRoutes, partial: boolean): MinigraphBubble;
@@ -1,6 +1,6 @@
1
1
  import type { MinigraphBubble } from './bubbleLine.js';
2
2
  export type BubbleKind = 'snp' | 'substitution' | 'insertion' | 'deletion' | 'inversion' | 'repeat' | 'superbubble' | 'complex';
3
- export interface BubbleClass {
3
+ interface BubbleClass {
4
4
  kind: BubbleKind;
5
5
  label: string;
6
6
  }
@@ -13,3 +13,4 @@ export declare function classifyBubble(b: MinigraphBubble, repeats?: readonly Re
13
13
  export declare const BUBBLE_KIND_COLORS: Record<BubbleKind, string>;
14
14
  export declare const BUBBLE_KIND_NAMES: Record<BubbleKind, string>;
15
15
  export declare function bubbleSegmentIds(b: MinigraphBubble): string[];
16
+ export {};
@@ -12,14 +12,6 @@ export interface DeletionEdge {
12
12
  bp: number;
13
13
  bypassed: string[];
14
14
  }
15
- export declare function bypassedPoints(nodePositions: Record<string, {
16
- x: number;
17
- y: number;
18
- }[]>, bypassed: string[]): {
19
- x: number;
20
- y: number;
21
- }[];
22
- export declare function deletionArcCurves(nodePositions: Record<string, NodeSegment[]>, deletion: DeletionEdge, axis: AxisScale, route?: NodeSegment[], stranded?: boolean): import("./util/geometry.js").BezierCurve[] | undefined;
23
15
  export declare function edgeCurvesOf(nodePositions: Record<string, NodeSegment[]>, edge: GraphEdge, axis: AxisScale, bypassed: string[] | undefined, route: NodeSegment[] | undefined, stranded: boolean): import("./util/geometry.js").BezierCurve[] | undefined;
24
16
  export declare function deletionEdges(graph: Graph): DeletionEdge[];
25
17
  export declare function closableDeletions(graph: Graph, deletions: DeletionEdge[]): Set<number>;
@@ -1,7 +1,7 @@
1
1
  import type { FigureOptions } from './figure.js';
2
2
  import type { Graph, LayoutResult } from './types.js';
3
3
  import type { AxisScale } from './util/geometry.js';
4
- import type { WalkLift } from './walkHighlight.js';
4
+ import type { LiftedWalk, WalkLift } from './walkHighlight.js';
5
5
  export type FigureSceneOptions = Pick<FigureOptions, 'walks' | 'facet' | 'colorScheme' | 'nodeWidth' | 'showDeletionEdges' | 'linearLayout' | 'contigThickness' | 'connectorThickness' | 'region' | 'referenceName' | 'colorDomain' | 'fitToDrawing' | 'walkRows' | 'walkRowPitch'>;
6
6
  export declare function figureScene(graph: Graph, layout: LayoutResult, o: FigureSceneOptions): {
7
7
  bounds: {
@@ -17,14 +17,24 @@ export declare function figureScene(graph: Graph, layout: LayoutResult, o: Figur
17
17
  layers: import("./walkEncoding.js").WalkLayer[];
18
18
  lift: WalkLift | undefined;
19
19
  facet: import("./facetGrid.js").FacetSetting;
20
- panels: WalkLift[] | undefined;
20
+ facets: {
21
+ panels: WalkLift[];
22
+ place: {
23
+ columns: undefined;
24
+ count: number;
25
+ cells: number[];
26
+ } | {
27
+ columns: number;
28
+ count: number;
29
+ cells: number[];
30
+ };
31
+ } | undefined;
21
32
  labelOf: (name: string) => string;
22
33
  referenceName: string | undefined;
23
- reference: {
24
- name: string | undefined;
25
- start: number;
26
- end: number;
27
- } | undefined;
34
+ keyText: (walk: LiftedWalk) => {
35
+ note: string;
36
+ scale: string | undefined;
37
+ };
28
38
  contigThickness: number;
29
39
  nodeWidth: "depth" | "uniform";
30
40
  geometry: (highlight: WalkLift | undefined, axis: AxisScale) => import("./renderer/types.js").RenderBatch;
@@ -2,6 +2,8 @@ import type { ColorScheme } from './colorSchemes.js';
2
2
  import type { NodeWidth } from './nodeWidths.js';
3
3
  import type { EngineSettings } from './pipeline.js';
4
4
  export interface FigureSettings extends Partial<EngineSettings> {
5
+ width?: number;
6
+ height?: number;
5
7
  colorScheme?: ColorScheme;
6
8
  nodeWidth?: NodeWidth;
7
9
  contigThickness?: number;
@@ -13,6 +13,10 @@ export declare const HPRC_GBZ: {
13
13
  db: string;
14
14
  index: string;
15
15
  };
16
+ export declare function gbzLocations({ db, index }: Pick<GbzSource, 'db' | 'index'>): {
17
+ db: string;
18
+ index: string | undefined;
19
+ };
16
20
  export declare function haplotypeIndexBeside(db: string): string | undefined;
17
21
  export declare function parseRegion(text: string): {
18
22
  refName: string;
@@ -13,6 +13,7 @@ export declare class NodeLimitError extends Error {
13
13
  export declare function haplotypePrefix(name: Pick<PathName, 'sample' | 'haplotype'>): string;
14
14
  export declare function haplotypeWanted(name: PathName, wanted: string[] | undefined): boolean;
15
15
  export declare function referenceSamplesOf(db: GBZBase): Promise<string[]>;
16
+ export declare function aliasedSample(anchorSample: string, referenceSamples: string[]): string | undefined;
16
17
  export declare function resolveReferenceSample({ configured, anchorPrefix, referenceSamples, }: {
17
18
  configured: string;
18
19
  anchorPrefix: string;
@@ -26,7 +26,7 @@ export interface GFAPath {
26
26
  }
27
27
  export interface GFAWalkSegment {
28
28
  id: string;
29
- strand: string;
29
+ strand: '+' | '-';
30
30
  }
31
31
  export interface GFAWalk {
32
32
  sample: string;
@@ -44,7 +44,8 @@ export declare function sizeLabelCandidates({ nodePositions, nodeLengths, deleti
44
44
  };
45
45
  export declare function nodeLabelBudget(width: number, height: number): number;
46
46
  export declare function placeSizeLabels(candidates: SizeLabelCandidate[], take: TakeBox, budget?: number): GraphLabel[];
47
- export declare function graphLabels({ reserved, ...args }: SizeLabelArgs & {
47
+ export declare function graphLabels({ reserved, take, ...args }: SizeLabelArgs & {
48
48
  reserved?: Box[];
49
+ take?: TakeBox;
49
50
  }): GraphLabel[];
50
51
  export {};
@@ -13,13 +13,11 @@ export interface DrawnLengthLaw {
13
13
  effect: number;
14
14
  }
15
15
  export declare const PROPORTIONAL_LENGTH: DrawnLengthLaw;
16
- export declare function isProportional(law: DrawnLengthLaw): boolean;
17
16
  export declare function drawnLengthFor(graph: Graph, law: DrawnLengthLaw): (bp: number) => number;
18
17
  export interface NodeLengthSpread {
19
18
  law: DrawnLengthLaw;
20
19
  minNodeLength: number;
21
20
  }
22
- export declare const PROPORTIONAL_SPREAD: NodeLengthSpread;
23
21
  export interface LayoutScaling {
24
22
  nodes: GraphNode[];
25
23
  opts: BandageScaleOpts;
@@ -4,9 +4,10 @@ export type LayoutNode = GraphNode & {
4
4
  x?: number;
5
5
  y?: number;
6
6
  };
7
- export interface Seed {
7
+ interface Seed {
8
8
  x: number;
9
9
  y: number;
10
10
  }
11
11
  export declare function referenceSeeds(graph: Graph, scaling: LayoutScaling): Map<string, Seed>;
12
12
  export declare function seededNodes(graph: Graph, scaling: LayoutScaling): LayoutNode[];
13
+ export {};
@@ -24,13 +24,6 @@ export interface PathStep {
24
24
  export declare function pathSteps(graph: Graph): PathStep[][];
25
25
  export declare function tubeMapTracks(graph: Graph): InputTrack[];
26
26
  export declare function hasTubeMapPaths(graph: Graph): boolean;
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;
34
27
  export declare function tubeMapLayout(graph: Graph): LayoutResult | undefined;
35
28
  export declare function hasTubeMapBackbone(graph: Graph): boolean;
36
29
  export declare function tubeMapReferenceLayout(graph: Graph): LayoutResult | undefined;
@@ -8,7 +8,6 @@ export declare const GENE_INK = "#1c1c22";
8
8
  export declare const BAR_PX = 12;
9
9
  export declare const GAP_PX = 4;
10
10
  export declare const LABELLED_ROW_PX = 12;
11
- export declare function kb(bp: number): string;
12
11
  export interface ReadoutCall {
13
12
  bp: number;
14
13
  spanningReads?: number;
@@ -2,6 +2,7 @@ import type { RowPitch } from './walkRowDraw.js';
2
2
  import type { WalkRows } from './walkRows.js';
3
3
  import type { Graph, LayoutResult, RowLabel } from '../types.js';
4
4
  export declare const READOUT_ROOM = 1.3;
5
+ export declare function longestBar(walks: WalkRows): number;
5
6
  export declare function walkRowsExtent(walks: WalkRows, pitch?: Pick<RowPitch, 'rowPx' | 'readouts'>): {
6
7
  maxX: number;
7
8
  maxY: number;
@@ -39,6 +39,7 @@ export declare function filterSamples<R extends {
39
39
  sample: string;
40
40
  label: string;
41
41
  }>(rows: R[], samples: string[] | undefined): R[];
42
+ export declare function referenceWalkName(graph: Pick<Graph, 'nodes' | 'paths' | 'referencePath'>): string | undefined;
42
43
  export declare function walkRows(graph: Graph, region?: {
43
44
  start: number;
44
45
  end: number;
@@ -11,7 +11,6 @@ export declare const NODE_WIDTHS: readonly [{
11
11
  }];
12
12
  export type NodeWidth = (typeof NODE_WIDTHS)[number]['value'];
13
13
  export declare function meanDepth(graph: Graph): number;
14
- export declare function depthWidthFactor(node: GraphNode, mean: number): number;
15
14
  export declare function nodeWidthPx(node: GraphNode, contigThickness: number, nodeWidth: NodeWidth, mean: number): number;
16
15
  export declare function maxNodeWidthPx(contigThickness: number, nodeWidth: NodeWidth): number;
17
16
  export declare function nodeInk(graph: Graph | undefined, nodeById: ReadonlyMap<string, GraphNode> | undefined, contigThickness: number, nodeWidth: NodeWidth): NodeInk;
@@ -5,6 +5,15 @@ export declare function panSNSample(refName: string): string;
5
5
  export declare function isGenericSample(sample: string): boolean;
6
6
  export declare function panSNHaplotype(refName: string): string | undefined;
7
7
  export declare function panSNContig(refName: string): string;
8
+ export declare function panSNFields(name: string): {
9
+ sample: string;
10
+ haplotype: number;
11
+ contig: string;
12
+ } | undefined;
13
+ export declare function parsePanSN(refName: string): {
14
+ sample: string;
15
+ haplotype: number | undefined;
16
+ };
8
17
  export declare function panSNMatchesPrefix(refName: string, prefix: string | undefined): boolean;
9
18
  export declare function resolvePanSNPrefix(adapter: ConfAdapter, name: string): string;
10
19
  export declare function resolvePanSNPrefix(adapter: ConfAdapter, name: string | undefined): string | undefined;
@@ -42,6 +42,12 @@ export declare class PathVisits {
42
42
  entries(): Generator<[string, PathVisit[]]>;
43
43
  [Symbol.iterator](): Generator<[string, PathVisit[]], any, any>;
44
44
  }
45
+ export declare class Column<T extends Int32Array | Float64Array | Uint8Array> {
46
+ data: T;
47
+ length: number;
48
+ constructor(data: T);
49
+ push(value: number): void;
50
+ }
45
51
  /**
46
52
  * Visits added in any order, grouped by segment on `build`, each segment's
47
53
  * keeping the order they were added in
@@ -1,4 +1,8 @@
1
+ export declare const REFERENCE_RAMP_MAX_HUE = 300;
2
+ export declare const REFERENCE_RAMP_SATURATION = 0.7;
3
+ export declare const REFERENCE_RAMP_LIGHTNESS = 0.5;
1
4
  export declare function rampHueCss(hue: number): string;
5
+ export declare function rampHueAt(frac: number): number;
2
6
  export declare function rampHue(bp: number, domain: {
3
7
  start: number;
4
8
  end: number;
@@ -16,6 +16,7 @@ export declare class Canvas2DRenderer implements Renderer {
16
16
  setNodeHighlights(factors: ReadonlyMap<string, number>): void;
17
17
  setEdgeHighlight(edgeIndex: number | null, factor: number): void;
18
18
  updateTransform(transform: TransformUniform): void;
19
+ private fitted;
19
20
  render(clearColor: [number, number, number, number]): void;
20
21
  renderHighlights(): void;
21
22
  private edgeRun;
@@ -34,7 +34,7 @@ export interface BuildOptions {
34
34
  version?: number;
35
35
  }
36
36
  export declare function hslToRgb(h: number, s: number, l: number): [number, number, number];
37
- export declare const REFERENCE_RAMP_MAX_HUE = 300;
37
+ export { REFERENCE_RAMP_MAX_HUE } from '../referenceRampCss.js';
38
38
  export declare const REFERENCE_RAMP_ALT_COLOR: number;
39
39
  export declare const REFERENCE_RAMP_ALT_CSS: string;
40
40
  export interface ReferenceRamp {
@@ -55,13 +55,14 @@ export declare function computeReferenceRamp(graph: Graph, domain: {
55
55
  start: number;
56
56
  end: number;
57
57
  } | undefined): ReferenceRamp;
58
- export declare function computeColorSchemeRange(graph: Graph): {
58
+ export declare function computeColorSchemeRange(graph: Graph, referenceRamp?: ReferenceRamp): {
59
59
  minDepth: number;
60
60
  maxDepth: number;
61
61
  minLength: number;
62
62
  maxLength: number;
63
63
  maxRank: number;
64
64
  nodeCount: number;
65
+ referenceRamp: ReferenceRamp | undefined;
65
66
  };
66
67
  export declare function getNodeColor(node: GraphNode, nodeIndex: number, colorScheme: ResolvedColorScheme, range: ColorSchemeRange): number;
67
68
  export declare function endTangent(c: BezierCurve, yToX?: number, into?: {
@@ -13,13 +13,14 @@ export interface ReferenceBox extends Box {
13
13
  export declare function referenceBoxes({ graph, layout, }: Pick<TubeMapDrawing, 'graph' | 'layout'>): Map<string, ReferenceBox[]>;
14
14
  export type ReferenceBoxes = ReturnType<typeof referenceBoxes>;
15
15
  export declare function tubeX(boxes: readonly Box[], bp: number, isEnd?: boolean): number;
16
+ export declare function boxX(box: Box, bp: number): number;
16
17
  export declare function tubeSpan(boxes: readonly Box[], start: number, end: number): {
17
18
  x0: number;
18
19
  x1: number;
19
20
  };
20
21
  export declare function rulerBoxes(byRefName: ReferenceBoxes): Box[] | undefined;
21
22
  export declare function rulerInk(darkMode?: boolean): "#b0b0b8" | "#55555c";
22
- export interface RulerMarks {
23
+ interface RulerMarks {
23
24
  spans: {
24
25
  x0: number;
25
26
  x1: number;
@@ -32,3 +33,4 @@ export interface RulerMarks {
32
33
  }
33
34
  export declare function rulerMarks(boxes: readonly Box[], x: (tx: number) => number, width: number, measure: (text: string) => number, referenceAxis?: boolean): RulerMarks | undefined;
34
35
  export declare function drawTubeMapRuler(ctx: CanvasRenderingContext2D, boxes: readonly Box[], frame: TubeMapFrame, top: number, referenceAxis?: boolean): void;
36
+ export {};
@@ -5,7 +5,7 @@ export interface Deviation {
5
5
  bp: number;
6
6
  inverted?: true;
7
7
  }
8
- export type CutCause = 'variant' | 'backward' | 'inversion' | 'walk-end' | 'overlap' | 'reference-gap';
8
+ type CutCause = 'variant' | 'backward' | 'inversion' | 'walk-end' | 'overlap' | 'reference-gap';
9
9
  export interface Coarsened {
10
10
  graph: Graph;
11
11
  members: Map<string, string[]>;
@@ -13,4 +13,6 @@ export interface Coarsened {
13
13
  deviations: Map<string, Deviation[]>;
14
14
  cuts: Map<number, CutCause>;
15
15
  }
16
+ export declare function lastAtMost<T>(items: readonly T[], key: (item: T) => number, x: number): number;
16
17
  export declare function coarsenTubeMap(graph: Graph, sigma: number): Coarsened | undefined;
18
+ export {};
@@ -1,7 +1,7 @@
1
1
  import type { Deviation } from './coarsen.js';
2
2
  import type { TubeMapFrame } from './draw.js';
3
3
  import type { TubeMapDrawing } from '../layout/tubeMapLayout.js';
4
- export interface DeviationMark {
4
+ interface DeviationMark {
5
5
  x0: number;
6
6
  x1: number;
7
7
  y: number;
@@ -10,3 +10,4 @@ export interface DeviationMark {
10
10
  export declare function deviationMarks(drawing: Pick<TubeMapDrawing, 'graph' | 'layout'>, deviations: Map<string, Deviation[]>): DeviationMark[];
11
11
  export declare function deviationInk(darkMode?: boolean): "rgba(255,255,255,0.9)" | "rgba(0,0,0,0.8)";
12
12
  export declare function drawDeviationMarks(ctx: CanvasRenderingContext2D, marks: readonly DeviationMark[], { x, y, width, darkMode }: TubeMapFrame): void;
13
+ export {};
@@ -8,7 +8,6 @@ export type TubeMapMismatch = (MarkBase & {
8
8
  kind: 'insertion';
9
9
  x: number;
10
10
  seq?: string;
11
- softClip: boolean;
12
11
  }) | (MarkBase & {
13
12
  kind: 'deletion';
14
13
  x0: number;
@@ -1,8 +1,9 @@
1
1
  import type { TubeMapColumn } from '../layout/tubeMapLayout.js';
2
- export interface Knot {
2
+ interface Knot {
3
3
  tx: number;
4
4
  sx: number;
5
5
  }
6
6
  export declare const MAX_GAP_PX = 24;
7
7
  export declare function referenceKnots(columns: readonly TubeMapColumn[], bpToScreen: (bp: number) => number): Knot[];
8
8
  export declare function warpX(knots: readonly Knot[], tx: number): number;
9
+ export {};
@@ -19,7 +19,7 @@ export declare class EdgeSpatialIndex {
19
19
  private cellSize;
20
20
  private cells;
21
21
  private edgeCurves;
22
- constructor(nodePositions: Record<string, NodeSegment[]>, graph: Graph, drawPaths: boolean, axis: AxisScale, cellSize?: number | CellSize, deletions?: Map<number, string[]>, version?: number, routes?: DeletionRoutes, stranded?: boolean);
22
+ constructor(nodePositions: Record<string, NodeSegment[]>, graph: Graph, drawPaths: boolean, axis: AxisScale, deletions?: Map<number, string[]>, version?: number, routes?: DeletionRoutes, stranded?: boolean);
23
23
  getCurves(ei: number): import("./geometry.js").BezierCurve[] | undefined;
24
24
  query(x: number, y: number, radiusX: number, radiusY?: number): number[];
25
25
  }
@@ -46,6 +46,10 @@ export declare function pathRibbonOffsets(fromSegments: NodeSegment[], toSegment
46
46
  x: number;
47
47
  y: number;
48
48
  }[];
49
+ export declare function polylinePx(points: {
50
+ x: number;
51
+ y: number;
52
+ }[], scaleX: number, scaleY: number): number;
49
53
  export type SelfLink = boolean | Side;
50
54
  export declare function selfLinkOf(edge: GraphEdge): SelfLink;
51
55
  export type EdgeJoin = SelfLink | EdgeSides;
@@ -0,0 +1,3 @@
1
+ export declare function pushTo<K, V>(map: Map<K, V[]>, key: K, value: V): void;
2
+ export declare function addTo<K, V>(map: Map<K, Set<V>>, key: K, value: V): void;
3
+ export declare function groupBy<T, K>(items: Iterable<T>, keyOf: (item: T) => K): Map<K, T[]>;
@@ -1,9 +1,9 @@
1
1
  import type { DeletionRoutes } from '../layout/deletionRoutes.js';
2
2
  import type { Box } from '../overlayLabels.js';
3
3
  import type { Graph, NodeSegment } from '../types.js';
4
- import type { AxisScale } from './geometry.js';
4
+ import type { AxisScale, BezierCurve } from './geometry.js';
5
5
  export declare function distanceToSegment(px: number, py: number, x1: number, y1: number, x2: number, y2: number): number;
6
- export declare function distanceToCubicBezier(px: number, py: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number): number;
6
+ export declare function distanceToCubicBezier(px: number, py: number, c: BezierCurve): number;
7
7
  export interface NodeInk {
8
8
  halfWidthPx: (nodeId: string) => number;
9
9
  maxHalfWidthPx: number;
@@ -0,0 +1 @@
1
+ export declare function partitionPoint(n: number, pred: (i: number) => boolean): number;
@@ -0,0 +1 @@
1
+ export declare function weakMemo<K extends object, V>(): (key: K, deps: readonly unknown[], compute: () => V) => V;
@@ -1 +1 @@
1
- export declare const version = "10.2.7";
1
+ export declare const version = "10.3.1";
@@ -1,12 +1,15 @@
1
1
  import {
2
2
  EdgeSpatialIndex,
3
3
  SpatialIndex
4
- } from "../chunks/chunk-KBEP7VYK.js";
5
- import "../chunks/chunk-ZY2AFL4Y.js";
6
- import "../chunks/chunk-24WITXQY.js";
7
- import "../chunks/chunk-7SRWJLSC.js";
4
+ } from "../chunks/chunk-3VCKBSML.js";
5
+ import "../chunks/chunk-WA5WNP6V.js";
6
+ import "../chunks/chunk-HMXCN6PG.js";
7
+ import "../chunks/chunk-CGMSKIEO.js";
8
+ import "../chunks/chunk-UBQSRCWR.js";
8
9
  import "../chunks/chunk-CPMHA4W5.js";
9
- import "../chunks/chunk-FYQWPEEY.js";
10
+ import "../chunks/chunk-BSOZW3FC.js";
11
+ import "../chunks/chunk-RJWPJCIB.js";
12
+ import "../chunks/chunk-HOAIOEI7.js";
10
13
  export {
11
14
  EdgeSpatialIndex,
12
15
  SpatialIndex
@@ -1,10 +1,13 @@
1
1
  import {
2
2
  baseEdgeCurves
3
- } from "../chunks/chunk-ZY2AFL4Y.js";
4
- import "../chunks/chunk-24WITXQY.js";
5
- import "../chunks/chunk-7SRWJLSC.js";
3
+ } from "../chunks/chunk-WA5WNP6V.js";
4
+ import "../chunks/chunk-HMXCN6PG.js";
5
+ import "../chunks/chunk-CGMSKIEO.js";
6
+ import "../chunks/chunk-UBQSRCWR.js";
6
7
  import "../chunks/chunk-CPMHA4W5.js";
7
- import "../chunks/chunk-FYQWPEEY.js";
8
+ import "../chunks/chunk-BSOZW3FC.js";
9
+ import "../chunks/chunk-RJWPJCIB.js";
10
+ import "../chunks/chunk-HOAIOEI7.js";
8
11
  export {
9
12
  baseEdgeCurves
10
13
  };
@@ -9,6 +9,7 @@ import {
9
9
  edgeJoinOf,
10
10
  ownStrand,
11
11
  pathRibbonOffsets,
12
+ polylinePx,
12
13
  projectLine,
13
14
  routedEdgeCurves,
14
15
  selfLinkOf,
@@ -16,7 +17,7 @@ import {
16
17
  svgPath,
17
18
  translateCurves,
18
19
  yToXOf
19
- } from "../chunks/chunk-7SRWJLSC.js";
20
+ } from "../chunks/chunk-UBQSRCWR.js";
20
21
  import "../chunks/chunk-CPMHA4W5.js";
21
22
  export {
22
23
  PATH_RIBBON_SPACING_PX,
@@ -29,6 +30,7 @@ export {
29
30
  edgeJoinOf,
30
31
  ownStrand,
31
32
  pathRibbonOffsets,
33
+ polylinePx,
32
34
  projectLine,
33
35
  routedEdgeCurves,
34
36
  selfLinkOf,
@@ -0,0 +1,10 @@
1
+ import {
2
+ addTo,
3
+ groupBy,
4
+ pushTo
5
+ } from "../chunks/chunk-BSOZW3FC.js";
6
+ export {
7
+ addTo,
8
+ groupBy,
9
+ pushTo
10
+ };
@@ -4,13 +4,16 @@ import {
4
4
  findHoveredEdge,
5
5
  findHoveredNode,
6
6
  nodesUnderBox
7
- } from "../chunks/chunk-4HWM3FNK.js";
8
- import "../chunks/chunk-KBEP7VYK.js";
9
- import "../chunks/chunk-ZY2AFL4Y.js";
10
- import "../chunks/chunk-24WITXQY.js";
11
- import "../chunks/chunk-7SRWJLSC.js";
7
+ } from "../chunks/chunk-OMUPUB4J.js";
8
+ import "../chunks/chunk-3VCKBSML.js";
9
+ import "../chunks/chunk-WA5WNP6V.js";
10
+ import "../chunks/chunk-HMXCN6PG.js";
11
+ import "../chunks/chunk-CGMSKIEO.js";
12
+ import "../chunks/chunk-UBQSRCWR.js";
12
13
  import "../chunks/chunk-CPMHA4W5.js";
13
- import "../chunks/chunk-FYQWPEEY.js";
14
+ import "../chunks/chunk-BSOZW3FC.js";
15
+ import "../chunks/chunk-RJWPJCIB.js";
16
+ import "../chunks/chunk-HOAIOEI7.js";
14
17
  export {
15
18
  distanceToCubicBezier,
16
19
  distanceToSegment,
@@ -0,0 +1,6 @@
1
+ import {
2
+ partitionPoint
3
+ } from "../chunks/chunk-HOAIOEI7.js";
4
+ export {
5
+ partitionPoint
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ weakMemo
3
+ } from "../chunks/chunk-HMXCN6PG.js";
4
+ export {
5
+ weakMemo
6
+ };
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  version
3
- } from "./chunks/chunk-CG35S2S2.js";
3
+ } from "./chunks/chunk-AQCOIE5R.js";
4
4
  export {
5
5
  version
6
6
  };
package/dist/viewport.js CHANGED
@@ -5,28 +5,30 @@ import {
5
5
  screenToLayout,
6
6
  viewportOf,
7
7
  zoomAbout
8
- } from "./chunks/chunk-A7CFWFQS.js";
9
- import "./chunks/chunk-QXUEF3AJ.js";
10
- import "./chunks/chunk-PUG7LXDF.js";
11
- import "./chunks/chunk-IGVV37VI.js";
8
+ } from "./chunks/chunk-BKEZLETL.js";
9
+ import "./chunks/chunk-KMBE2Q42.js";
10
+ import "./chunks/chunk-3PZSBNLI.js";
11
+ import "./chunks/chunk-CKUVEHSS.js";
12
12
  import "./chunks/chunk-OPPVSPEF.js";
13
13
  import "./chunks/chunk-VPE4AYP7.js";
14
- import "./chunks/chunk-AR4BUBMU.js";
14
+ import "./chunks/chunk-NZTYV3JL.js";
15
15
  import "./chunks/chunk-QYBZZI5H.js";
16
16
  import "./chunks/chunk-5I3K4R2G.js";
17
- import "./chunks/chunk-OIV2GBAJ.js";
18
- import "./chunks/chunk-M6LK4GII.js";
19
- import "./chunks/chunk-RAEABQNW.js";
20
- import "./chunks/chunk-ES2N6V56.js";
21
- import "./chunks/chunk-G45YY72K.js";
22
- import "./chunks/chunk-BPLIXMH7.js";
23
- import "./chunks/chunk-N73TI3VG.js";
24
- import "./chunks/chunk-UVBGRJQX.js";
25
- import "./chunks/chunk-6JEWNXCQ.js";
26
- import "./chunks/chunk-24WITXQY.js";
27
- import "./chunks/chunk-7SRWJLSC.js";
17
+ import "./chunks/chunk-DBLV7PGG.js";
18
+ import "./chunks/chunk-B5X2RLJG.js";
19
+ import "./chunks/chunk-VX656OAZ.js";
20
+ import "./chunks/chunk-Z6XZWPXK.js";
21
+ import "./chunks/chunk-ZPZ7GNBT.js";
22
+ import "./chunks/chunk-BZFOFC4D.js";
23
+ import "./chunks/chunk-HKYXWZQS.js";
24
+ import "./chunks/chunk-34BOZKIE.js";
25
+ import "./chunks/chunk-CGMSKIEO.js";
26
+ import "./chunks/chunk-UBQSRCWR.js";
28
27
  import "./chunks/chunk-CPMHA4W5.js";
29
- import "./chunks/chunk-FYQWPEEY.js";
28
+ import "./chunks/chunk-BSOZW3FC.js";
29
+ import "./chunks/chunk-RJWPJCIB.js";
30
+ import "./chunks/chunk-HOAIOEI7.js";
31
+ import "./chunks/chunk-4XWZNPQ2.js";
30
32
  export {
31
33
  axisScaleOf,
32
34
  contains,