[help] Vector/matrix encoding of alleles
opened this issue · comments
Sorry about this,
Can you help me find the bit of code responsible for converting a record with an allele to a vector encoding (0, 1, 2)?
plink2 itself tends to operate on the records in bit-packed form, so there isn't such a function under include/. However, the functions in pgenlib_ffi_support.cc probably do what you want.
Thank you.
You use const int8_t* genobytes
and uintptr_t* genoarr
throughout the file. I suspect this is the data that i'm interested in. Can you clarify what these arrays are when you have a chance?
genoarr
is the 2-bit-per-element packed format returned/expected by pgenlib functions, while genobytes
is a byte-per-element {0,1,2,-9} representation.