import { Domain } from '../../../utils/types'; import { TranscriptList, Transcript, Exon, RenderedTranscript, GenomicElement } from './types'; /** * Unpacks transcripts from a list of genes into a flat list of transcripts falling within the * viewing window, then sorts them by starting coordinate. * @param genes the list of genes, each with a list of transcripts and a strand. * @param domain the current genomic range being viewed; transcripts outside this range are filtered. */ export declare function sortedTranscripts(genes: TranscriptList[], domain: Domain): Transcript[]; export declare function mergeUTRs(utrs: GenomicElement[]): GenomicElement[]; export declare function mergeTranscripts(gene: TranscriptList): Transcript; /** * Converts transcript, exon, and UTR coordinates to SVG space, filtering exons which do not overlap the viewing window. * @param transcript the transcript for which to convert coordinates. * @param x linear transform function mapping genomic space to SVG space. * @param domain the genomic region currently being displayed; exons outside this region will be filtered. */ export declare function convertTranscriptCoordinates(transcript: Transcript, x: (x: number) => number, domain: Domain): Transcript; /** * Renders introns for a single transcript as an SVG path. Arrows are drawn every 20 pixels with a center line connecting them. * @prop start the start coordinate of the transcript, relative to the SVG. * @prop end the end coordinate of the transcript, relative to the SVG. * @prop strand the strand of the transcript; should be either '+' or '-'. * @prop y the y coordinate of the center points of the arrows, relative to the SVG. * @prop h half the height of the arrows, in units relative to the SVG. * @prop w the width of the track; prevents arrows from being drawn off the screen. */ export declare function intronPath(start: number, end: number, strand: string, y: number, h: number, w: number): string; /** * Renders a single exon and its UTRs as an SVG path. All exon and UTR coordinates passed * into this function must be relative to the SVG, not the reference sequence. * @prop exon the exon to render, containing start and end fields and a list of UTRs. * @prop y the y coordinate of the center of the exon, relative to the SVG. * @prop h half the height of the row, relative to the SVG; exons are 0.6h high and UTRs are 0.4h high. * @prop w the width of the track; if the exon is past the track width, this function returns an empty string. */ export declare function exonPath(exon: Exon, y: number, h: number, w: number): string; export declare function renderTranscript(uTranscript: Transcript, x: (value: number) => number, domain: Domain, rowHeight: number, width: number): RenderedTranscript;