Variant calling with FreeBayes
In this recipe, we will see how to use an alignment file to call variants, or alterations in a genome. We will look at FreeBayes (https://github.com/freebayes/freebayes), which is a popular variant caller.
In variant calling, we look at the pile-up of reads in the alignment and try to determine whether there are any variations from the reference sequence.
Let’s take a look at an example:
Figure 5.10 – Variant Calling example (source: https://www.hammerlab.org/2015/01/23/faster-pileup-loading-with-bai-indices/)
The image above shows sequencing reads “piled up” against a reference genome (top). Reads containing a variant are highlighted to indicate the position of the variation. In some reads, the base pair remains a G, matching the reference sequence, while in many others it is a C. Because the majority of reads show a C, we make a consensus call that this position in the genome now contains...