loom-browser 0.0.1 → 0.0.3
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/loom.esm.js +27 -21
- package/dist/loom.esm.min.js +1 -1
- package/dist/loom.esm.min.js.map +1 -1
- package/dist/loom.js +27 -21
- package/dist/loom.min.js +1 -1
- package/dist/loom.min.js.map +1 -1
- package/dist/types/commandDispatcher.d.ts +22 -1
- package/dist/types/gtx/zstdWasm.d.ts +4 -1
- package/dist/types/gtx/zstdWasmInlined.d.ts +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/remoteProtocol.d.ts +2 -0
- package/package.json +8 -2
- package/dist/igv.d.ts +0 -667
- package/dist/igv.esm.js +0 -76708
- package/dist/igv.esm.min.js +0 -26
- package/dist/igv.esm.min.js.map +0 -1
- package/dist/igv.js +0 -76716
- package/dist/igv.min.js +0 -26
- package/dist/igv.min.js.map +0 -1
- package/dist/loom.d.ts +0 -667
- package/dist/types/agent/index.d.ts +0 -4
- package/dist/types/agent/stateProjection.d.ts +0 -115
- package/dist/types/agent/trackSelector.d.ts +0 -31
- package/dist/types/baseTrackCanvas.d.ts +0 -62
- package/dist/types/bigwig/binaryParser.d.ts +0 -25
- package/dist/types/bigwig/bpTree.d.ts +0 -40
- package/dist/types/bigwig/bwReader.d.ts +0 -69
- package/dist/types/bigwig/chromTree.d.ts +0 -28
- package/dist/types/bigwig/inflate.d.ts +0 -9
- package/dist/types/bigwig/rangeReader.d.ts +0 -48
- package/dist/types/bigwig/rpTree.d.ts +0 -27
- package/dist/types/dataSources/dynseqDataSource.d.ts +0 -20
- package/dist/types/dynseqRenderer.d.ts +0 -37
- package/dist/types/geneRenderer.d.ts +0 -17
- package/dist/types/geneThemes.d.ts +0 -11
- package/dist/types/geneTrackCanvas.d.ts +0 -46
- package/dist/types/renderTheme.d.ts +0 -72
- package/dist/types/renderThemePresets.d.ts +0 -16
- package/dist/types/rulerRenderer.d.ts +0 -14
- package/dist/types/rulerTrackCanvas.d.ts +0 -32
- package/dist/types/src/bigwig/index.d.ts +0 -66
- package/dist/types/src/canvasProvider.d.ts +0 -36
- package/dist/types/src/commandDispatcher.d.ts +0 -220
- package/dist/types/src/contextMenu.d.ts +0 -64
- package/dist/types/src/contextMenuProvider.d.ts +0 -25
- package/dist/types/src/data/cachedSequence.d.ts +0 -19
- package/dist/types/src/data/ucscApi.d.ts +0 -21
- package/dist/types/src/data/ucscSequence.d.ts +0 -19
- package/dist/types/src/dataLifecycle.d.ts +0 -16
- package/dist/types/src/dataSources/bigWigDataSource.d.ts +0 -24
- package/dist/types/src/dataSources/dataSourceCacheKey.d.ts +0 -9
- package/dist/types/src/dataSources/featureSourceFactory.d.ts +0 -46
- package/dist/types/src/dataSources/geneDataSource.d.ts +0 -16
- package/dist/types/src/dataSources/gtxDataSource.d.ts +0 -42
- package/dist/types/src/dataSources/sequenceDataSource.d.ts +0 -15
- package/dist/types/src/dataSources/textFeatureSource.d.ts +0 -63
- package/dist/types/src/decode/bed.d.ts +0 -64
- package/dist/types/src/decode/bedpe.d.ts +0 -36
- package/dist/types/src/decode/exonUtils.d.ts +0 -29
- package/dist/types/src/decode/gff.d.ts +0 -58
- package/dist/types/src/decode/interact.d.ts +0 -19
- package/dist/types/src/decode/ucsc.d.ts +0 -56
- package/dist/types/src/events.d.ts +0 -23
- package/dist/types/src/export/canvas2svg.d.ts +0 -166
- package/dist/types/src/export/index.d.ts +0 -2
- package/dist/types/src/featureCache.d.ts +0 -69
- package/dist/types/src/formats/featureParser.d.ts +0 -72
- package/dist/types/src/formats/formatDetection.d.ts +0 -46
- package/dist/types/src/genome/chromAlias.d.ts +0 -46
- package/dist/types/src/genome/chromSizes.d.ts +0 -53
- package/dist/types/src/genome/genome.d.ts +0 -51
- package/dist/types/src/genomeBrowser.d.ts +0 -189
- package/dist/types/src/gtx/fetchCoordinator.d.ts +0 -34
- package/dist/types/src/gtx/gtxReader.d.ts +0 -144
- package/dist/types/src/gtx/index.d.ts +0 -40
- package/dist/types/src/gtx/zstdWasm.d.ts +0 -22
- package/dist/types/src/headlessGenomeBrowser.d.ts +0 -450
- package/dist/types/src/index.d.ts +0 -123
- package/dist/types/src/intervalTree.d.ts +0 -56
- package/dist/types/src/io/binaryParser.d.ts +0 -25
- package/dist/types/src/io/index.d.ts +0 -7
- package/dist/types/src/io/rangeReader.d.ts +0 -48
- package/dist/types/src/locusUtils.d.ts +0 -37
- package/dist/types/src/pack.d.ts +0 -41
- package/dist/types/src/popupProvider.d.ts +0 -22
- package/dist/types/src/remoteProtocol.d.ts +0 -81
- package/dist/types/src/roi/index.d.ts +0 -3
- package/dist/types/src/roi/roiRenderer.d.ts +0 -24
- package/dist/types/src/roi/roiSet.d.ts +0 -41
- package/dist/types/src/sequence/sequenceUtils.d.ts +0 -44
- package/dist/types/src/session.d.ts +0 -55
- package/dist/types/src/stateProjection.d.ts +0 -115
- package/dist/types/src/tabix/index.d.ts +0 -48
- package/dist/types/src/themes/index.d.ts +0 -3
- package/dist/types/src/themes/renderTheme.d.ts +0 -86
- package/dist/types/src/themes/renderThemePresets.d.ts +0 -16
- package/dist/types/src/trackRegistry.d.ts +0 -81
- package/dist/types/src/trackSelector.d.ts +0 -31
- package/dist/types/src/tracks/annotation/annotationRenderer.d.ts +0 -17
- package/dist/types/src/tracks/annotation/annotationThemes.d.ts +0 -11
- package/dist/types/src/tracks/annotation/annotationTrackCanvas.d.ts +0 -58
- package/dist/types/src/tracks/annotation/index.d.ts +0 -4
- package/dist/types/src/tracks/axis/axisRenderer.d.ts +0 -19
- package/dist/types/src/tracks/axis/index.d.ts +0 -1
- package/dist/types/src/tracks/baseTrackCanvas.d.ts +0 -113
- package/dist/types/src/tracks/dynseq/dynseqRenderer.d.ts +0 -38
- package/dist/types/src/tracks/dynseq/index.d.ts +0 -1
- package/dist/types/src/tracks/index.d.ts +0 -7
- package/dist/types/src/tracks/interaction/index.d.ts +0 -4
- package/dist/types/src/tracks/interaction/interactionRenderer.d.ts +0 -52
- package/dist/types/src/tracks/interaction/interactionTrackCanvas.d.ts +0 -54
- package/dist/types/src/tracks/ruler/index.d.ts +0 -3
- package/dist/types/src/tracks/ruler/rulerRenderer.d.ts +0 -25
- package/dist/types/src/tracks/ruler/rulerTrackCanvas.d.ts +0 -43
- package/dist/types/src/tracks/sequence/index.d.ts +0 -5
- package/dist/types/src/tracks/sequence/sequenceRenderer.d.ts +0 -34
- package/dist/types/src/tracks/sequence/sequenceThemes.d.ts +0 -11
- package/dist/types/src/tracks/sequence/sequenceTrackCanvas.d.ts +0 -67
- package/dist/types/src/tracks/wig/index.d.ts +0 -5
- package/dist/types/src/tracks/wig/wigRenderer.d.ts +0 -15
- package/dist/types/src/tracks/wig/wigSummary.d.ts +0 -31
- package/dist/types/src/tracks/wig/wigThemes.d.ts +0 -15
- package/dist/types/src/tracks/wig/wigTrackCanvas.d.ts +0 -82
- package/dist/types/src/types.d.ts +0 -885
- package/dist/types/src/ui/components/LoomBrowserShell.d.ts +0 -52
- package/dist/types/src/ui/components/LoomChromosomeSelect.d.ts +0 -18
- package/dist/types/src/ui/components/LoomContextMenu.d.ts +0 -39
- package/dist/types/src/ui/components/LoomExportControls.d.ts +0 -13
- package/dist/types/src/ui/components/LoomInputDialog.d.ts +0 -27
- package/dist/types/src/ui/components/LoomLocusInput.d.ts +0 -18
- package/dist/types/src/ui/components/LoomNavbar.d.ts +0 -15
- package/dist/types/src/ui/components/LoomPopup.d.ts +0 -32
- package/dist/types/src/ui/components/LoomWindowSize.d.ts +0 -14
- package/dist/types/src/ui/components/LoomZoomControls.d.ts +0 -10
- package/dist/types/src/ui/index.d.ts +0 -21
- package/dist/types/src/ui/themes.d.ts +0 -14
- package/dist/types/src/worker/nodeWorkerProvider.d.ts +0 -28
- package/dist/types/src/worker/taskHandler.d.ts +0 -15
- package/dist/types/src/worker/webWorkerProvider.d.ts +0 -51
- package/dist/types/src/worker/workerScript.d.ts +0 -11
- package/dist/types/src/workerProvider.d.ts +0 -76
- package/dist/types/tabix/bgzBlockLoader.d.ts +0 -60
- package/dist/types/tabix/bgzf.d.ts +0 -43
- package/dist/types/tabix/tabixIndex.d.ts +0 -85
- package/dist/types/tabix/tabixReader.d.ts +0 -60
- package/dist/types/tabix/virtualOffset.d.ts +0 -41
- package/dist/types/test/src/mockCanvasProvider.d.ts +0 -67
- package/dist/types/test/src/testBedDecode.d.ts +0 -1
- package/dist/types/test/src/testCanvas2SVG.d.ts +0 -7
- package/dist/types/test/src/testChromAlias.d.ts +0 -1
- package/dist/types/test/src/testCommandDispatcher.d.ts +0 -1
- package/dist/types/test/src/testData.d.ts +0 -7
- package/dist/types/test/src/testDataLifecycle.d.ts +0 -1
- package/dist/types/test/src/testDataSourceCacheKey.d.ts +0 -1
- package/dist/types/test/src/testDataSources.d.ts +0 -5
- package/dist/types/test/src/testDecodeUcsc.d.ts +0 -1
- package/dist/types/test/src/testEvents.d.ts +0 -1
- package/dist/types/test/src/testFeatureCache.d.ts +0 -1
- package/dist/types/test/src/testFeatureParser.d.ts +0 -1
- package/dist/types/test/src/testFormatDetection.d.ts +0 -1
- package/dist/types/test/src/testGffDecode.d.ts +0 -1
- package/dist/types/test/src/testHeadlessBrowser.d.ts +0 -1
- package/dist/types/test/src/testInteractionDecoder.d.ts +0 -1
- package/dist/types/test/src/testIntervalTree.d.ts +0 -1
- package/dist/types/test/src/testLocusUtils.d.ts +0 -1
- package/dist/types/test/src/testPack.d.ts +0 -1
- package/dist/types/test/src/testROI.d.ts +0 -1
- package/dist/types/test/src/testRemoteProtocol.d.ts +0 -1
- package/dist/types/test/src/testRenderTheme.d.ts +0 -1
- package/dist/types/test/src/testSVGExport.d.ts +0 -5
- package/dist/types/test/src/testSequence.d.ts +0 -1
- package/dist/types/test/src/testSession.d.ts +0 -1
- package/dist/types/test/src/testTrackSelector.d.ts +0 -1
- package/dist/types/test/src/testTrackSerialize.d.ts +0 -1
- package/dist/types/test/src/testWigSummary.d.ts +0 -1
- package/dist/types/test/src/testWorkerDispatch.d.ts +0 -9
- package/dist/types/tracks/gene/geneRenderer.d.ts +0 -17
- package/dist/types/tracks/gene/geneThemes.d.ts +0 -11
- package/dist/types/tracks/gene/geneTrackCanvas.d.ts +0 -58
- package/dist/types/tracks/gene/index.d.ts +0 -4
- package/dist/types/ui/components/IgvBrowserShell.d.ts +0 -52
- package/dist/types/ui/components/IgvChromosomeSelect.d.ts +0 -18
- package/dist/types/ui/components/IgvExportControls.d.ts +0 -13
- package/dist/types/ui/components/IgvLocusInput.d.ts +0 -18
- package/dist/types/ui/components/IgvNavbar.d.ts +0 -15
- package/dist/types/ui/components/IgvWindowSize.d.ts +0 -14
- package/dist/types/ui/components/IgvZoomControls.d.ts +0 -10
- package/dist/types/wigRenderer.d.ts +0 -15
- package/dist/types/wigSummary.d.ts +0 -31
- package/dist/types/wigThemes.d.ts +0 -15
- package/dist/types/wigTrackCanvas.d.ts +0 -46
- package/dist/types/worker/decodeWig.d.ts +0 -20
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tabix file reader — top-level API for querying BGZF-compressed,
|
|
3
|
-
* tabix-indexed genomic files.
|
|
4
|
-
*
|
|
5
|
-
* Combines index loading, BGZF block fetching, and line extraction to
|
|
6
|
-
* return raw text lines for a genomic range. Format-specific parsing
|
|
7
|
-
* (BED→features, VCF→variants, GFF→annotations) is a separate concern
|
|
8
|
-
* (Infrastructure Gap #7).
|
|
9
|
-
*
|
|
10
|
-
* Port of js/feature/featureFileReader.ts (tabix path).
|
|
11
|
-
* Layer 1 (Data + Layout): pure data, no DOM.
|
|
12
|
-
*/
|
|
13
|
-
import type { TabixIndex, TabixHeader } from './tabixIndex';
|
|
14
|
-
import type { WorkerProvider } from '../workerProvider';
|
|
15
|
-
export interface TabixReaderOptions {
|
|
16
|
-
/** URL to the .tbi index file. Defaults to `url + '.tbi'`. */
|
|
17
|
-
indexUrl?: string;
|
|
18
|
-
/** Worker provider for offloading BGZF decompression. */
|
|
19
|
-
workerProvider?: WorkerProvider;
|
|
20
|
-
}
|
|
21
|
-
export declare class TabixReader {
|
|
22
|
-
private readonly url;
|
|
23
|
-
private readonly indexUrl;
|
|
24
|
-
private readonly blockLoader;
|
|
25
|
-
private readonly workerProvider?;
|
|
26
|
-
private _index;
|
|
27
|
-
constructor(url: string, options?: TabixReaderOptions);
|
|
28
|
-
/**
|
|
29
|
-
* Lazy-load and cache the tabix index.
|
|
30
|
-
* Fetches the entire .tbi file, decompresses (BGZF), and parses the binary index.
|
|
31
|
-
*/
|
|
32
|
-
getIndex(signal?: AbortSignal): Promise<TabixIndex>;
|
|
33
|
-
/** Get the tabix header metadata (format, column indices, meta char, skip count). */
|
|
34
|
-
getHeader(signal?: AbortSignal): Promise<TabixHeader>;
|
|
35
|
-
/** Get sequence names from the index. */
|
|
36
|
-
getSequenceNames(signal?: AbortSignal): Promise<string[]>;
|
|
37
|
-
/**
|
|
38
|
-
* Read header lines from the beginning of the BGZF data file.
|
|
39
|
-
*
|
|
40
|
-
* Returns lines that start with the meta character (e.g. '#' for VCF)
|
|
41
|
-
* or are within the skip count declared in the index header.
|
|
42
|
-
*/
|
|
43
|
-
readHeaderLines(signal?: AbortSignal): Promise<string[]>;
|
|
44
|
-
/**
|
|
45
|
-
* Read all text lines overlapping a genomic range.
|
|
46
|
-
*
|
|
47
|
-
* Returns raw tab-delimited lines (not parsed). The caller is responsible
|
|
48
|
-
* for format-specific parsing (BED, VCF, GFF, etc.).
|
|
49
|
-
*
|
|
50
|
-
* @param chr - Chromosome/sequence name (must match the name in the index)
|
|
51
|
-
* @param start - Start position (0-based)
|
|
52
|
-
* @param end - End position (exclusive)
|
|
53
|
-
*/
|
|
54
|
-
readLines(chr: string, start: number, end: number, signal?: AbortSignal): Promise<string[]>;
|
|
55
|
-
/**
|
|
56
|
-
* Parse a position value from a token array.
|
|
57
|
-
* BED format (format=0) is 0-based; VCF/GFF (format=2) and SAM (format=1) are 1-based.
|
|
58
|
-
*/
|
|
59
|
-
private parsePosition;
|
|
60
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BGZF virtual file offsets.
|
|
3
|
-
*
|
|
4
|
-
* A virtual offset is a 64-bit value encoding both the position of a
|
|
5
|
-
* compressed BGZF block in the file and the byte offset within the
|
|
6
|
-
* decompressed block. Used by tabix (.tbi) and BAI (.bai) indices.
|
|
7
|
-
*
|
|
8
|
-
* Port of js/binary.ts VPointer class, reimplemented as plain interfaces
|
|
9
|
-
* + pure functions (matching src/ conventions).
|
|
10
|
-
*/
|
|
11
|
-
import type { BinaryParser } from '../bigwig/binaryParser';
|
|
12
|
-
/** A BGZF virtual file offset: compressed block position + offset within decompressed block. */
|
|
13
|
-
export interface VirtualOffset {
|
|
14
|
-
/** Byte offset of the BGZF block start in the compressed file. */
|
|
15
|
-
block: number;
|
|
16
|
-
/** Byte offset within the decompressed block. */
|
|
17
|
-
offset: number;
|
|
18
|
-
}
|
|
19
|
-
/** A span of data in a BGZF file between two virtual offsets. */
|
|
20
|
-
export interface Chunk {
|
|
21
|
-
minv: VirtualOffset;
|
|
22
|
-
maxv: VirtualOffset;
|
|
23
|
-
}
|
|
24
|
-
export declare function createVirtualOffset(block: number, offset: number): VirtualOffset;
|
|
25
|
-
export declare function isGreaterThan(a: VirtualOffset, b: VirtualOffset): boolean;
|
|
26
|
-
export declare function isLessThan(a: VirtualOffset, b: VirtualOffset): boolean;
|
|
27
|
-
export declare function isEqualTo(a: VirtualOffset, b: VirtualOffset): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Read an 8-byte virtual offset from a BinaryParser.
|
|
30
|
-
*
|
|
31
|
-
* Byte layout (all little-endian):
|
|
32
|
-
* bytes 0–1: within-block offset (uint16 LE)
|
|
33
|
-
* bytes 2–6: compressed block file offset (5-byte uint, LE)
|
|
34
|
-
* byte 7: unused
|
|
35
|
-
*
|
|
36
|
-
* Uses multiplication (not bitwise ops) for the upper bytes to avoid
|
|
37
|
-
* JavaScript's 32-bit integer limit on bitwise operations.
|
|
38
|
-
*
|
|
39
|
-
* Port of js/binary.ts BinaryParser.getVPointer().
|
|
40
|
-
*/
|
|
41
|
-
export declare function readVirtualOffset(parser: BinaryParser): VirtualOffset;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mock CanvasProvider for headless tests — no DOM required.
|
|
3
|
-
*/
|
|
4
|
-
import type { CanvasProvider, CanvasAndContext } from '../../src/canvasProvider';
|
|
5
|
-
import type { Locus, Track, TrackSessionConfig } from '../../src/types';
|
|
6
|
-
import type { RenderTheme } from '../../src/themes/renderTheme';
|
|
7
|
-
export interface MockCanvasOptions {
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
}
|
|
11
|
-
/** Create a mock HTMLCanvasElement-like object. */
|
|
12
|
-
export declare function createMockCanvas(options?: MockCanvasOptions): HTMLCanvasElement;
|
|
13
|
-
export declare class MockCanvasProvider implements CanvasProvider {
|
|
14
|
-
readonly devicePixelRatio = 1;
|
|
15
|
-
createCanvas(width: number, height: number): CanvasAndContext;
|
|
16
|
-
}
|
|
17
|
-
export declare const mockCanvasProvider: MockCanvasProvider;
|
|
18
|
-
export interface MockTrackOptions {
|
|
19
|
-
type?: string;
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Minimal Track implementation for browser tests.
|
|
25
|
-
* Records calls for assertion.
|
|
26
|
-
*/
|
|
27
|
-
export declare class MockTrack implements Track {
|
|
28
|
-
readonly type: string;
|
|
29
|
-
readonly canvas: HTMLCanvasElement;
|
|
30
|
-
private _locus;
|
|
31
|
-
private _height;
|
|
32
|
-
setLocusCalls: Locus[];
|
|
33
|
-
renderCalls: number;
|
|
34
|
-
features: unknown[] | null;
|
|
35
|
-
get locus(): Locus;
|
|
36
|
-
get height(): number;
|
|
37
|
-
constructor(options?: MockTrackOptions);
|
|
38
|
-
setLocus(locus: Locus): void;
|
|
39
|
-
render(): void;
|
|
40
|
-
attachTo(_container: HTMLElement): void;
|
|
41
|
-
detach(): void;
|
|
42
|
-
setFeatures(features: unknown[]): void;
|
|
43
|
-
suspendRendering(): void;
|
|
44
|
-
resumeRendering(): void;
|
|
45
|
-
setError(_error: Error | null): void;
|
|
46
|
-
hitTest(_x: number, _y: number): never[];
|
|
47
|
-
renderToContext(_ctx: CanvasRenderingContext2D, _width: number, _height: number): void;
|
|
48
|
-
serializeConfig(_theme: RenderTheme): TrackSessionConfig;
|
|
49
|
-
}
|
|
50
|
-
export interface MockDataSourceOptions<F = unknown> {
|
|
51
|
-
features?: F[];
|
|
52
|
-
/** If set, fetch will reject with this error. */
|
|
53
|
-
error?: Error;
|
|
54
|
-
/** Delay in ms before resolving. */
|
|
55
|
-
delay?: number;
|
|
56
|
-
}
|
|
57
|
-
export declare class MockDataSource<F = unknown> {
|
|
58
|
-
private features;
|
|
59
|
-
private error;
|
|
60
|
-
private delay;
|
|
61
|
-
fetchCalls: Array<{
|
|
62
|
-
locus: Locus;
|
|
63
|
-
bpPerPixel: number;
|
|
64
|
-
}>;
|
|
65
|
-
constructor(options?: MockDataSourceOptions<F>);
|
|
66
|
-
fetch(locus: Locus, bpPerPixel: number, signal?: AbortSignal): Promise<F[]>;
|
|
67
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for worker task dispatch wiring.
|
|
3
|
-
*
|
|
4
|
-
* Verifies that:
|
|
5
|
-
* 1. MainThreadProvider correctly handles all task types (including new ones)
|
|
6
|
-
* 2. WorkerProvider is threaded through data sources and track canvases
|
|
7
|
-
* 3. Tasks are dispatched (not just executed synchronously) when workerProvider is set
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standalone gene feature renderer.
|
|
3
|
-
*
|
|
4
|
-
* Adapted from js/feature/render/renderFeature.ts but with no `this` context —
|
|
5
|
-
* all configuration is passed as explicit parameters.
|
|
6
|
-
*
|
|
7
|
-
* Scope: exon/UTR/CDS rendering, intron lines, strand arrows, labels.
|
|
8
|
-
* Deferred: amino acid rendering, QTL selection highlighting.
|
|
9
|
-
*/
|
|
10
|
-
import type { GeneFeature, GeneRenderConfig, RenderContext } from '../../types';
|
|
11
|
-
/**
|
|
12
|
-
* Render a set of gene features onto a canvas context.
|
|
13
|
-
*
|
|
14
|
-
* Features should already have `.row` assigned (via `pack()`).
|
|
15
|
-
* The canvas should be sized and cleared before calling this.
|
|
16
|
-
*/
|
|
17
|
-
export declare function renderGeneTrack(ctx: CanvasRenderingContext2D, features: GeneFeature[], config: GeneRenderConfig, rc: RenderContext): void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preset render themes for gene tracks.
|
|
3
|
-
*
|
|
4
|
-
* Each theme is a Partial<GeneRenderConfig> that can be spread over defaults.
|
|
5
|
-
* Usage: { ...defaultGeneRenderConfig(), ...modernTheme }
|
|
6
|
-
*/
|
|
7
|
-
import type { GeneRenderConfig } from '../../types';
|
|
8
|
-
/** Modern theme — softer colors, rounded exons, strand-based coloring. */
|
|
9
|
-
export declare const modernTheme: Partial<GeneRenderConfig>;
|
|
10
|
-
/** Dark theme — modern theme adapted for dark backgrounds. */
|
|
11
|
-
export declare const darkTheme: Partial<GeneRenderConfig>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas manager for rendering gene features.
|
|
3
|
-
*
|
|
4
|
-
* Extends BaseTrackCanvas — canvas lifecycle (DPR, resize, attach/detach,
|
|
5
|
-
* background) is handled by the base class. This class only implements
|
|
6
|
-
* gene-specific logic: feature packing, height computation, and rendering.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* const canvas = document.createElement('canvas')
|
|
10
|
-
* const track = new GeneTrackCanvas(canvas, { locus, features })
|
|
11
|
-
* track.attachTo(containerDiv)
|
|
12
|
-
*/
|
|
13
|
-
import type { GeneFeature, GeneRenderConfig, Locus, RenderContext, GeneTrackSessionConfig, HitTestResult, AxisInfo, ContextMenuItem } from '../../types';
|
|
14
|
-
import type { CanvasProvider } from '../../canvasProvider';
|
|
15
|
-
import type { WorkerProvider } from '../../workerProvider';
|
|
16
|
-
import type { RenderTheme } from '../../themes/renderTheme';
|
|
17
|
-
import { BaseTrackCanvas } from '../baseTrackCanvas';
|
|
18
|
-
export type { Locus } from '../../types';
|
|
19
|
-
export interface GeneTrackCanvasOptions {
|
|
20
|
-
locus: Locus;
|
|
21
|
-
features: GeneFeature[];
|
|
22
|
-
/** Per-track config overrides. Applied after theme-derived defaults. */
|
|
23
|
-
config?: Partial<GeneRenderConfig>;
|
|
24
|
-
/** Unified render theme. Palette drives default colors/fonts. */
|
|
25
|
-
theme?: Partial<RenderTheme>;
|
|
26
|
-
/** Fixed pixel height. If not set, computed from row count. */
|
|
27
|
-
height?: number;
|
|
28
|
-
/** Background color. Default: palette.background. */
|
|
29
|
-
background?: string;
|
|
30
|
-
/** Canvas provider for environment abstraction. Default: DOMCanvasProvider. */
|
|
31
|
-
canvasProvider?: CanvasProvider;
|
|
32
|
-
/** Worker provider for offloading CPU-intensive tasks (packing). */
|
|
33
|
-
workerProvider?: WorkerProvider;
|
|
34
|
-
/** Track name for axis label. */
|
|
35
|
-
name?: string;
|
|
36
|
-
}
|
|
37
|
-
export declare class GeneTrackCanvas extends BaseTrackCanvas<GeneRenderConfig> {
|
|
38
|
-
private features;
|
|
39
|
-
private fixedHeight;
|
|
40
|
-
private background;
|
|
41
|
-
private _name;
|
|
42
|
-
private workerProvider?;
|
|
43
|
-
/** Most recently packed features, available after render(). */
|
|
44
|
-
private packedFeatures;
|
|
45
|
-
/** Whether packedFeatures was pre-computed by async worker (skip sync pack in computeHeight). */
|
|
46
|
-
private packedReady;
|
|
47
|
-
readonly type = "gene";
|
|
48
|
-
constructor(canvas: HTMLCanvasElement, options: GeneTrackCanvasOptions);
|
|
49
|
-
/** Update features and re-render. Dispatches async pack when workerProvider is set. */
|
|
50
|
-
setFeatures(features: GeneFeature[]): void;
|
|
51
|
-
protected computeHeight(_width: number): number;
|
|
52
|
-
protected getBackground(): string;
|
|
53
|
-
protected doRender(ctx: CanvasRenderingContext2D, _width: number, _height: number, rc: RenderContext): void;
|
|
54
|
-
getAxisInfo(): AxisInfo | undefined;
|
|
55
|
-
getContextMenuItems(_x: number, _y: number): ContextMenuItem[];
|
|
56
|
-
hitTest(x: number, y: number): HitTestResult<GeneFeature>[];
|
|
57
|
-
serializeConfig(theme: RenderTheme): GeneTrackSessionConfig;
|
|
58
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-browser> — Top-level shell combining navbar + GenomeBrowser.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* const shell = document.createElement('igv-browser')
|
|
6
|
-
* shell.setAttribute('theme', 'modern')
|
|
7
|
-
* container.appendChild(shell)
|
|
8
|
-
* shell.initialize({ locus: { chr: 'chr17', start: 7668000, end: 7688000 } })
|
|
9
|
-
* shell.addTrack(rulerTrack)
|
|
10
|
-
* shell.addTrack(geneTrack)
|
|
11
|
-
*
|
|
12
|
-
* Or use the createShell() helper:
|
|
13
|
-
* const shell = createShell(container, { locus, theme: 'modern' })
|
|
14
|
-
*/
|
|
15
|
-
import { GenomeBrowser } from '../../genomeBrowser';
|
|
16
|
-
import type { GenomeBrowserOptions, BrowserEvents } from '../../genomeBrowser';
|
|
17
|
-
import type { Locus, Track } from '../../types';
|
|
18
|
-
import type { ShellTheme } from '../themes';
|
|
19
|
-
export declare class IgvBrowserShell extends HTMLElement {
|
|
20
|
-
private navbar;
|
|
21
|
-
private trackContainer;
|
|
22
|
-
private themeStyle;
|
|
23
|
-
private _browser;
|
|
24
|
-
static get observedAttributes(): string[];
|
|
25
|
-
constructor();
|
|
26
|
-
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
27
|
-
private applyTheme;
|
|
28
|
-
connectedCallback(): void;
|
|
29
|
-
/** Initialize the GenomeBrowser inside this shell. */
|
|
30
|
-
initialize(options: GenomeBrowserOptions): GenomeBrowser;
|
|
31
|
-
/** Get the underlying GenomeBrowser instance. */
|
|
32
|
-
get browser(): GenomeBrowser | null;
|
|
33
|
-
/** Proxy: add a track to the browser. */
|
|
34
|
-
addTrack(track: Track): void;
|
|
35
|
-
/** Proxy: remove a track from the browser. */
|
|
36
|
-
removeTrack(track: Track): void;
|
|
37
|
-
/** Proxy: set the locus. */
|
|
38
|
-
setLocus(locus: Locus): void;
|
|
39
|
-
/** Proxy: subscribe to browser events. */
|
|
40
|
-
on<K extends keyof BrowserEvents>(event: K, handler: (data: BrowserEvents[K]) => void): (() => void) | undefined;
|
|
41
|
-
disconnectedCallback(): void;
|
|
42
|
-
}
|
|
43
|
-
/** Options for createShell(). */
|
|
44
|
-
export interface CreateShellOptions extends GenomeBrowserOptions {
|
|
45
|
-
/** UI shell theme (CSS chrome). Separate from GenomeBrowserOptions.theme (render palette). */
|
|
46
|
-
shellTheme?: ShellTheme;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Convenience function to create an <igv-browser> shell and initialize it.
|
|
50
|
-
* Returns the shell element (with .browser for the underlying GenomeBrowser).
|
|
51
|
-
*/
|
|
52
|
-
export declare function createShell(container: HTMLElement, options: CreateShellOptions): IgvBrowserShell;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-chromosome-select> — Chromosome dropdown for quick navigation.
|
|
3
|
-
*
|
|
4
|
-
* Lists main chromosomes (chr1-22, X, Y, M) plus "All" for whole genome view.
|
|
5
|
-
* Updates automatically when the browser locus changes.
|
|
6
|
-
*/
|
|
7
|
-
import type { GenomeBrowser } from '../../genomeBrowser';
|
|
8
|
-
export declare class IgvChromosomeSelect extends HTMLElement {
|
|
9
|
-
private select;
|
|
10
|
-
private unsubscribe;
|
|
11
|
-
private _browser;
|
|
12
|
-
constructor();
|
|
13
|
-
set browser(b: GenomeBrowser | null);
|
|
14
|
-
get browser(): GenomeBrowser | null;
|
|
15
|
-
private populate;
|
|
16
|
-
private updateSelection;
|
|
17
|
-
disconnectedCallback(): void;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-export-controls> — SVG/PNG export buttons.
|
|
3
|
-
*
|
|
4
|
-
* Adds "Save SVG" and "Save PNG" buttons to the shell navbar.
|
|
5
|
-
* Calls GenomeBrowser.saveSVGtoFile() and savePNGtoFile() respectively.
|
|
6
|
-
*/
|
|
7
|
-
import type { GenomeBrowser } from '../../genomeBrowser';
|
|
8
|
-
export declare class IgvExportControls extends HTMLElement {
|
|
9
|
-
private _browser;
|
|
10
|
-
constructor();
|
|
11
|
-
set browser(b: GenomeBrowser | null);
|
|
12
|
-
get browser(): GenomeBrowser | null;
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-locus-input> — Locus search/display input.
|
|
3
|
-
*
|
|
4
|
-
* Shows the current locus as a formatted string. User can type a new locus
|
|
5
|
-
* and press Enter to navigate. Updates automatically on locuschange events.
|
|
6
|
-
*/
|
|
7
|
-
import type { GenomeBrowser } from '../../genomeBrowser';
|
|
8
|
-
export declare class IgvLocusInput extends HTMLElement {
|
|
9
|
-
private input;
|
|
10
|
-
private unsubscribe;
|
|
11
|
-
private _browser;
|
|
12
|
-
constructor();
|
|
13
|
-
set browser(b: GenomeBrowser | null);
|
|
14
|
-
get browser(): GenomeBrowser | null;
|
|
15
|
-
private updateDisplay;
|
|
16
|
-
private doSearch;
|
|
17
|
-
disconnectedCallback(): void;
|
|
18
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-navbar> — Horizontal navigation bar composing locus input, window size, and zoom controls.
|
|
3
|
-
*/
|
|
4
|
-
import type { GenomeBrowser } from '../../genomeBrowser';
|
|
5
|
-
export declare class IgvNavbar extends HTMLElement {
|
|
6
|
-
private chromSelect;
|
|
7
|
-
private locusInput;
|
|
8
|
-
private zoomControls;
|
|
9
|
-
private windowSize;
|
|
10
|
-
private exportControls;
|
|
11
|
-
private _browser;
|
|
12
|
-
constructor();
|
|
13
|
-
set browser(b: GenomeBrowser | null);
|
|
14
|
-
get browser(): GenomeBrowser | null;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-window-size> — Read-only display of current viewport bp range.
|
|
3
|
-
*/
|
|
4
|
-
import type { GenomeBrowser } from '../../genomeBrowser';
|
|
5
|
-
export declare class IgvWindowSize extends HTMLElement {
|
|
6
|
-
private label;
|
|
7
|
-
private unsubscribe;
|
|
8
|
-
private _browser;
|
|
9
|
-
constructor();
|
|
10
|
-
set browser(b: GenomeBrowser | null);
|
|
11
|
-
get browser(): GenomeBrowser | null;
|
|
12
|
-
private update;
|
|
13
|
-
disconnectedCallback(): void;
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* <igv-zoom-controls> — Zoom in/out buttons.
|
|
3
|
-
*/
|
|
4
|
-
import type { GenomeBrowser } from '../../genomeBrowser';
|
|
5
|
-
export declare class IgvZoomControls extends HTMLElement {
|
|
6
|
-
private _browser;
|
|
7
|
-
constructor();
|
|
8
|
-
set browser(b: GenomeBrowser | null);
|
|
9
|
-
get browser(): GenomeBrowser | null;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standalone wig track renderer.
|
|
3
|
-
*
|
|
4
|
-
* Adapted from js/feature/wigTrack.ts draw() method with no `this` context —
|
|
5
|
-
* all configuration is passed as explicit parameters.
|
|
6
|
-
*
|
|
7
|
-
* Supports four graph types: bar, line, points, and dynseq.
|
|
8
|
-
*/
|
|
9
|
-
import type { WigFeature, WigRenderConfig, RenderContext } from './types';
|
|
10
|
-
/**
|
|
11
|
-
* Render wig features onto a canvas context.
|
|
12
|
-
*
|
|
13
|
-
* The canvas should be sized and cleared before calling this.
|
|
14
|
-
*/
|
|
15
|
-
export declare function renderWigTrack(ctx: CanvasRenderingContext2D, features: WigFeature[], config: WigRenderConfig, rc: RenderContext): void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolution-aware data summarization for wig tracks.
|
|
3
|
-
*
|
|
4
|
-
* When zoomed out, many data points map to the same pixel. This module bins
|
|
5
|
-
* features and applies a window function (mean, min, max) to produce one
|
|
6
|
-
* summary value per pixel-width bin.
|
|
7
|
-
*
|
|
8
|
-
* Ported from js/feature/wigSummary.ts with strict types, no `any`.
|
|
9
|
-
*/
|
|
10
|
-
import type { WigFeature, WindowFunction } from './types';
|
|
11
|
-
/**
|
|
12
|
-
* Summarize wig features by binning into pixel-width windows and applying
|
|
13
|
-
* a window function.
|
|
14
|
-
*
|
|
15
|
-
* Features must be sorted by position. Wig features cannot overlap.
|
|
16
|
-
*
|
|
17
|
-
* @param features - sorted array of wig features
|
|
18
|
-
* @param startBP - start position in base pairs (left edge of viewport)
|
|
19
|
-
* @param bpPerPixel - base pairs per pixel (bin size)
|
|
20
|
-
* @param windowFunction - aggregation function: mean, min, max, or none
|
|
21
|
-
* @returns summarized features (one per pixel-bin)
|
|
22
|
-
*/
|
|
23
|
-
export declare function summarizeWigData(features: WigFeature[], startBP: number, bpPerPixel: number, windowFunction?: WindowFunction): WigFeature[];
|
|
24
|
-
/**
|
|
25
|
-
* Compute the min/max data range from a set of wig features.
|
|
26
|
-
* Useful for autoscaling.
|
|
27
|
-
*/
|
|
28
|
-
export declare function computeWigDataRange(features: WigFeature[]): {
|
|
29
|
-
min: number;
|
|
30
|
-
max: number;
|
|
31
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preset render themes for wig tracks.
|
|
3
|
-
*
|
|
4
|
-
* Each theme is a Partial<WigRenderConfig> that can be spread over defaults.
|
|
5
|
-
* Usage: { ...defaultWigRenderConfig(), ...modernWigTheme }
|
|
6
|
-
*/
|
|
7
|
-
import type { WigRenderConfig } from './types';
|
|
8
|
-
/** Modern theme — blue bars with subtle styling. */
|
|
9
|
-
export declare const modernWigTheme: Partial<WigRenderConfig>;
|
|
10
|
-
/** Dark theme — bright teal on dark background. */
|
|
11
|
-
export declare const darkWigTheme: Partial<WigRenderConfig>;
|
|
12
|
-
/** Warm red theme — for coverage or signal intensity. */
|
|
13
|
-
export declare const warmWigTheme: Partial<WigRenderConfig>;
|
|
14
|
-
/** Line graph variant — modern blue line. */
|
|
15
|
-
export declare const lineWigTheme: Partial<WigRenderConfig>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas manager for rendering wig (wiggle) tracks.
|
|
3
|
-
*
|
|
4
|
-
* Extends BaseTrackCanvas — canvas lifecycle is handled by the base class.
|
|
5
|
-
* This class implements wig-specific logic: data summarization, autoscale,
|
|
6
|
-
* and dynseq-aware rendering.
|
|
7
|
-
*
|
|
8
|
-
* For dynseq mode, features should arrive with `.sequence` already attached
|
|
9
|
-
* (e.g. via DynseqDataSource). This matches the igv.js pattern where sequence
|
|
10
|
-
* is fetched during getFeatures(), not during rendering.
|
|
11
|
-
*
|
|
12
|
-
* Usage:
|
|
13
|
-
* const canvas = document.createElement('canvas')
|
|
14
|
-
* const track = new WigTrackCanvas(canvas, { locus, features })
|
|
15
|
-
* track.attachTo(containerDiv)
|
|
16
|
-
*/
|
|
17
|
-
import type { WigFeature, WigRenderConfig, Locus, RenderContext, WigTrackSessionConfig } from './types';
|
|
18
|
-
import type { CanvasProvider } from './canvasProvider';
|
|
19
|
-
import type { RenderTheme } from './renderTheme';
|
|
20
|
-
import { BaseTrackCanvas } from './baseTrackCanvas';
|
|
21
|
-
export interface WigTrackCanvasOptions {
|
|
22
|
-
locus: Locus;
|
|
23
|
-
features: WigFeature[];
|
|
24
|
-
/** Per-track config overrides. Applied after theme-derived defaults. */
|
|
25
|
-
config?: Partial<WigRenderConfig>;
|
|
26
|
-
/** Unified render theme. Palette drives default colors/fonts. */
|
|
27
|
-
theme?: Partial<RenderTheme>;
|
|
28
|
-
/** Fixed pixel height. If not set, uses config.height (default 50). */
|
|
29
|
-
height?: number;
|
|
30
|
-
/** Background color. Overrides palette.background if set. */
|
|
31
|
-
background?: string;
|
|
32
|
-
/** Canvas provider for environment abstraction. Default: DOMCanvasProvider. */
|
|
33
|
-
canvasProvider?: CanvasProvider;
|
|
34
|
-
}
|
|
35
|
-
export declare class WigTrackCanvas extends BaseTrackCanvas<WigRenderConfig> {
|
|
36
|
-
private features;
|
|
37
|
-
private fixedHeight;
|
|
38
|
-
readonly type = "wig";
|
|
39
|
-
constructor(canvas: HTMLCanvasElement, options: WigTrackCanvasOptions);
|
|
40
|
-
/** Update features and re-render. Recomputes autoscale if enabled. */
|
|
41
|
-
setFeatures(features: WigFeature[]): void;
|
|
42
|
-
protected computeHeight(_width: number): number;
|
|
43
|
-
protected getBackground(): string;
|
|
44
|
-
protected doRender(ctx: CanvasRenderingContext2D, _width: number, height: number, rc: RenderContext): void;
|
|
45
|
-
serializeConfig(theme: RenderTheme): WigTrackSessionConfig;
|
|
46
|
-
}
|