Central preparation function called inside Big_LD() and
run_Big_LD_all_chr. Depending on method:
"r2"Mean-centres each SNP column. No kinship needed. Returns the centred matrix directly. Fast - O(np).
"rV2"Computes VanRaden GRM via AGHmatrix, tunes it via ASRgenomics, inverts via Cholesky/eigen, and left-multiplies the centred genotype matrix. Returns the whitened matrix and the whitening factor for use in
appendSGTs.
Value
Named list:
- adj_geno
n x p numeric matrix ready for
compute_ld().- V_inv_sqrt
n x n whitening matrix, or
NULLfor r^2.