Description Usage Arguments Value Examples
The marker data for one individual at two markers is G = (a1/a2, b1/b2). H is a n by n matrix of haplotype probabilities
1 | geno1(a1, a2, b1, b2, H)
|
a1 |
First allele, first marker |
a2 |
Second allele, first marker |
b1 |
First allele, second marker |
b2 |
Second allele, second marker |
P(G|H)
1 2 3 4 5 6 7 8 9 10 11 | # Below I go through some cases trying to figure out
# what the LD probabilities should be
p = q = c(0.1, 0.2, 0.3, 0.4)
# Checks when LE
H = p%o%q # Haplotype probs for LE
abs(geno1(1, 1, 1, 1, H) - p[1]^2*q[1]^2) < 1e-15
abs(geno1(1, 2, 3, 3, H) - 2*p[1]*p[2]*q[3]^2) < 1e-15
abs(geno1(1, 2, 3, 4, H) - 2*p[1]*p[2]*2*q[3]*q[4]) < 1e-15
abs(geno1(2, 2, 4, 4, H) - p[2]^2*q[4]^2) < 1e-15
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.