Genetic Relationship Matrix
Compute the Genetic Relationship Matrix
GRM(x, which.snps, autosome.only = TRUE, chunk = 1L)
x |
|
which.snps |
Logical vector, giving which snps to use in the computation. The default is to use all autosomal SNPs |
autosome.only |
If |
chunk |
Parameter for the parallelization: how many SNPs are treated by each task |
The Genetic Relationship Matrix (GRM) is computed by the formula XX'/q,
with X the standardized genotype matrix and q the number of SNPs
(ncol(x)
).
If x
is not standardized before this computation, the function
will use standardize(x) <- "p"
by default.
The GRM is a symmetric square matrix of dimension equal to the number of individuals. Each entry can be interpreted as an estimated kinship coefficient between individuals, although some authors might disagree. Note in particular that some entries will be negative.
Hervé Perdry and Claire Dandine-Roulland
# load chr2 data set (~10k SNPs in low LD) x <- read.bed.matrix( system.file("extdata", "chr2.bed", package="gaston") ) # Compute Genetic Relationship Matrix K <- GRM(x) dim(K)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.