@jbrowse/bandage-core 12.7.1 → 13.0.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 (71) hide show
  1. package/README.md +41 -9
  2. package/dist/chunks/{chunk-3HNQW3HM.js → chunk-252FIXUH.js} +1 -1
  3. package/dist/chunks/{chunk-F5CP5KSV.js → chunk-2HR33HEK.js} +43 -19
  4. package/dist/chunks/{chunk-QHCAFMHM.js → chunk-2T462OOE.js} +1 -1
  5. package/dist/chunks/{chunk-XNLXC6GB.js → chunk-2TNFP3GC.js} +1 -1
  6. package/dist/chunks/{chunk-FAWHP2CG.js → chunk-4D2OQVTR.js} +8 -8
  7. package/dist/chunks/{chunk-RQHIDUZR.js → chunk-4SM3YYY4.js} +6 -2
  8. package/dist/chunks/{chunk-3BLYOLTX.js → chunk-5PQQ4IXZ.js} +1 -1
  9. package/dist/chunks/{chunk-Q4B4O2M4.js → chunk-7ZS7UNYY.js} +1 -5
  10. package/dist/chunks/{chunk-O6SLIY74.js → chunk-BQ2GXFH6.js} +168 -80
  11. package/dist/chunks/{chunk-IDPBN2BP.js → chunk-DBLRFSET.js} +12 -13
  12. package/dist/chunks/{chunk-KA6B7WCZ.js → chunk-DZWYTA5R.js} +1 -1
  13. package/dist/chunks/{chunk-KCVW4VPK.js → chunk-EPCC5T5Y.js} +10 -10
  14. package/dist/chunks/{chunk-BPIELHWX.js → chunk-FLCRH3JY.js} +2 -2
  15. package/dist/chunks/{chunk-4J4IKYSL.js → chunk-FSOP446U.js} +6 -51
  16. package/dist/chunks/{chunk-EHEKIJ56.js → chunk-IDDGO6EW.js} +2 -2
  17. package/dist/chunks/{chunk-QPKSULKV.js → chunk-IDYGRSNF.js} +1 -1
  18. package/dist/chunks/{chunk-ETYIYH7I.js → chunk-K5QGQNPO.js} +5 -5
  19. package/dist/chunks/{chunk-H5NMBQZG.js → chunk-LHPUMKX4.js} +1 -1
  20. package/dist/chunks/chunk-NPDW3JAD.js +118 -0
  21. package/dist/chunks/{chunk-LT66KA3W.js → chunk-QDP2NTAV.js} +3 -3
  22. package/dist/chunks/{chunk-TTFQTTBZ.js → chunk-RNROMUAS.js} +3 -3
  23. package/dist/chunks/{chunk-WXUEAMJJ.js → chunk-RWCZLHXX.js} +1 -1
  24. package/dist/chunks/{chunk-7O7427XK.js → chunk-S3A345Q4.js} +1 -1
  25. package/dist/chunks/{chunk-Q4X6O7BL.js → chunk-STHPR76Q.js} +22 -7
  26. package/dist/chunks/{chunk-6YVWF5TR.js → chunk-VX57QTQD.js} +2 -2
  27. package/dist/chunks/{chunk-YAJT4IDN.js → chunk-Z2OUCH2J.js} +1 -1
  28. package/dist/cli/figure.js +22 -22
  29. package/dist/cli/fold.js +5 -5
  30. package/dist/figure.js +17 -17
  31. package/dist/figureData.js +20 -20
  32. package/dist/figureScene.js +13 -13
  33. package/dist/figureSettings.js +6 -6
  34. package/dist/gbzCut.js +4 -4
  35. package/dist/gbzWindow.js +3 -3
  36. package/dist/gfa/departures.js +26 -0
  37. package/dist/gfa/gfaConverter.js +1 -2
  38. package/dist/gfa/gfaTables.js +2 -2
  39. package/dist/gfa/graphTables.js +1 -2
  40. package/dist/index.js +39 -33
  41. package/dist/layout/forceCache.js +6 -6
  42. package/dist/layout/tubeMapLayout.js +5 -5
  43. package/dist/layout/walkRowDraw.js +4 -4
  44. package/dist/layout/walkRowLayout.js +6 -6
  45. package/dist/layout/walkRowRuns.js +3 -3
  46. package/dist/layout/walkRows.js +4 -4
  47. package/dist/layout/walkStrip.js +7 -7
  48. package/dist/layoutModes.js +8 -8
  49. package/dist/pipeline.js +5 -5
  50. package/dist/tubeMap/bundle.js +6 -6
  51. package/dist/tubeMap/coarsen.js +6 -6
  52. package/dist/tubeMap/deviations.js +6 -6
  53. package/dist/tubeMap/draw.js +5 -5
  54. package/dist/types/gfa/departures.d.ts +72 -0
  55. package/dist/types/gfa/graphTables.d.ts +35 -12
  56. package/dist/types/index.d.ts +4 -4
  57. package/dist/types/layout/deletionRoutes.d.ts +1 -1
  58. package/dist/types/layout/walkRowDraw.d.ts +4 -4
  59. package/dist/types/layout/walkRowRuns.d.ts +26 -6
  60. package/dist/types/layout/walkRows.d.ts +10 -4
  61. package/dist/types/types.d.ts +4 -25
  62. package/dist/types/version.d.ts +1 -1
  63. package/dist/types/walkHighlight.d.ts +1 -1
  64. package/dist/version.js +1 -1
  65. package/dist/viewport.js +6 -6
  66. package/dist/walkHighlight.js +2 -2
  67. package/dist/walkKey.js +2 -2
  68. package/package.json +2 -1
  69. package/dist/chunks/chunk-D7ZTAGDM.js +0 -168
  70. package/dist/gfa/walkStops.js +0 -28
  71. package/dist/types/gfa/walkStops.d.ts +0 -59
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  lastAtMost
3
- } from "../chunks/chunk-KA6B7WCZ.js";
3
+ } from "../chunks/chunk-DZWYTA5R.js";
4
4
  import {
5
5
  boxX,
6
6
  referenceBoxes
7
7
  } from "../chunks/chunk-HGVMMYEQ.js";
8
- import "../chunks/chunk-3HNQW3HM.js";
8
+ import "../chunks/chunk-252FIXUH.js";
9
9
  import "../chunks/chunk-KKHXMJEE.js";
10
10
  import "../chunks/chunk-5OJZV6YT.js";
11
- import "../chunks/chunk-H5NMBQZG.js";
12
- import "../chunks/chunk-O6SLIY74.js";
11
+ import "../chunks/chunk-LHPUMKX4.js";
12
+ import "../chunks/chunk-BQ2GXFH6.js";
13
13
  import "../chunks/chunk-KKYPJITI.js";
14
- import "../chunks/chunk-IDPBN2BP.js";
15
- import "../chunks/chunk-D7ZTAGDM.js";
14
+ import "../chunks/chunk-DBLRFSET.js";
15
+ import "../chunks/chunk-NPDW3JAD.js";
16
16
  import "../chunks/chunk-74A3MFUM.js";
17
17
  import "../chunks/chunk-HMXCN6PG.js";
18
18
  import "../chunks/chunk-S43IBA5Y.js";
@@ -8,15 +8,15 @@ import {
8
8
  tubeMapMismatchAt,
9
9
  tubeMapPicture,
10
10
  tubeMapTrackAt
11
- } from "../chunks/chunk-7O7427XK.js";
11
+ } from "../chunks/chunk-S3A345Q4.js";
12
12
  import "../chunks/chunk-MYDHU2UV.js";
13
13
  import "../chunks/chunk-BX4AUMZE.js";
14
14
  import "../chunks/chunk-KKHXMJEE.js";
15
15
  import "../chunks/chunk-5OJZV6YT.js";
16
- import "../chunks/chunk-H5NMBQZG.js";
17
- import "../chunks/chunk-O6SLIY74.js";
18
- import "../chunks/chunk-IDPBN2BP.js";
19
- import "../chunks/chunk-D7ZTAGDM.js";
16
+ import "../chunks/chunk-LHPUMKX4.js";
17
+ import "../chunks/chunk-BQ2GXFH6.js";
18
+ import "../chunks/chunk-DBLRFSET.js";
19
+ import "../chunks/chunk-NPDW3JAD.js";
20
20
  import "../chunks/chunk-QBI6SC74.js";
21
21
  import "../chunks/chunk-JJV2GT2Z.js";
22
22
  import "../chunks/chunk-CPMHA4W5.js";
@@ -0,0 +1,72 @@
1
+ import type { DepartureTable } from './graphTables.js';
2
+ export interface Departure {
3
+ name: string;
4
+ hapStart: number;
5
+ ownBp: number;
6
+ missingBp: number;
7
+ leavePos: number;
8
+ leaveReversed: boolean;
9
+ leavePasses: number;
10
+ rejoinPos: number;
11
+ rejoinReversed: boolean;
12
+ rejoinPasses: number;
13
+ fromSteps: boolean;
14
+ }
15
+ export declare function departureAt(t: DepartureTable, k: number): Departure;
16
+ /**
17
+ * Departures as a table, none with own steps: for tables a source other than
18
+ * @jbrowse/graph-walks builds, and with no departures, for one that states
19
+ * none, such as a GFA or a gbz-base cut
20
+ */
21
+ export declare function departureTable(departures?: Departure[]): DepartureTable;
22
+ type Ends = Pick<Departure, 'ownBp' | 'leavePos' | 'leaveReversed' | 'rejoinPos' | 'rejoinReversed'>;
23
+ /**
24
+ * What a departure does on the reference, from its ends, as graph-walks'
25
+ * `departureKind` derives it with no holes: `switch`, the strands differ;
26
+ * `back`, the walk jumps back over reference it walks again; `adjacent`,
27
+ * sequence of its own between adjacent steps; `forward`, a jump forward over
28
+ * reference it leaves out
29
+ */
30
+ export type DepartureKind = 'switch' | 'back' | 'adjacent' | 'forward';
31
+ export declare function departureKind(d: Ends): DepartureKind;
32
+ /**
33
+ * Whether a departure's place is the writer's choice, as graph-walks'
34
+ * `placementChoice` says: an end lies on a node the reference passes more
35
+ * than once, so another pass would put it elsewhere or make it none
36
+ */
37
+ export declare function placementChoice(d: Pick<Departure, 'leavePasses' | 'rejoinPasses'>): boolean;
38
+ export declare function departureSpan(d: Pick<Departure, 'leavePos' | 'rejoinPos'>): {
39
+ start: number;
40
+ end: number;
41
+ };
42
+ export declare function roughBp(bp: number): string;
43
+ /**
44
+ * A departure's facts in words, making no call on what it is: the reference
45
+ * stretch between its ends and how the ends lie, the haplotype's own bp
46
+ * between them and the part the graph lacks, and whether the place is the
47
+ * writer's choice. `no step on GRCh38 across 54 kb · 120 kb of its own`
48
+ */
49
+ export declare function departureText(d: Departure, reference?: string): string;
50
+ export declare const PLACEMENT_CHOICE_TEXT = "placement choice";
51
+ export type GapCause = 'missing' | 'elsewhere' | 'own' | 'abridged' | 'departure';
52
+ export declare const GAP_CAUSE_TEXT: Record<GapCause, string>;
53
+ export declare const OUTSIDE_TEXT = "outside the extracted subgraph";
54
+ export interface GapPart {
55
+ bp: number;
56
+ cause?: GapCause;
57
+ near?: number;
58
+ }
59
+ /**
60
+ * A gap of a walk's contig between two of its pieces, `from` to `to`, split
61
+ * by what the cut states: the bp each side's fragment was trimmed of, outside
62
+ * the extracted subgraph; then the bp the departures inside the gap say the
63
+ * graph lacks; and the rest, the walk's own sequence the cut did not read
64
+ * where one departure leaves at the gap's start and rejoins at its end, and
65
+ * else on nodes filed near where the first leaves for. With no departure in
66
+ * it, the gap stays whole, with no cause.
67
+ */
68
+ export declare function gapParts(from: number, to: number, trimmed: {
69
+ after?: number;
70
+ before?: number;
71
+ }, departures: Departure[]): GapPart[];
72
+ export {};
@@ -1,11 +1,16 @@
1
- import type { WalkStopTable } from './walkStops.js';
2
- import type { Graph, GraphPath, WalkSkips } from '../types.js';
1
+ import type { Graph, GraphPath } from '../types.js';
3
2
  /**
4
3
  * A graph as typed arrays, the shape a worker can hand across postMessage
5
4
  * without copying: what a GFA of S lines tagged LN/SN/SO/SR, L lines and W
6
5
  * lines states, with every link end and walk step an index into the node
7
- * table. `graphFromTables` builds the Graph that converting that GFA builds,
8
- * and `graphTablesGFA` writes the GFA.
6
+ * table, and the departures from the reference over the cut, which no GFA
7
+ * line states. `graphFromTables` builds the Graph that converting that GFA
8
+ * builds, and `graphTablesGFA` writes the GFA.
9
+ *
10
+ * @jbrowse/graph-walks 5's `WalkGraph.tables` returns this shape, which
11
+ * typecheck/graphWalks.ts holds equal to its `GraphTables`. `departures` is
12
+ * required, so tables from a reader that states none fail to compile rather
13
+ * than draw no departure; a source with none passes `departureTable()`.
9
14
  */
10
15
  export interface GraphTables {
11
16
  nodes: {
@@ -15,6 +20,7 @@ export interface GraphTables {
15
20
  starts: Float64Array;
16
21
  ranks: Int32Array;
17
22
  refNames: string[];
23
+ passes?: Int32Array;
18
24
  };
19
25
  links: {
20
26
  from: Int32Array;
@@ -28,12 +34,28 @@ export interface GraphTables {
28
34
  offsets: Int32Array;
29
35
  steps: Int32Array;
30
36
  reversed: Uint8Array;
31
- before?: WalkStopTable;
32
- after?: WalkStopTable;
37
+ trimmedBefore?: Float64Array;
38
+ trimmedAfter?: Float64Array;
33
39
  abridgedSteps?: Float64Array;
34
40
  abridgedBp?: Float64Array;
35
41
  };
36
- skips?: WalkSkips;
42
+ departures: DepartureTable;
43
+ }
44
+ export interface DepartureTable {
45
+ names: string[];
46
+ hapStarts: Float64Array;
47
+ ownBp: Float64Array;
48
+ missingBp: Float64Array;
49
+ leavePos: Float64Array;
50
+ leaveReversed: Uint8Array;
51
+ leavePasses: Int32Array;
52
+ rejoinPos: Float64Array;
53
+ rejoinReversed: Uint8Array;
54
+ rejoinPasses: Int32Array;
55
+ fromSteps: Uint8Array;
56
+ offsets: Int32Array;
57
+ steps: Int32Array;
58
+ reversed: Uint8Array;
37
59
  }
38
60
  /** The GraphPath `graphFromTables` builds of walk `p`, less its steps */
39
61
  export declare function tablePath(w: GraphTables['walks'], p: number): Omit<GraphPath, 'nodeIds'> & {
@@ -44,17 +66,18 @@ export declare function tablePath(w: GraphTables['walks'], p: number): Omit<Grap
44
66
  * claimed by a link and else by a walk. Counts each segment's walk steps into
45
67
  * `traversals` when given one.
46
68
  */
47
- export declare function tableNodeIds({ nodes: n, links: l, walks: w }: GraphTables, traversals?: Int32Array): string[];
69
+ export declare function tableNodeIds({ nodes: n, links: l, walks: w }: Omit<GraphTables, 'departures'>, traversals?: Int32Array): string[];
48
70
  /**
49
71
  * The Graph `convertGFAToGraph` builds from `graphTablesGFA(tables)`, deep
50
72
  * equal, built by index: a step costs a few array reads and its visit, where
51
- * the text costs a string and several map lookups. GFA has no line for a skip
52
- * row, so only this Graph keeps the tables' `skips`.
73
+ * the text costs a string and several map lookups. GFA has no line for a
74
+ * departure or a trimmed walk's bp, so only this Graph keeps the tables'
75
+ * `departures` and each walk's trimmed bp.
53
76
  */
54
- export declare function graphFromTables({ nodes: n, links: l, walks: w, skips }: GraphTables, name?: string): Graph;
77
+ export declare function graphFromTables({ nodes: n, links: l, walks: w, departures }: GraphTables, name?: string): Graph;
55
78
  /**
56
79
  * The tables as GFA text: S lines in table order, then L lines, then a W
57
80
  * line per walk, or a P line for a walk whose name has fewer than three PanSN
58
81
  * parts
59
82
  */
60
- export declare function graphTablesGFA({ nodes, links, walks }: GraphTables): string;
83
+ export declare function graphTablesGFA({ nodes, links, walks, }: Pick<GraphTables, 'nodes' | 'links' | 'walks'>): string;
@@ -103,14 +103,14 @@ export type { GeneModel, GenePin } from './genes/genePins.js';
103
103
  export { WELL_KNOWN_SAMPLES, assemblyWalk, backboneAssembly, featuresOnBackbone, graphBackbone, refNameBinding, referenceLabel, wellKnownSample, } from './reference.js';
104
104
  export type { AssemblyNames, Backbone, BackboneContig } from './reference.js';
105
105
  export { LABEL_CHAR_PX, LABEL_PAD, LABEL_PX } from './overlayLabels.js';
106
- export type { Graph, GraphEdge, GraphNode, LayoutResult, NodeSegment, PathStop, StopChunk, WalkSkips, } from './types.js';
106
+ export type { Graph, GraphEdge, GraphNode, LayoutResult, NodeSegment, } from './types.js';
107
107
  export { compactTables, cutWindowGFA, cutWindowTables, haplotypeWanted, referencePathQuery, referenceSamplesOf, resolveReferenceSample, } from './gbzWindow.js';
108
108
  export type { GbzWindowOptions } from './gbzWindow.js';
109
109
  export { gfaTables } from './gfa/gfaTables.js';
110
110
  export { graphFromTables, graphTablesGFA } from './gfa/graphTables.js';
111
- export type { GraphTables } from './gfa/graphTables.js';
112
- export { END_STOP_TAG, GAP_CAUSE_TEXT, OUTSIDE_TEXT, START_STOP_TAG, gapParts, parseStopTag, stopTag, } from './gfa/walkStops.js';
113
- export type { GapCause, GapPart, WalkStopTable } from './gfa/walkStops.js';
111
+ export type { DepartureTable, GraphTables } from './gfa/graphTables.js';
112
+ export { GAP_CAUSE_TEXT, OUTSIDE_TEXT, PLACEMENT_CHOICE_TEXT, departureAt, departureKind, departureSpan, departureTable, departureText, gapParts, placementChoice, } from './gfa/departures.js';
113
+ export type { Departure, DepartureKind, GapCause, GapPart, } from './gfa/departures.js';
114
114
  export { PathVisits, PathVisitsBuilder } from './pathVisits.js';
115
115
  export { engineKey } from './pipeline.js';
116
116
  export { axisScaleOf, contains, padded, screenToLayout, viewportOf, zoomAbout, } from './viewport.js';
@@ -18,7 +18,7 @@ export declare function withDeletionRoutes(graph: Graph, deletions: DeletionEdge
18
18
  anchoredBy?: "tags" | "paths";
19
19
  referencePath?: string;
20
20
  reads?: import("../gaf/parseGaf.js").GafRecord[];
21
- skips?: import("../index.js").WalkSkips;
21
+ departures?: import("../index.js").DepartureTable;
22
22
  };
23
23
  routes: Map<number, string>;
24
24
  ids: Set<string>;
@@ -1,12 +1,12 @@
1
1
  import type { WalkAxis, WalkRow, WalkRows, WalkRun } from './walkRows.js';
2
2
  import type { El } from '../el.js';
3
3
  import type { GeneModel } from '../genes/genePins.js';
4
- import type { GapCause } from '../gfa/walkStops.js';
4
+ import type { GapCause } from '../gfa/departures.js';
5
5
  export declare const ON_REFERENCE = "#2f8fd6";
6
6
  export declare const OFF_REFERENCE = "#8e3fbf";
7
7
  export declare const OUTSIDE_CUT = "#bdbdbd";
8
8
  export declare const MISSING_INK = "#8a8a8a";
9
- export declare const UNKNOWN_GAP = "#e2e2e2";
9
+ export declare const OWN_GAP = "#e2e2e2";
10
10
  export declare const ABRIDGED_GAP = "#d9a441";
11
11
  export declare const GENE_INK = "#1c1c22";
12
12
  export declare const BAR_PX = 12;
@@ -18,9 +18,9 @@ export interface ReadoutCall {
18
18
  spanningReads?: number;
19
19
  agrees?: boolean;
20
20
  }
21
- export declare function walkRowReadout(row: Pick<WalkRow, 'bp' | 'gapBp' | 'complete' | 'stop' | 'abridgedSteps' | 'estimated' | 'deletionBp'> & {
21
+ export declare function walkRowReadout(row: Pick<WalkRow, 'bp' | 'gapBp' | 'complete' | 'stop' | 'abridgedSteps' | 'estimated' | 'departures' | 'placementChoice' | 'stepless'> & {
22
22
  runs?: WalkRun[];
23
- }, reference: Pick<WalkRow, 'bp'> | undefined, unit?: number, call?: ReadoutCall): string;
23
+ }, reference: (Pick<WalkRow, 'bp'> & Partial<WalkRow>) | undefined, unit?: number, call?: ReadoutCall): string;
24
24
  export declare function readoutPlacement(text: string, endX: number, width: number): {
25
25
  x: number;
26
26
  anchor: "start";
@@ -1,6 +1,6 @@
1
1
  import type { WalkRow, WalkRows, WalkRun } from './walkRows.js';
2
2
  import type { GraphTables } from '../gfa/graphTables.js';
3
- import type { Graph, StopChunk } from '../types.js';
3
+ import type { Graph } from '../types.js';
4
4
  export type WalkRowMeta = Omit<WalkRow, 'runs' | 'visits'>;
5
5
  /**
6
6
  * Each row's visits, row i's at `offsets[i]` up to `offsets[i + 1]`: the
@@ -28,8 +28,7 @@ export interface WalkRowRuns {
28
28
  bp: Float64Array;
29
29
  referenceStart: Float64Array;
30
30
  flags: Uint8Array;
31
- chunk: Int32Array;
32
- chunks: StopChunk[];
31
+ near: Float64Array;
33
32
  visits?: WalkVisitColumns;
34
33
  }
35
34
  export declare function referenceWalkName(graph: Pick<Graph, 'nodes' | 'paths' | 'referencePath'>): string | undefined;
@@ -40,9 +39,30 @@ export declare function referenceWalkName(graph: Pick<Graph, 'nodes' | 'paths' |
40
39
  *
41
40
  * Each walk is cut at the nearest reference nodes IT visits on either side of
42
41
  * the region, so a walk that skips one flanking node at a SNP is still
43
- * measured between flanks rather than whole. A walk with one flank, whose
44
- * contig ends inside the window, is the steps past that flank read in the
45
- * reference's direction, a lower bound.
42
+ * measured between flanks rather than whole. A walk with one flank is the
43
+ * steps past that flank read in the reference's direction, a lower bound.
44
+ * Its contig ends at its last step there only where that step is on the
45
+ * reference, the walk has no departure leaving or rejoining at it, and the
46
+ * cut trimmed none of its bp past it; else it goes on (`WalkStop`). A walk
47
+ * file's fragment always ends on the reference, so its end alone says
48
+ * nothing.
49
+ *
50
+ * The window's side of a lone flank is the way the walk runs along the
51
+ * reference there, read from its nearest other step on it. Where the flank is
52
+ * the walk's only step, it is read from a departure at that step, whose strand
53
+ * there is the walk's; else from the bp the cut trimmed off one side alone,
54
+ * the side the walk came from; and with both sides trimmed or neither, both
55
+ * say the same. Nothing past the flank is in the window, so the row has no bp.
56
+ *
57
+ * A cut with no flanking reference stands the reference's outermost nodes in
58
+ * the cut in for the flanks, counted inside the window. A walk on both is
59
+ * whole; on one, it stops inside as a walk with one flank does, measured from
60
+ * that node; on neither, it is partial. The source decides whether a walk
61
+ * is read so: a walk file's tables state each walk's trimmed bp, 0 included,
62
+ * so there a side with none and no departure is where the contig ends. A
63
+ * source that states no trimmed bp, GFA text or a gbz-base extract, clips its
64
+ * paths at the subgraph's edge, so where they end says nothing and each walk
65
+ * is the slice whole.
46
66
  */
47
67
  export declare function walkRowRuns(source: Graph | GraphTables, region?: {
48
68
  start: number;
@@ -1,5 +1,5 @@
1
- import type { GapCause } from '../gfa/walkStops.js';
2
- import type { Graph, StopChunk } from '../types.js';
1
+ import type { Departure, GapCause } from '../gfa/departures.js';
2
+ import type { Graph } from '../types.js';
3
3
  export { referenceWalkName } from './walkRowRuns.js';
4
4
  export interface WalkRun {
5
5
  start: number;
@@ -9,7 +9,7 @@ export interface WalkRun {
9
9
  reversed?: true;
10
10
  gap?: true;
11
11
  cause?: GapCause;
12
- chunk?: StopChunk;
12
+ near?: number;
13
13
  }
14
14
  export interface WalkAxis {
15
15
  contig: string;
@@ -19,6 +19,10 @@ export interface WalkAxis {
19
19
  export interface WalkStop {
20
20
  contigEnds: boolean;
21
21
  shortBp: number;
22
+ goesOn?: {
23
+ departure: Departure;
24
+ near: number;
25
+ };
22
26
  }
23
27
  export interface WalkVisit {
24
28
  node: string;
@@ -38,7 +42,9 @@ export interface WalkRow {
38
42
  stop?: WalkStop;
39
43
  abridgedSteps?: number;
40
44
  estimated?: boolean;
41
- deletionBp?: number;
45
+ departures?: Departure[];
46
+ placementChoice?: true;
47
+ stepless?: true;
42
48
  runs: WalkRun[];
43
49
  visits?: WalkVisit[];
44
50
  axis?: WalkAxis;
@@ -1,4 +1,5 @@
1
1
  import type { GafRecord } from './gaf/parseGaf.js';
2
+ import type { DepartureTable } from './gfa/graphTables.js';
2
3
  import type { StableCoordinate } from './gfa-core/index.js';
3
4
  import type { TubeMapDrawing } from './layout/tubeMapLayout.js';
4
5
  import type { PathVisits } from './pathVisits.js';
@@ -32,30 +33,13 @@ export interface GraphPath {
32
33
  haplotype?: number;
33
34
  contig?: string;
34
35
  members?: string[];
35
- before?: PathStop;
36
- after?: PathStop;
36
+ trimmedBefore?: number;
37
+ trimmedAfter?: number;
37
38
  abridged?: {
38
39
  steps: number;
39
40
  bp: number;
40
41
  };
41
42
  }
42
- export type PathStop = ({
43
- kind: 'elsewhere';
44
- chunk: StopChunk;
45
- bp?: number;
46
- } | {
47
- kind: 'break';
48
- bp: number;
49
- chunk?: StopChunk;
50
- } | {
51
- kind: 'end';
52
- }) & {
53
- trimmed?: number;
54
- };
55
- export interface StopChunk {
56
- refName: string;
57
- start: number;
58
- }
59
43
  export interface PathOrigin {
60
44
  name: string;
61
45
  sample: string;
@@ -78,12 +62,7 @@ export interface Graph {
78
62
  anchoredBy?: 'tags' | 'paths';
79
63
  referencePath?: string;
80
64
  reads?: GafRecord[];
81
- skips?: WalkSkips;
82
- }
83
- export interface WalkSkips {
84
- names: string[];
85
- starts: Float64Array;
86
- ends: Float64Array;
65
+ departures?: DepartureTable;
87
66
  }
88
67
  export interface NodeSegment {
89
68
  x: number;
@@ -1 +1 @@
1
- export declare const version = "12.7.1";
1
+ export declare const version = "13.0.1";
@@ -20,7 +20,7 @@ export interface WalkHighlight {
20
20
  end: number;
21
21
  };
22
22
  missingBp: number;
23
- unknownBp: number;
23
+ ownBp: number;
24
24
  }
25
25
  export interface LiftedWalk extends WalkHighlight {
26
26
  encoding: WalkEncoding;
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  version
3
- } from "./chunks/chunk-WXUEAMJJ.js";
3
+ } from "./chunks/chunk-RWCZLHXX.js";
4
4
  export {
5
5
  version
6
6
  };
package/dist/viewport.js CHANGED
@@ -5,20 +5,20 @@ import {
5
5
  screenToLayout,
6
6
  viewportOf,
7
7
  zoomAbout
8
- } from "./chunks/chunk-XNLXC6GB.js";
9
- import "./chunks/chunk-TTFQTTBZ.js";
8
+ } from "./chunks/chunk-2TNFP3GC.js";
9
+ import "./chunks/chunk-RNROMUAS.js";
10
10
  import "./chunks/chunk-4FRX2SPT.js";
11
11
  import "./chunks/chunk-OPPVSPEF.js";
12
12
  import "./chunks/chunk-XABWOV3C.js";
13
13
  import "./chunks/chunk-NAYS472K.js";
14
- import "./chunks/chunk-Q4B4O2M4.js";
14
+ import "./chunks/chunk-7ZS7UNYY.js";
15
15
  import "./chunks/chunk-QYBZZI5H.js";
16
16
  import "./chunks/chunk-CFXXFHRK.js";
17
17
  import "./chunks/chunk-FGH4D6WT.js";
18
- import "./chunks/chunk-IDPBN2BP.js";
18
+ import "./chunks/chunk-DBLRFSET.js";
19
19
  import "./chunks/chunk-L4DBSRA2.js";
20
- import "./chunks/chunk-4J4IKYSL.js";
21
- import "./chunks/chunk-D7ZTAGDM.js";
20
+ import "./chunks/chunk-FSOP446U.js";
21
+ import "./chunks/chunk-NPDW3JAD.js";
22
22
  import "./chunks/chunk-HNNP5QUN.js";
23
23
  import "./chunks/chunk-HKYXWZQS.js";
24
24
  import "./chunks/chunk-34BOZKIE.js";
@@ -3,7 +3,7 @@ import {
3
3
  fadedKey,
4
4
  walkHighlight,
5
5
  walkLift
6
- } from "./chunks/chunk-Q4X6O7BL.js";
6
+ } from "./chunks/chunk-STHPR76Q.js";
7
7
  import "./chunks/chunk-OC5HU7M3.js";
8
8
  import "./chunks/chunk-UY7CLJNZ.js";
9
9
  import "./chunks/chunk-YUIKEUKY.js";
@@ -13,7 +13,7 @@ import "./chunks/chunk-XWH4LB56.js";
13
13
  import "./chunks/chunk-KKYPJITI.js";
14
14
  import "./chunks/chunk-ZXOELYF3.js";
15
15
  import "./chunks/chunk-L4DBSRA2.js";
16
- import "./chunks/chunk-D7ZTAGDM.js";
16
+ import "./chunks/chunk-NPDW3JAD.js";
17
17
  import "./chunks/chunk-74A3MFUM.js";
18
18
  import "./chunks/chunk-HMXCN6PG.js";
19
19
  import "./chunks/chunk-S43IBA5Y.js";
package/dist/walkKey.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  rangeText,
3
3
  walkKey,
4
4
  walkPosition
5
- } from "./chunks/chunk-LT66KA3W.js";
6
- import "./chunks/chunk-D7ZTAGDM.js";
5
+ } from "./chunks/chunk-QDP2NTAV.js";
6
+ import "./chunks/chunk-NPDW3JAD.js";
7
7
  import "./chunks/chunk-74A3MFUM.js";
8
8
  import "./chunks/chunk-HMXCN6PG.js";
9
9
  import "./chunks/chunk-S43IBA5Y.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/bandage-core",
3
- "version": "12.7.1",
3
+ "version": "13.0.1",
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": {
@@ -43,6 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@eslint/js": "^10.0.1",
46
+ "@jbrowse/graph-walks": "^5.0.2",
46
47
  "@types/node": "^26.6.5",
47
48
  "esbuild": "^0.28.2",
48
49
  "eslint": "^10.11.0",