Creating HTML Links to IGV

This section describes two forms of HTML links for interacting with IGV from a web page. The first can be used to launch IGV on the client machine at a specific locus with a supplied session file. The second can be used to load data and session files into IGV (after it has been launched).

Links to Launch and Load Data

The first type of HTML link makes use of a dynamic "php" file hosted at the Broad Institute to launch IGV on a specified session or data file. An example follows

URL to a session file (further described below), or a comma-delimited list of data files.

file

Alias for sessionURL

index

Optional

URL to an index file, or a comma-delimited list of index files. This parameter is only used if sessionURL points to and indexed data file or list of files. If a list is used, the index list must be the same length as the data file list.

locus

Optional

Locus to display. Use any syntax that is valid in the IGV search box.

user

Optional

A short name identifying your website or organization.

genome

Optional

A genome identifier (e..g hg18). This is useful if you specify a data file rather than a session file for the sessionURL. Click here for a list of recognized genome ids.

initalHeapSize

Optional

Initial memory footprint, specified as an integer followed by an "m" for megabytes. The default value is 256m.

maxHeapSize

Optional

Maximum memory setting. The default value is 1000m (1 gigabyte).

name

Optional

Specifies a name or names for the track(s). This parameter is ignored if loading a session file.

merge

Optional

Controls whether or not the loaded data is merged with the existing IGV session, or a loaded into a new session. If false, any data currently loaded will be unloaded after clicking this link. The default value is false if file is a session file, true otherwise.

Links to Load Data

The second type of link will load data into a running IGV. This makes use of the listener port, which must be enabled. This option can be controlled on the "Advanced" preferences tab, and is enabled by default listening on port 60151. Links can be created to load data or jump to a locus as follows.

The file parameter value can be a URL or a comma-delimited list of URLs to most IGV-supported data file types (exceptions listed below), or a session file. The merge parameter (optional) controls whether or not the loaded data is merged with the existing IGV session, or a loaded into a new session. If false, any data currently loaded will be unloaded after clicking this link. The default value is false if file is a session file, true otherwise. The name parameter (optional) specifies a name or names for the track. If multiple tracks are loaded as a comma-delimited list, the name parameter value should also be a comma-delimited list of the same size. The name parameter is ignored if loading a session.

url= Defines a URL for external links associated with a feature track. Any '$$' in this string will be substituted with the name of the current feature.

Optional - These elements are optional in a session file and are used to determine the placement of tracks and visual style choices. They are included in an XML file produce when you save a session in IGV, but are typically not included in an XML file that is created manually.