I am trying to understand local realignment but I could not get a clear idea of what is the problem solved by it.

For example, reading Homer and Nelson (2010):

Because alignment algorithms map each read independently to the reference genome, alignment artifacts could result, such that SNPs, insertions, and deletions are improperly placed relative to their true location. This leads to local alignment errors due to a combination of sequencing error, equivalent positions of the variant being equally likely, and adjacent variants or nearby errors driving misalignment of the local sequence. These local misalignments lead to false positive variant detection, especially at apparent heterozygous positions. For example, insertions and deletions towards the ends of reads are difficult to anchor and resolve without the use of multiple reads. In some cases, strict quality and filtering thresholds are used to overcome the false detection of variants, at the cost of reducing power [13]. Since each read represents an independent observation of only one of two possible haplotypes (assuming a diploid genome), multiple read observations could significantly reduce false-positive detection of variants.

I don't understand how the different artifacts (such as SNPs) can result from the alignment.


1 Answer 1


SNPs are likely to be created and InDels are likely to be missed. Suppose you have a read, ACTGACTGACTGTAC and you align it to a reference sequence ACTGACTGACTGTTAAGAACGACTACGAC. If you aligned that, you would either get:

ACTGACTGACTGTac    (lower case denotes soft-clipping)


ACTGACTGACTGTAC    (N.B., you've created some possible SNPS)

But what happens if you look at a bunch of reads? See below:


I've made the 2 base insertion obvious. As you can see, using many alignments, we can "realign" our original read to see that it actually ends in a 2 base insertion, something that's completely impossible to find with a single read. This realignment is part of what the GATK haplotype caller does (it makes a local de Bruijn graph). That's also what my MethIndelRealigner does. I have another real-world example in its documentation.

Raw alignments in IGV:

Before realignment

Alignments after realignment:

After realignment

One can find plenty of similar scenarios that result in SNPs rather than simply losing coverage for InDels.

  • $\begingroup$ Awesome.. I was not considering the problem of mapping each read independently. Now it's clear, thanks! $\endgroup$
    – gc5
    Nov 10, 2017 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.