Add mask in haplotype analysis