DM | R Documentation |
Compute the Dominance Matrix
DM(x, which.snps, autosome.only = TRUE, chunk = 1L)
x |
A |
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 Dominance Matrix (DM) gives for each pair of individuals an estimation of their probability of sharing two alleles Identical By Descent.
It is computed by a moment estimator,
{1\over q} ZZ'
with Z
the matrix with entries
p \over 1-p
, -1
, 1-p \over p
according to the
values 0, 1, 2 in the genotype matrix x
(here p
is the
frequency of the alternate allele, and q
is the number of SNPs
(ncol(x)
).
A symmetric square matrix of dimension equal to the number of individuals. Each entry can be interpreted as an estimated probability of sharing two alleles IBD — as it is a moment estimator, the value can (and will) fall outside of the range (0,1).
GRM
, reshape.GRM
# load chr2 data set (~10k SNPs in low LD)
x <- read.bed.matrix( system.file("extdata", "chr2.bed", package="gaston") )
# Compute Dominance Matrix
D <- DM(x)
dim(D)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.