Creating HTML Links to IGVThis 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 DataThe 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 http://www.broadinstitute.org/igv/projects/current/igv.php?sessionURL=URL&user=name&locus=locus The table below contains the full parameter list
BAM File Example: Session File Example:
Links to Load DataThe 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. http://localhost:port/load?file=URL&locus=locus&genome=genome&merge=[true|false]&name=name http://localhost:port/goto?locus=locus 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. Examples: http://localhost:60151/load?file=http://www.broadinstitute.org/igvdata/exampleFiles/gbm_session.xml&merge=true http://localhost:60151/goto?locus=egfr Session File FormatIGV produces a session file in XML format when a user clicks on File>Save Session. You can also create a session file manually. The XML format (IGV version 1.5) is described below. Session XML Hierarchy
Description of Session ComponentsRequired - These elements are required in a session file.
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.
Session File ExampleThe XML below is an example of a minimal session file. ------------------------------------------------------------------------------------------------------------------------------
<Global genome="hg18" locus="EGFR" version="3"> <Resources> <Resource name="RNA Genes" path="http://www.broadinstitute.org/igvdata/tcga/gbm/GBM_batch1-8_level3_exp.txt.recentered.080820.gct.tdf"/> <Resource name="RNA Genes" path="http://www.broadinstitute.org/igvdata/annotations/hg18/rna_genes.bed"/> <Resource name="sno/miRNA" path="http://www.broadinstitute.org/igvdata/tcga/gbm/Sample_info.txt"/> </Resources> </Global>
|