We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

(howto) Visualize an alignment with IGV

shleeshlee CambridgeMember, Broadie ✭✭✭✭✭
edited January 31 in Tutorials


Visualize sequence read alignment data (BAM or SAM) on IGV using this quick-start tutorial. The Integrative Genomics Viewer is a non-GATK tool developed at the Broad Institute that allows for interactive exploration of large genomic datasets.

Tools involved


  • Coordinate-sorted and aligned BAM or SAM file
  • Corresponding BAI index
  • Matching reference genome to which the reads align. See this page for instructions on loading a .genome or FASTA file genome.

Download example data

  • tutorial_6491.tar.gz contains a coordinated-sorted BAM and corresponding BAI. Most reads align to a 1 Mbp genomic interval on chromosome 10 (10:96,000,000–97,000,000) of the human GRCh37 reference assembly. Specifically, reads align to GATK bundle's human_g1k_v37_decoy.fasta that corresponds to the Human (1kg, b37+decoy) reference hosted by IGV.

Related resources

View aligned reads using IGV

To view aligned reads using the Integrative Genomics Viewer (IGV), the SAM or BAM file must be coordinate-sorted and indexed.

  1. Always load the reference genome first. Go to Genomes>Load Genome From Server or load from the drop-down menu in the upper left corner. Select Human (1kg, b37+decoy).
  2. Load the data file. Go to File>Load from File and select 6491_snippet.bam. IGV automatically uses the corresponding 6491_snippet.bai index in the same folder.
  3. Zoom in to see alignments. For our tutorial data, copy and paste 10:96,867,400-96,869,400 into the textbox at the top and press Go. A 2 kbp region of chromosome 10 comes into view as shown in the screenshot above.

Alongside read data, IGV automatically generates a coverage track that sums the depth of reads for each genomic position.

Find a specific read and view as pairs


  1. Right-click on the alignment track and Select by name. Copy and paste H0164ALXX140820:2:2107:7323:30703 into the read name textbox and press OK. IGV will highlight two reads corresponding to this query name in bold red.
  2. Right-click on the alignment track and select View as pairs. The two highlighted reads will display in the same row connected by a line as shown in the screenshot.

Because IGV holds in memory a limited set of data overlapping with the genomic interval in view (this is what makes IGV fast), the select by name feature also applies only to the data that you call into view. For example, we know this read has a secondary alignment on contig hs37d5 (hs37d5:10,198,000-10,200,000).

If you jump to this new region, is the read also highlighted in red?

Some tips

If you find IGV sluggish, download a Java Web Start jnlp version of IGV that allows more memory. The highest memory setting as of this writing is 10 GB (RAM) for machines with 64-bit Java. For the tutorial example data, the typical 2 GB allocation is sufficient.

  • To run the jnlp version of IGV, you may need to adjust your system's Java Control Panel settings, e.g. enable Java content in the browser. Also, when first opening the jnlp, overcome Mac OS X's gatekeeper function by right-clicking the saved jnlp and selecting Open with Java Web Start.

To change display settings, check out either the Alignment Preferences panel or the Alignment track Pop-up menu. For persistent changes to your IGV display settings, use the Preferences panel. For track-by-track changes, use the Pop-up menus.

Default Alignment Preferences settings are tuned to genomic sequence libraries. Go to View>Preferences and make sure the settings under the Alignments tab allows you to view reads of interest, e.g. duplicate reads.

  • IGV saves any changes you make to these settings and applies them to future sessions.
  • Some changes apply only to new sessions started after the change.
  • To restore default preferences, delete or rename the prefs.properties file within your system's igv folder. IGV automatically generates a new prefs.properties file with default settings. See IGV's user guide for details.

After loading data, adjust viewing modes specific to track type by right-clicking on a track to pop up a menu of options. For alignment tracks, these options are described here.

Post edited by akovalsk on


  • vivekruhelavivekruhela Member

    @shlee :smile:

    Thanks for this post to help us in learning IGV. I am trying to use IGV for BAM file visualization. Everything is working well but, unfortunately, at last, I am getting only Chr M visualization rest for all other chromosomes, I do not get any visualization. I tried the same BAM file with other software like tablet (developed by James Hutton Institute (https://ics.hutton.ac.uk/tablet/) ) here I am getting the warning of total read count of zero and only chr M can be visualized. But I have made sure many times that read counts are not zero (using the command samtools view -c BAMFile.BAM) and similar commands for getting mapped read count also. None of them is zero. So why I am getting a warning of zero read count while it is not zero and why IGV is not able to visualize other chromosomes except chr M. I am waiting for your suggestions... Thanks.

  • SheilaSheila Broad InstituteMember, Broadie ✭✭✭✭✭



    It sounds like your BAM file only has reads from chrM. What happens when you try to view another chromosome in IGV? Are there just no reads shown?


  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @vivekruhela,

    I'm not familiar with tablet but I am familiar with IGV. For IGV, make sure (i) your reference matches that which your reads were aligned to and (ii) View>Preferences>Alignments settings do not filter your reads of interest. Also, If you do a samtools flagstat or gatk FlagStat, do you have reads that pass QC, are non-duplicate and not supplementary? You can learn about SAM flags here if you are unfamiliar. Finally, it is often helpful for us to diagnose what is going on with a few example reads from your data that you expect to visualize elsewhere besides chrM. If you can post them to this thread, that would be great.

Sign In or Register to comment.