From d359455802e2143d88ee6aadc1a32f1543cd964e Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Mon, 2 Sep 2024 03:51:51 -0500 Subject: [PATCH] browser global ROI API Signed-off-by: eternal-flame-AD --- js/igv.d.ts | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/js/igv.d.ts b/js/igv.d.ts index cfc5412fc..f527b25c2 100644 --- a/js/igv.d.ts +++ b/js/igv.d.ts @@ -582,6 +582,15 @@ interface ReferenceFrag { } interface CreateOptExtras { + /** + * + * An igv.js instance can be initialized on page load with query parameters. + * + * @type {boolean=} + * + */ + supportQueryParameters?: boolean; + /** * * Initial genomic location(s). Either a string or an array of strings. If an array a viewport is created for each location. @@ -597,6 +606,15 @@ interface CreateOptExtras { */ nucleotideColors?: Partial>; + /** + * + * A Region of Interest (ROI) is a specified genomic extent that can be configured to highlight a region + * + * @type {DefineROI[]} + * + */ + roi: DefineROI[]; + /** * * Array of configuration objects defining tracks initially displayed when app launches. @@ -639,12 +657,18 @@ declare class ROISet { isvisible: boolean; } -interface DefineROI { - url: string; +type DefineROI = { name: string; - format: string; color: string; -} +} & ({ + url: string; + indexed?: boolean; + format?: string; +} | { + chr: string; + start: number; + end: number; +}); declare class _Browser {