SnpArrays.jl
SnpArrays.jl copied to clipboard
Add KING methods for genetic relationship matrix calculation
For the gym
function, we should add the two methods method=:KING_homo
and method=:KING_robust
, used in the KING software.
The methods are described in this paper: https://doi.org/10.1093/bioinformatics/btq559. :KING_homo
(assuming homogeneous population) method is equations (5) and (6). :KING_robust
(handling heterogenous populations) is equation (9).
The current implementation of GRMs looks very memory-consuming for kinship pruning. Is there other use of GRMs other than pruning?
Maybe we can just compute and return a vector of diagonal entries and a vector of off-diagonal entries instead of the entire matrix?
The current implementation of GRMs looks very memory-consuming for kinship pruning. Is there other use of GRMs other than pruning?
Can you clarify which part is memory-consuming? Calculating GRM or kinship pruning? These are two separate steps.
GRM creating the whole n x n matrix as an output. Isn't a sparse matrix or a graph data structure enough as input for kinship pruning?