This is a test version of Biostars. For the public version, visit https://www.biostars.org.
IGV is not showing all alignments of SAM file

I manually created a SAM file:

GENE1_1 16  11  1185016 255 20M *   0   0   AGAACAACCTCTGCCTCTCC    *
GENE1_2 16  11  1185017 255 20M *   0   0   GAACAACCTCTGCCTCTCCA    *
GENE2_1 0   17  7673795 255 20M *   0   0   ACAAACACGCACCTCAAAGC    *
GENE2_2 0   17  7673796 255 20M *   0   0   CAAACACGCACCTCAAAGCT    *
GENE2_3 0   17  7673797 255 20M *   0   0   AAACACGCACCTCAAAGCTG    *
GENE2_4 0   17  7673798 255 20M *   0   0   AACACGCACCTCAAAGCTGT    *
GENE2_5 0   17  7673799 255 20M *   0   0   ACACGCACCTCAAAGCTGTT    *

If I load that into IGV the alignment of the read GENE2_1 is not shown. If I change the order of the reads to this:

GENE2_1 0   17  7673795 255 20M *   0   0   ACAAACACGCACCTCAAAGC    *
GENE2_2 0   17  7673796 255 20M *   0   0   CAAACACGCACCTCAAAGCT    *
GENE2_3 0   17  7673797 255 20M *   0   0   AAACACGCACCTCAAAGCTG    *
GENE2_4 0   17  7673798 255 20M *   0   0   AACACGCACCTCAAAGCTGT    *
GENE2_5 0   17  7673799 255 20M *   0   0   ACACGCACCTCAAAGCTGTT    *
GENE1_1 16  11  1185016 255 20M *   0   0   AGAACAACCTCTGCCTCTCC    *
GENE1_2 16  11  1185017 255 20M *   0   0   GAACAACCTCTGCCTCTCCA    *

IGV does show the alignment of the read GENE2_1, but now the alignment of GENE1_1 is not shown. What is happening here?

igv

Alignments are downsampled according to their start position by default. You may need to turn off that option. It is somewhat buried in preferences.

Unfortunately, that doesn't help

the downsampling will only happen for a large number of alignments,

for such a few number of alignments, all should be displayed

1 answer

I verified this behavior, and I can observe the same oddity, which would I report as: the first alignment after switching chromosomes does not show up:

@SQ SN:11   LN:10000000
@SQ SN:17   LN:10000000
read1   16  11  1185016 255 20M *   0   0   AGAACAACCTCTGCCTCTCC    *
read2   0   17  7673795 255 20M *   0   0   ACAAACACGCACCTCAAAGC    *
read3   0   17  7673796 255 20M *   0   0   CAAACACGCACCTCAAAGCT    *

Notably, once the SAM file is sorted and converted to BAM, the alignments do show up.

Converting back from BAM to SAM into a new SAM file IGV again fails to display the alignment for read2.

I think it is a bug.

Solution: convert to BAM format.

Thanks for all your efforts. I will report this tomorrow and use BAM files for now :).

Log in to answer this question.