Skip to content
helgathorv edited this page Apr 21, 2016 · 8 revisions

##Browser Control API##

After initialization, the browser can be controlled through the object "igv.browser" using the commands described below.

The igv.browser api (preface commands with igv.browser.)
loadTrack(config)
search(locusOrGene)
zoomIn()
zoomOut()

####loadTrack####

Load and configure a track. See the Tracks page for more detail on configuration options.

igv.browser.loadTrack({
  url: 'http://data.broadinstitute.org/igvdata/1KG/b37/data/HG02450/alignment/HG02450.mapped.ILLUMINA.bwa.ACB.low_coverage.20120522.bam',
  label: 'HG02450'
}

####search####

Search by gene symbol

igv.browser.search('EGFR')

Go to explicit location

igv.browser.search('chr10:1000-2000')

####zoom####

Zoom in by a factor of 2

igv.browser.zoomIn()

Zoom out by a factor of 2

igv.browser.zoomOut()

Clone this wiki locally