Skip to contents

An embeddable interactive genome browser powered by igv.js. Unlike the other plotomics components this one is config-driven: igv.js streams and tiles remote indexed files (BAM/CRAM, bigWig, VCF, BED, ...) itself, so data flows through the browser configuration as URLs rather than as columns.

Usage

igv(
  genome = "hg38",
  locus = NULL,
  tracks = list(),
  config = NULL,
  width = NULL,
  height = NULL,
  element_id = NULL
)

Arguments

genome

Genome identifier understood by igv.js (e.g. "hg38", "hg19", "mm10"). Used when config is NULL.

locus

Optional initial locus string, e.g. "chr8:127,736,588-127,739,371", or a gene symbol.

tracks

A list of igv.js track configurations (each a named list with at least a url). Used when config is NULL.

config

Optional full igv.js browser configuration (named list). When supplied it is passed through as-is and the convenience arguments are ignored.

width, height

Widget dimensions (any valid CSS size).

element_id

Optional explicit DOM id.

Value

An htmlwidget object.

Details

Supply either a full igv.js config (a named list matching the igv.js browser configuration) or the convenience arguments genome, locus and tracks, which are assembled into a config when config is NULL.

Examples

# Genome only
igv(genome = "hg38")
# Genome + locus + a public bigWig track igv( genome = "hg38", locus = "chr8:127,736,588-127,739,371", tracks = list(list( name = "CTCF", url = "https://www.encodeproject.org/files/ENCFF356YES/@download/ENCFF356YES.bigWig", format = "bigWig" )) )