implementing diploid haplotype