This function treats the data as diploid. If it's really haploid, you may want to compare the two rows, and then treat samples where the allele codes differ as missing values.
ReadAlleles(pgen, acbuf, variant_num, phasepresent_buf = NULL)
No return value, called for acbuf-filling side-effect.
Object returned by NewPgen().
Buffer returned by AlleleCodeBuf() or IntAlleleCodeBuf().
Variant index (1-based).
Buffer returned by BoolBuf(). Optional; if provided, elements are set to true when the sample has known phase. Most of these values will be TRUE even when the raw data is unphased, because homozygous genotypes always have known phase. (Missing genotypes are considered to have unknown phase.)