higlass
Version:
HiGlass Hi-C / genomic / large data viewer
185 lines (184 loc) • 7.14 kB
TypeScript
export default HeatmapTiledPixiTrack;
declare class HeatmapTiledPixiTrack extends TiledPixiTrack<any> {
constructor(context: any, options: any);
pubSub: any;
is2d: boolean;
animate: any;
uid: string;
scaleBrush: import("d3-brush").BrushBehavior<any>;
onTrackOptionsChanged: any;
isShowGlobalMousePosition: any;
isValueScaleLocked: any;
pColorbarArea: import("pixi.js").Graphics;
pColorbar: import("pixi.js").Graphics;
axis: AxisPixi;
colorScale: number[][];
gBase: import("d3-selection").Selection<SVGGElement, any, null, undefined>;
gMain: import("d3-selection").Selection<SVGGElement, any, null, undefined>;
gColorscaleBrush: import("d3-selection").Selection<SVGGElement, any, null, undefined>;
brushing: boolean;
prevIndUpperLeftTile: string;
onMouseMoveZoom: any;
dataLens: Float32Array<ArrayBuffer>;
mouseMoveHandlerBound: (e: Object) => void;
hideMousePosition: Function | undefined;
/**
* Mouse move handler
*
* @param {Object} e Event object.
*/
mouseMoveHandler(e: Object): void;
mouseX: any;
mouseY: any;
/**
* Mouse move and zoom handler. Is triggered on both events.
*
* @param {Number} absX Absolute X coordinate.
* @param {Number} absY Absolute Y coordinate
*/
mouseMoveZoomHandler(absX?: number, absY?: number): void;
scheduleRerender(): void;
handleRerender(): void;
/**
* Get absolute (i.e., display) tile dimension and position.
*
* @param {Number} zoomLevel Current zoom level.
* @param {Array} tilePos Tile position.
* @return {Object} Object holding the absolute x, y, width, and height.
*/
getAbsTileDim(zoomLevel: number, tilePos: any[], mirrored: any): Object;
updateValueScale(): (string | import("d3-scale").ScaleLinear<number, number, never>)[];
valueScale: import("d3-scale").ScaleLinear<number, number, never> | import("d3-scale").ScaleLogarithmic<number, number, never> | undefined;
limitedValueScale: import("d3-scale").ScaleLinear<number, number, never> | undefined;
rerender(options: any, force: any): void;
tileDataToCanvas(pixData: any): HTMLCanvasElement;
exportData(): void;
/**
* Position sprite (the rendered tile)
*
* @param {Object} sprite PIXI sprite object.
* @param {Number} zoomLevel Current zoom level.
* @param {Array} tilePos X,Y position of tile.
* @param {Boolean} mirrored If `true` tile is mirrored.
*/
setSpriteProperties(sprite: Object, zoomLevel: number, tilePos: any[], mirrored: boolean): void;
refXScale(_: any): void;
refYScale(_: any): void;
newBrushOptions(selection: any): any;
brushStart(): void;
brushMoved(event: any): void;
brushEnd(): void;
setPosition(newPosition: any): void;
setDimensions(newDimensions: any): void;
removeColorbar(): void;
drawColorbar(): void;
colorbarHeight: number | undefined;
northHandle: import("d3-selection").Selection<SVGRectElement, {
type: string;
}, SVGGElement, any> | undefined;
exportColorBarSVG(): HTMLElement;
/**
* Set data lens size
*
* @param {Integer} newDataLensSize New data lens size. Needs to be an odd
* integer.
*/
setDataLensSize(newDataLensSize: Integer): void;
dataLensPadding: number | undefined;
dataLensSize: number | undefined;
binsPerTile(): any;
/**
* Get the data in the visible rectangle
*
* The parameter coordinates are in pixel coordinates
*
* @param {int} x: The upper left corner of the rectangle in pixel coordinates
* @param {int} y: The upper left corner of the rectangle in pixel coordinates
* @param {int} width: The width of the rectangle (pixels)
* @param {int} height: The height of the rectangle (pixels)
*
* @returns {Array} A numjs array containing the data in the visible region
*
*/
getVisibleRectangleData(x: int, y: int, width: int, height: int): any[];
/**
* Convert the raw tile data to a rendered array of values which can be represented as a sprite.
*
* @param tile: The data structure containing all the tile information. Relevant to
* this function are tile.tileData = \{'dense': [...], ...\}
* and tile.graphics
*/
initTile(tile: any): void;
updateTile(tile: any): void;
destroyTile(tile: any): void;
pixDataFunction(tile: any, pixData: any): void;
/**
* Render / draw a tile.
*
* @param {Object} tile Tile data to be rendered.
*/
renderTile(tile: Object): void;
refScalesChanged(refXScale: any, refYScale: any): void;
/**
* Bypass this track's exportSVG function
*/
superSVG(): [HTMLElement, HTMLElement];
exportSVG(): HTMLElement[];
getVisiblePartOfUppLeftTile(): (string | number)[] | null;
getIndicesOfVisibleDataInTile(tile: any): number[];
zoomed(newXScale: any, newYScale: any, k: any, tx: any, ty: any): void;
/**
* Helper method for adding a tile ID in place. Used by `tilesToId()`.
*
* @param {Array} tiles Array tile ID should be added to.
* @param {Integer} zoomLevel Zoom level.
* @param {Integer} row Column ID, i.e., y.
* @param {Integer} column Column ID, i.e., x.
* @param {Objwect} dataTransform ??
* @param {Boolean} mirrored If `true` tile is mirrored.
*/
addTileId(tiles: any[], zoomLevel: Integer, row: Integer, column: Integer, dataTransform: Objwect, mirrored?: boolean): void;
/**
* Convert tile positions to tile IDs
*
* @param {Array} xTiles X positions of tiles
* @param {Array} yTiles Y positions of tiles
* @param {Array} zoomLevel Current zoom level
* @return {Array} List of tile IDs
*/
tilesToId(xTiles: any[], yTiles: any[], zoomLevel: any[]): any[];
calculateVisibleTiles(): void;
zoomLevel: number | undefined;
xTiles: number[] | undefined;
yTiles: number[] | undefined;
mirrorTiles(): boolean;
contextMenuItems(trackX: any, trackY: any): never[];
getMouseOverHtml(trackX: any, trackY: any): string;
/**
* Get the tile's position in its coordinate system.
*
* @description
* Normally the absolute coordinate system are the genome basepair positions
*/
getTilePosAndDimensions(zoomLevel: any, tilePos: any, binsPerTileIn: any): {
tileX: number;
tileY: number;
tileWidth: number;
tileHeight: number;
};
/**
* The local tile identifier
*
* @param {array} tile Tile definition array to be converted to id. Tile
* array must contain `[zoomLevel, xPos, yPos]` and two props `mirrored` and
* `dataTransform`.
*/
tileToLocalId(tile: array): string;
/**
* The tile identifier used on the server
*/
tileToRemoteId(tile: any): string;
localToRemoteId(remoteId: any): any;
}
import TiledPixiTrack from './TiledPixiTrack';
import AxisPixi from './AxisPixi';