Variant calling is difficult because the alignments are mathematical constructs that work by maximizing various predetermined rewards and penalities and by those imply that the simplest "explanation" is correct. Biology does not work this way. I have a chapter called Misleading alignments in the Biostar Handbook that I will summarize below:
Imagine that the sequence below is subjected to two insertions of Cs at the locations indicated with carets:
CCAAACCCCCCCTCCCCCGCTTC
^ ^
The two sequences, when placed next to one another, would look like this:
CCAAACCCCCCCTCCCCCGCTTC
CCAAACCCCCCCCTCCCCCCGCTTC
A better way to visualize what’s happening in this example is shown in the expected alignment that would reflect the changes that we have introduced:
CCAAA-CCCCCCCT-CCCCCGCTTC
||||| |||||||| ||||||||||
CCAAACCCCCCCCTCCCCCCGCTTC
Now suppose we did not know what the changes were. Can we discover the variation that we introduced by using a global aligner? Let’s see:
global-align.sh CCAAACCCCCCCTCCCCCGCTTC CCAAACCCCCCCCTCCCCCCGCTTC
Here is what we obtain:
CCAAACCCCCCC--TCCCCCGCTTC
|||||||||||| .||||||||||
CCAAACCCCCCCCTCCCCCCGCTTC
The variation indicated by the alignment is different: instead of the two insertions of C it shows one insertion of CT followed by a mismatch, adding insult to injury the variation is also shown to take place at a completely different location altogether.
You can see how difficult would be to call this correctly!