the ideas and code easier to follow. Once you understand the haploid case it is not too hard to extend the ideas to the diploid case.)</p>
<p>The term “bi-allelic” means that the loci have two possible alleles (types), which for convenience we will label <code>0</code> and <code>1</code>.</p>
<p>Under these assumptions, the genotype for each individual is simply a sequence of 0s and 1s. The probability of seeing a <code>0</code> vs a <code>1</code> at each locus is determined by the “allele frequencie