How to view IGV tracks of BAM and VCF files

Allie Hajian
  • Updated

This article walks through two ways to use the Integrative Genomics Viewer (IGV) to examine tracks from BAM (.bam) files in Terra. The instructions assume that the BAM and BAM index file links are in a data table. 

1. From the workspace Data page

You can reference data files in the cloud by including the file URL in a data table (see Managing data with tables. To view these files in IGV, follow the step-by-step instructions below.

1.1. Open the table by clicking on the name in the data tab and select a row from the table (must include both a BAM and BAI file).
Screenshot of sample table with an arrow and the number one pointing to the selected checkbox next to the NA12842 sample and an arrow and a number two pointing to the open with icon at the top left - View-IGV-tracks_Select-samples-and-choose-edit_Screen_shot.png

1.2. Click the Open with icon above the table. 

1.3. Select IGV.
Screenshot of open with popup highlighting IGV option.png

1.4. Choose the appropriate reference for the files and select launch.

1.5. Navigate to the region of interest.
Screenshot of IGV showing reads for chromozone-6.png

1.6. You can also add tracks to the IGV using the "ADD TRACK" button that appears in the top right of your Data Tab when you're using the IGV.  Screenshot 2023-11-10 at 1.17.08 PM.png

You can view files in any accessible Google bucket this way, but make sure you include the index file. The index file usually has the exact same URL, but with a different extension. Some file/index extensions are listed in the table below.

File Extension Index Extension
.bam .bai
.vcf .vcf.idx
.vcf.gz .vcf.gz.tbi

2. Using the IGV web app

You can also use IGV in a web browser following the steps below. We recommend keeping your data page open in a separate browser tab, since you'll be copying and pasting links to the data files (i.e., URLs) from your Terra data table to the IGV browser.

2.1. Right click the BAM file link in the data table and select Copy Link Address.

2.2. Open IGV (http://igv.org/app/) in a new browser tab. 

2.3. Select "Genome" and choose the appropriate reference genome.

2.4. Select Tracks > URL.

2.5. Paste the BAM file URL from the data table into the Data URL field. 
Screenshot of Track URL modal

2.6. Copy the BAI (index) file URL from the data table as you did for the BAM in Step 2.1.

2.7. Paste the BAI URL into the Index URL field in IGV.

What to expect

You should see the tracks in the web browser.
Screenshot of chromosome 20 in IGV

404 error?Make sure that your file path is properly formed and does not have any trailing quotation characters.

 

Save tracks to view later

You can save the tracks for viewing later using Share (from the top menu). 

Example 

See the example IGV web browser file created from this example at http://bit.ly/2IqsQqM.

 

Was this article helpful?

2 out of 4 found this helpful

Comments

0 comments

Please sign in to leave a comment.