Wednesday, December 5, 2012

How to index BAM files for viewing in IGV browser

If you have tried to upload BAM files to IGV you may get an error stating the files are not indexed.
Install samtools.

Go to the folder where your BAM file is 
samtools index accepted_hits.bam

After this accepted_hits.bam.bai file will be created and the original BAM file can be uploaded to IGV 


  1. Hi, I downloaded the ChIP-seq bam file (hg19) from UCSC, then I sorted and indexed with samtools.
    but after I loaded the sorted bam file into IGV, nothing showed up in the track. Do you have an idea why? Thanks.

    I am using IGV_2.3.5
    ubuntu 12.04

  2. I'm not sure what happened there. Maybe try an older version of IGV, I know sometimes I had problems with the new release.


  3. Hats off to your presence of mind..I really enjoyed reading your blog. I really appreciate your information which you shared with us.

    seo course in chennai

  4. Hey, Your post is very informative and helpful for us.
    In fact i am looking this type of article from some days.
    Thanks a lot to share this informative article.
    mobile repairing course in hyderabad