4.4 Are these SNPs in LD?

If we run table on each SNP column, we can see which alleles exist at SNP1 and SNP2.

  • SNP1 can be A or G
  • SNP2 can be C or T
table(haplotypes$snp1_allele)
## 
##    A    G 
## 3456 1552
table(haplotypes$snp2_allele)
## 
##    C    T 
## 2825 2183

If these two SNPs were in perfect LD, we’d expect to see only two haplotypes in our data (Fig. 4A).

  1. A C: If someone carries an A at SNP1, they will always carry a C at SNP2.
  2. G T: If they carry a G at SNP1, they will always carry a T at SNP2.

If these two SNPs were in linkage equilibrium, the allele at SNP1 would give us no information about SNP2. We would expect to see all four possible haplotypes, in amounts proportional to the component allele frequencies (Fig. 4B).

  1. A C
  2. A T
  3. G C
  4. G T

Fig. 4. When two SNPs are in perfect LD, seeing an allele on one haplotype perfectly predicts which allele is on the other haplotype.
Fig. 4. When two SNPs are in perfect LD, seeing an allele on one haplotype perfectly predicts which allele is on the other haplotype.