Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Genome-wide kinship

How do PLINK and KING turn genome-wide identity by state (IBS) into identity by descent (IBD), and when do they agree?

Start from first principles

The kinship coefficient ϕij\phi_{ij} is the probability that one random allele from person ii and one random allele from person jj are IBD.

Local IBD asks where a shared segment lies. Genome-wide kinship asks for its average over the genome. At one marker, an IBS match may be accidental. Across many markers, accidental matches approach a predictable baseline; relatives remain more similar because they inherited some of the same ancestral DNA.

1. Why averaging works

Start with one haploid copy from each person and 12 independent markers. Let the allele frequency be p=1/2p=1/2 at every marker. Two unrelated copies match by chance with probability

c=p2+(1−p)2=12.c=p^2+(1-p)^2=\frac12.

Suppose a fraction qq of the two copies is IBD. The alleles must match there. They match with probability cc elsewhere. Therefore

P(IBS)=q+(1−q)c,q=P(IBS)−c1−c.P(\mathrm{IBS})=q+(1-q)c, \qquad q=\frac{P(\mathrm{IBS})-c}{1-c}.

The IBD states below are shown only to check the example. Real genotype data contain the match pattern, not the hidden ancestry state.

Loading...
Loading...

For a pair of diploid people, let Km∈{0,1,2}K_m\in\{0,1,2\} be the number of copies shared IBD at marker mm. Across the genome,

Km∼Categorical⁡(Z0,Z1,Z2).K_m\sim\operatorname{Categorical}(Z_0,Z_1,Z_2).

We do not observe KmK_m. We observe the IBS count Im∈{0,1,2}I_m\in\{0,1,2\}. Under HWE with allele frequency pp and r=1−pr=1-p,

P(Im∣Km,p)=K=0K=1K=2I=02p2r200I=14pr(p2+r2)2pr0I=2p4+r4+4p2r2p2+r21.P(I_m\mid K_m,p)= \begin{array}{c|ccc} & K=0 & K=1 & K=2\\ \hline I=0 & 2p^2r^2 & 0 & 0\\ I=1 & 4pr(p^2+r^2) & 2pr & 0\\ I=2 & p^4+r^4+4p^2r^2 & p^2+r^2 & 1 \end{array}.

PLINK matches the expected and observed IBS 0/1/2 counts across markers to estimate Z0,Z1,Z2Z_0,Z_1,Z_2. It then reports

ϕ^ijPLINK=14Z^1+12Z^2,PI_HAT^=2ϕ^ijPLINK.\widehat\phi_{ij}^{\mathrm{PLINK}}=\frac14\widehat Z_1+\frac12\widehat Z_2, \qquad \widehat{\mathrm{PI\_HAT}}=2\widehat\phi_{ij}^{\mathrm{PLINK}}.

The code below implements this basic moment calculation with known allele frequencies. PLINK adds practical safeguards and finite-sample corrections.

3. KING: estimate kinship directly

Let Gim∈{0,1,2}G_{im}\in\{0,1,2\} be the allele count and Him=1(Gim=1)H_{im}=1(G_{im}=1) indicate a heterozygous genotype. KING-robust uses

ϕ^ijKING=12−∑m(Gim−Gjm)22∑m(Him+Hjm).\widehat\phi_{ij}^{\mathrm{KING}} =\frac12- \frac{\sum_m(G_{im}-G_{jm})^2} {2\sum_m(H_{im}+H_{jm})}.

The numerator measures how different the two genotypes are. The denominator measures how much variation is available within this pair. It does not depend on who else happens to be in the sample.

4. Their connection

A simple frequency-based moment makes the connection visible:

ϕ^ijfrequency=12−∑m(Gim−Gjm)28∑mpm(1−pm).\widehat\phi_{ij}^{\mathrm{frequency}} =\frac12- \frac{\sum_m(G_{im}-G_{jm})^2} {8\sum_m p_m(1-p_m)}.

This one equation does not recover all three PLINK IBD proportions. But it is exactly the kinship component of the basic PLINK moment calculation: squared genotype difference gives weight 4 to IBS 0, weight 1 to IBS 1, and weight 0 to IBS 2.

E(Him+Hjm∣pm)=4pm(1−pm),E(H_{im}+H_{jm}\mid p_m)=4p_m(1-p_m),

KING replaces the frequency denominator with pair heterozygosity. Under one homogeneous HWE population, KING’s denominator approaches the frequency denominator as the number of independent markers grows. PLINK and KING then estimate the same target,

ϕij=14Z1+12Z2.\phi_{ij}=\frac14Z_1+\frac12Z_2.

Thus the basic PLINK and frequency-moment kinship estimates are algebraically the same. KING is different in a finite sample, but has the same large-marker limit when the pooled allele frequencies describe both people.

5. Unrelated pairs and siblings

The simulation uses independent SNPs. Unrelated genotypes are sampled independently. Siblings inherit one allele from each of the same two parents. Linkage is omitted because the target is a genome-wide average.

Loading...
plot without title

Why a local HMM is unnecessary here

A single marker cannot identify local IBD because the same genotype may arise by chance. Linked markers and an HMM resolve that local state.

Genome-wide kinship is an average. It does not require the position of each shared segment. Across many approximately independent markers, chance IBS approaches its expected baseline. The excess estimates average IBD.

Paper2Agent

We discussed KING in class. You may use Paper2Agent to explore the original paper.

What to remember

  • Concept and intuition. At one marker, IBS does not identify IBD. Across many markers, chance matches average out.

  • Insight behind the approach. PLINK estimates the full IBD mixture from IBS counts. KING estimates kinship directly from genotype differences scaled by pair heterozygosity.

  • Connection. In a homogeneous HWE population with many independent markers, both estimate ϕ=Z1/4+Z2/2\phi=Z_1/4+Z_2/2.

Sources

  • Pritchard, An Owner’s Guide to the Human Genome, the linkage material in Chapters 4.1--4.2 and review Chapter 2.3. Book page

  • Gorroochurn, Notes on Population Genetics, Sections 7.2--7.3.

  • Purcell et al. (2007), PLINK. DOI

  • Manichaikul et al. (2010), KING. Paper

  • The simulation is an original course example. It uses 100 unrelated pairs, 100 sibling pairs, 5,000 independent SNPs, allele frequencies sampled uniformly from 0.10 to 0.50, and seed 8149.

References