Using IGV Locally with DNAnexus

Overview

While IGV is available as a tool that can be used on the DNAnexus Platform in your project's Visualize tab, you can also use the Integrative Genomics Viewer (IGV) software on your local machine to visualize files stored on DNAnexus.

About IGV

The Integrative Genomics Viewer (IGV) is a visualization tool developed and maintained by the Broad Institute for interactive exploration of large, integrated genomic datasets. It supports a wide variety of data types, including array-based and next-generation sequence data, and genomic annotations. For more information about IGV or to download the latest version, please visit the official website at https://www.broadinstitute.org/igv/.

For files stored on DNAnexus

There are two methods of visualizing files stored on DNAnexus using IGV. You can either load individual tracks one-by-one or create a session file to automatically load multiple files.

Both methods require you to first set up your IGV preferences for use with DNAnexus URLs.

Set IGV Preferences

Requirements: IGV v2.3.62 or later

This is a one-time setup each time you must do each time you download or update IGV on your computer.

  1. After opening your local IGV application, go to the menu bar and select View and then Preferences.

  2. In the preference window, go to the Advanced tab (on the right). If you see an option to have IGV Automatically discover index and coverage files, please uncheck this option to enable DNAnexus URLs to work with IGV.

  3. Click OK to save your preferences. In some later versions of IGV, this option has been removed so you can proceed without clicking OK.

Load Individual Tracks

Step 1

From the DNAnexus Platform, select the files you would like to visualize. Check the boxes next to the names of the desired files. You will need to select both the file (e.g. SRR504516.bam) and the index file (e.g. SRR504516.bam.bai) as both are needed for IGV.

Step 2

Generate the URLs for the files. After selecting your files, click on the Download button on the upper right side of the screen. Then copy the URLs generated, as seen below, or click on the page icon on the upper right to copy all the URLs at once.

Warning: These URLs will only be valid for 24 hours. If you would like to set the duration of the URLs to be valid longer, please use our [CLI tools]((/user/helpstrings-of-sdk-command-line-utilities#make_download_url) for generating URLs.

Step 3

From the IGV application on your local machine, go to the menu bar and select File and then Load from URL.

Enter the URL of the file you wish to view into the "File URL" field of the "Load from URL" window that opens up. Repeat this step for the index file's URL.

Repeat this step for each file you want to visualize during your IGV session.

Step 4

Now you are able to browse your DNAnexus files from your local machine. Please note that certain actions may take a bit longer to run, as IGV does need to download some data locally. However, IGV will only download the data required to visualize the portion of the genome you're viewing, not the entire file.

Create a Session File

Alternatively, you can create an "index-aware session file" to automatically load multiple tracks into IGV. This session file is simply a text file with the following format:

  • The file must have a file extension of .idxsession.

  • The file must have one line for each track you want to visualize.

  • Each line must contain a preauthenticated URL for the file. You can create these URLs using either our UI or CLI tools.

  • If you are visualizing a BAM or VCF file, the line must also contain the URL for the index file, separated by a space.

  • If you a visualizing a VCF file, you may optionally include a URL for the .tdf coverage file, also separated by a space.

<*.bam URL> <*.bam.bai URL>
<*.vcf.gz URL> <*.vcf.gz.tbi URL>
<*.vcf.gz URL> <*.vcf.gz.tbi URL> <*.vcf.gz.tdf>

Once you have this session file, you can open the session file in IGV and IGV will automatically load all the tracks you specified in your file. To do this, in IGV, go to the menu >> File >> Open Session...

That will then open a window for you to select the session file to open in IGV.