calculate_heterozygosity function

Calculate heterozygosity