Functions to simulate haplotypes