You can use the Integrative Genomics Viewer (IGV) tool on your local machine to visualize files stored on DNAnexus.
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, please visit the official website at https://www.broadinstitute.org/igv/.
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.
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.
Go to the menu bar >> View >> Preferences
In the preference window, go to the Advanced tab (far right tab). 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 and click OK to save your preferences. In some later versions of IGV, this option has been removed and it is OK to proceed.
Step 1 in DNAnexus
Select the files you would like to visualize. You will need to select the both file (e.g. SRR504516.bam) and the index file (e.g. SRR504516.bam.bai) as both are needed.
Step 2 in DNAnexus
Generate URLs for the file. Click Download, then click the Get bulk URLs button. This will generate a URL for each of the files selected. We will use these URLs to open the files IGV.
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 in IGV
In the IGV menu bar select File >> Load from URL. If you do not see this option, please, update your version of IGV.
Enter the URL of the file into the File URL, then the index URL into the Index URL.
Repeat this step for each file you want to visualize during your IGV session.
Step 4 in IGV
Browse normally. 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.
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.
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.