Calculation of the posterior probability for each site type at each position in the genome

Based on the probabilities calculated, one can determine which of the site types is the best fit at each position in the genome. The site type determined to be the most likely at each position can then be compared with the allele in the reference sequence at the same position. If it is likely to be different, it suggests the presence of a variation.

Therefore the posterior probability is formed as follows:

$ \displaystyle P(site \hspace{1 mm} type\vert Obs) = \frac{P(Obs\vert site \hspace{1 mm} type)*P(site \hspace{1 mm} type)}{P(Obs)}$

where

$ \displaystyle P(Obs) = \sum_{Site \hspace{1 mm} types} P(Obs\vert site \hspace{1 mm} type)*P(site \hspace{1 mm} type)$