Function to create additive and dominance genomic relationship matrices from biallelic dosages.
kinship(M, type)
M | dosage matrix. Assumes SNPs in M coded 0, 1, 2 (requires rounding dosages to integers). M is Nind x Mrow, numeric matrix, with row/columanes to indicate SNP/ind ID. |
---|---|
type | string, "add" or "dom". type="add" gives same as rrBLUP::A.mat(), i.e. Van Raden, Method 1. type="dom" gives classical parameterization according to Vitezica et al. 2013. |
square symmetic genomic relationship matrix
K<-kinship(M,"add")#> Error in kinship(M, "add"): object 'M' not found