This function treats the data as diploid; you can divide by 2, and then treat 0.5 as NA, if it's actually haploid.
ReadHardcalls(pgen, buf, variant_num, allele_num = 2L)
No return value, called for buf-filling side-effect.
Object returned by NewPgen().
Buffer returned by Buf() or IntBuf().
Variant index (1-based).
Allele index; 1 corresponds to REF, 2 to the first ALT allele, 3 to the second ALT allele if it exists, etc. Optional, defaults 2.