@jbrowse/bandage-core 4.0.24 → 4.0.25
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/chunks/{chunk-4AOHEU76.js → chunk-B5ZHLU4N.js} +589 -36
- package/dist/cli/figure.js +61 -56
- package/dist/index.js +47 -242
- package/dist/types/cli/figure.d.ts +8 -8
- package/dist/types/figure.d.ts +3 -1
- package/dist/types/gbzCut.d.ts +33 -0
- package/dist/types/genes/geneFiles.d.ts +10 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/labelLayout.d.ts +14 -0
- package/dist/types/referenceStrip.d.ts +4 -3
- package/dist/types/version.d.ts +1 -0
- package/dist/types/walkKey.d.ts +1 -0
- package/package.json +3 -2
package/dist/types/figure.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ColorScheme } from './colorSchemes.js';
|
|
2
2
|
import type { FacetBy } from './facetGrid.js';
|
|
3
|
+
import type { GeneModel } from './genes/genePins.js';
|
|
3
4
|
import type { NodeWidth } from './nodeWidths.js';
|
|
4
5
|
import type { Graph, LayoutResult } from './types.js';
|
|
5
6
|
import type { WalkLayer } from './walkEncoding.js';
|
|
@@ -19,6 +20,7 @@ export interface FigureOptions {
|
|
|
19
20
|
start: number;
|
|
20
21
|
end: number;
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
+
genes?: GeneModel[];
|
|
24
|
+
spec?: unknown;
|
|
23
25
|
}
|
|
24
26
|
export declare function figureSvg(graph: Graph, layout: LayoutResult, o?: FigureOptions): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { GBZBase } from '@gmod/gbz-base';
|
|
2
|
+
import type { ByteSource, RangeOptions } from '@gmod/gbz-base';
|
|
3
|
+
export interface GbzSource {
|
|
4
|
+
db: string;
|
|
5
|
+
index?: string;
|
|
6
|
+
region: string;
|
|
7
|
+
haplotypes?: string[];
|
|
8
|
+
referenceSample?: string;
|
|
9
|
+
context?: number;
|
|
10
|
+
snarls?: RangeOptions['snarls'];
|
|
11
|
+
}
|
|
12
|
+
export declare const HPRC_GBZ: {
|
|
13
|
+
db: string;
|
|
14
|
+
index: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function parseRegion(text: string): {
|
|
17
|
+
refName: string;
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function openGbz(db: ByteSource, index?: ByteSource): Promise<{
|
|
22
|
+
base: GBZBase;
|
|
23
|
+
referenceSamples: string[];
|
|
24
|
+
}>;
|
|
25
|
+
export declare function cutGbzRegion({ base, referenceSamples }: Awaited<ReturnType<typeof openGbz>>, src: Omit<GbzSource, 'db' | 'index'>, signal?: AbortSignal): Promise<{
|
|
26
|
+
text: string;
|
|
27
|
+
region: {
|
|
28
|
+
refName: string;
|
|
29
|
+
start: number;
|
|
30
|
+
end: number;
|
|
31
|
+
};
|
|
32
|
+
sample: string;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GeneModel } from './genePins.js';
|
|
2
|
+
type Interval = GeneModel['exons'][number];
|
|
3
|
+
export declare function mergedIntervals(intervals: Interval[]): {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function genesFromGff3Lines(lines: Iterable<string>): GeneModel[];
|
|
8
|
+
export declare function genesFromBed(text: string): GeneModel[];
|
|
9
|
+
export declare function genesFromText(text: string): GeneModel[];
|
|
10
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -33,8 +33,12 @@ export type { TubeMapColumn, TubeMapDrawing } from './layout/tubeMapLayout.js';
|
|
|
33
33
|
export { deletionEdges } from './deletionEdges.js';
|
|
34
34
|
export type { DeletionEdge } from './deletionEdges.js';
|
|
35
35
|
export { facetLifts, walkHighlight, walkLift } from './walkHighlight.js';
|
|
36
|
-
export { rangeText, walkKey } from './walkKey.js';
|
|
36
|
+
export { rangeText, walkKey, walkPosition } from './walkKey.js';
|
|
37
37
|
export { figureSvg } from './figure.js';
|
|
38
|
+
export { genesFromBed, genesFromGff3Lines, genesFromText, } from './genes/geneFiles.js';
|
|
39
|
+
export { HPRC_GBZ, cutGbzRegion, openGbz, parseRegion } from './gbzCut.js';
|
|
40
|
+
export type { GbzSource } from './gbzCut.js';
|
|
41
|
+
export { version } from './version.js';
|
|
38
42
|
export type { FigureOptions } from './figure.js';
|
|
39
43
|
export { svgCanvas } from './renderer/svgCanvas.js';
|
|
40
44
|
export { FACET_GAP_PX, FACET_PAD_PX, FACET_TITLE_PX, facetCells, facetGrid, } from './facetGrid.js';
|
|
@@ -46,4 +46,18 @@ export interface LabelLayout {
|
|
|
46
46
|
sizes: GraphLabel[];
|
|
47
47
|
}
|
|
48
48
|
export declare function geneCoverageNote(pin: GenePin): string | undefined;
|
|
49
|
+
export declare function geneLabelCandidates(pins: GenePin[], screen: (p: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
}) => {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
}, contigThickness: number): {
|
|
56
|
+
item: GenePin;
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
text: string;
|
|
60
|
+
fallback: string | undefined;
|
|
61
|
+
stack: number;
|
|
62
|
+
}[];
|
|
49
63
|
export declare function layoutLabels(m: LabelLayoutSource): LabelLayout;
|
|
@@ -41,12 +41,13 @@ export interface StripLit {
|
|
|
41
41
|
y: number;
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export interface StripPixel {
|
|
45
45
|
colors: string[];
|
|
46
46
|
x0: number;
|
|
47
47
|
x1: number;
|
|
48
|
-
tier
|
|
49
|
-
}
|
|
48
|
+
tier?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare function stripPixels(blocks: readonly StripBlock[], frame: BpFrame, width: number, dpr: number): StripPixel[];
|
|
50
51
|
export declare function drawReferenceStrip(ctx: CanvasRenderingContext2D, blocks: readonly StripBlock[], frame: BpFrame, { width, lit, darkMode, dpr, }: {
|
|
51
52
|
width: number;
|
|
52
53
|
lit?: StripLit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "4.0.25";
|
package/dist/types/walkKey.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/bandage-core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.25",
|
|
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": {
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@gmod/gbz-base": "^4.
|
|
34
|
+
"@gmod/gbz-base": "^4.1.0",
|
|
35
|
+
"@gmod/tabix": "^3.9.0",
|
|
35
36
|
"@gmod/tubemap-core": "^0.1.0",
|
|
36
37
|
"@jbrowse/core": "5.0.0-beta.9",
|
|
37
38
|
"@jbrowse/render-core": "5.0.0-beta.9"
|