Skip to contents

For every pair of individuals, solves the observed IBS counts against their expectations under Purcell et al.'s (2007) Table 1 to get the IBD sharing probabilities \(Z_0, Z_1, Z_2\), and reports \(\hat\pi = Z_1/2 + Z_2\), the proportion of the genome shared IBD. Expected values for a full sib pair are \((0.25, 0.5, 0.25)\) with \(\hat\pi = 0.5\); for a parent-offspring pair \((0, 1, 0)\), also \(\hat\pi = 0.5\); for unrelated individuals \((1, 0, 0)\) with \(\hat\pi = 0\).

Usage

morie_ibdmtx(G)

Arguments

G

Genotype matrix, individuals by SNPs, coded 0/1/2 (any other value is treated as missing).

Value

A list with estimate (the \(\hat\pi\) matrix), Z0, Z1, Z2, ibs_counts, n_snps_used, n, m, method.

References

Purcell, S. et al. (2007). PLINK. American Journal of Human Genetics, 81(3), 559-575.

Examples

set.seed(1)
G <- matrix(sample(0:2, 30 * 12, replace = TRUE), 30, 12)
dim(morie_ibdmtx(G))
#> NULL