Algorithm Search⌘K

Definitioncore

Site frequency spectrum

Also called allele frequency spectrum.

The counts of segregating sites at which the derived allele appears in 1, 2, up to n - 1 of n sampled sequences.

The site frequency spectrum (SFS) of a sample of nn aligned DNA sequences is the vector (ξ1,…,ξn−1)(\xi_1, \ldots, \xi_{n-1}), where ξi\xi_i is the number of segregating sites at which exactly ii of the nn sequences carry the derived allele. It is a histogram of the allele frequencies in the sample, one entry per site. Under the neutral infinite sites model with constant size, E[ξi]=θ/iE[\xi_i] = \theta / i (Fu 1995). Most summary statistics of DNA polymorphism, among them Watterson's estimator, nucleotide diversity and Tajima's D, are linear functions of the SFS.

Definition

Let HH be an n×Sn \times S matrix over {0,1}\{0, 1\}, one row per sampled sequence and one column per segregating site, with 1 for the derived allele and 0 for the ancestral allele. Let cj=∑r=1nHrjc_j = \sum_{r=1}^{n} H_{rj} be the derived count of site jj. Because the site segregates, 1≤cj≤n−11 \le c_j \le n - 1.

The unfolded site frequency spectrum is the vector ξ=(ξ1,…,ξn−1)\xi = (\xi_1, \ldots, \xi_{n-1}) with

ξi=∣{ j:cj=i }∣,i=1,…,n−1.\xi_i = \left|\{\, j : c_j = i \,\}\right|, \qquad i = 1, \ldots, n - 1.

So ∑iξi=S\sum_{i} \xi_i = S, the number of segregating sites.

When the ancestral allele is not known, only the minor allele count min⁡(cj,n−cj)\min(c_j, n - c_j) is defined. The folded spectrum is η=(η1,…,η⌊n/2⌋)\eta = (\eta_1, \ldots, \eta_{\lfloor n/2 \rfloor}) with ηi=ξi+ξn−i\eta_i = \xi_i + \xi_{n-i} for i<n/2i < n/2 and ηn/2=ξn/2\eta_{n/2} = \xi_{n/2} when nn is even.

Expectation (Fu 1995). Under the neutral infinite sites model with a constant population size and θ=4Nμ\theta = 4N\mu with time in units of 2N2N generations,

E[ξi]=θi,i=1,…,n−1.E[\xi_i] = \frac{\theta}{i}, \qquad i = 1, \ldots, n - 1.

Proof. Look at the Kingman coalescent tree of the sample during the time TkT_k when kk lineages exist. The tree shape is independent of the times. The nn leaves split among the kk lineages, and by the Pólya urn argument of the root split result on the Kingman coalescent page, run with kk colours instead of two, the vector of their sizes is uniform over the (n−1k−1)\binom{n-1}{k-1} ordered ways to write nn as a sum of kk positive parts. So a fixed one of the kk lineages has exactly ii leaves below it with probability (n−i−1k−2)/(n−1k−1)\binom{n-i-1}{k-2} / \binom{n-1}{k-1}, the number of ways to split the other n−in - i leaves into k−1k - 1 positive parts over the total. A mutation on that lineage during TkT_k gives a site with derived count ii. Mutations fall at rate θ/2\theta/2 per lineage, and E[Tk]=2/(k(k−1))E[T_k] = 2/(k(k-1)). Summing over the kk lineages and over kk,

E[ξi]=∑k=2nk⋅θ2⋅2k(k−1)⋅(n−i−1k−2)(n−1k−1)=θ∑k=2n(n−i−1k−2)(k−1)(n−1k−1).E[\xi_i] = \sum_{k=2}^{n} k \cdot \frac{\theta}{2} \cdot \frac{2}{k(k-1)} \cdot \frac{\binom{n-i-1}{k-2}}{\binom{n-1}{k-1}} = \theta \sum_{k=2}^{n} \frac{\binom{n-i-1}{k-2}}{(k-1)\binom{n-1}{k-1}}.

Expand the factorials: 1k−1(n−i−1k−2)/(n−1k−1)=(n−i−1)! (n−k)!(n−1)! (n−i−k+1)!=(n−ki−1)/(i(n−1i))\frac{1}{k-1} \binom{n-i-1}{k-2} \big/ \binom{n-1}{k-1} = \frac{(n-i-1)!\,(n-k)!}{(n-1)!\,(n-i-k+1)!} = \binom{n-k}{i-1} \big/ \left(i \binom{n-1}{i}\right). By the hockey stick identity, ∑k=2n(n−ki−1)=∑j=0n−2(ji−1)=(n−1i)\sum_{k=2}^{n} \binom{n-k}{i-1} = \sum_{j=0}^{n-2} \binom{j}{i-1} = \binom{n-1}{i}. So the sum is 1/i1/i. □\square

The proof uses the tree of one site at a time, and the expectation of a sum over sites is the sum of the expectations. So the result also holds with recombination, where each site has its own tree. The variances and covariances of the ξi\xi_i do depend on recombination. The sum over ii gives E[S]=θanE[S] = \theta a_n with an=∑i=1n−11/ia_n = \sum_{i=1}^{n-1} 1/i, which is Watterson's result. For the folded spectrum, E[ηi]=θ(1/i+1/(n−i))E[\eta_i] = \theta (1/i + 1/(n-i)) for i<n/2i < n/2, and E[ηn/2]=2θ/nE[\eta_{n/2}] = 2\theta/n.

Examples and non-examples

A sample of five. The matrix

copy s1 s2 s3 s4 s5 s6
1 1 0 0 0 0 1
2 1 0 0 0 0 0
3 0 1 0 1 0 0
4 0 0 1 1 0 0
5 0 0 1 1 1 0

has the derived counts (2,1,2,3,1,1)(2, 1, 2, 3, 1, 1). So ξ=(3,2,1,0)\xi = (3, 2, 1, 0): three singletons, two doubletons, one tripleton and no site with four derived copies. The folded spectrum is η=(ξ1+ξ4,ξ2+ξ3)=(3,3)\eta = (\xi_1 + \xi_4, \xi_2 + \xi_3) = (3, 3).

With a5=25/12a_5 = 25/12, Watterson's estimate is θ^W=6/(25/12)=2.88\hat\theta_W = 6 / (25/12) = 2.88. The neutral expectation with this θ\theta is (2.88,1.44,0.96,0.72)(2.88, 1.44, 0.96, 0.72). The observed spectrum is close to it at frequencies 1 and 3, has more sites at frequency 2 (2 against 1.44) and none at frequency 4 (against 0.72). With six sites, such differences are well inside the random variation of one genealogy.

Linear statistics. Each estimator of θ\theta below is ∑iwiξi\sum_i w_i \xi_i for weights wiw_i with ∑iwi⋅θ/i=θ\sum_i w_i \cdot \theta / i = \theta, so each is unbiased under the neutral model:

  • Watterson's estimator: wi=1/anw_i = 1 / a_n. In the example, 2.882.88.
  • Nucleotide diversity (mean pairwise difference): wi=i(n−i)/(n2)w_i = i(n - i) / \binom{n}{2}. In the example, (1⋅4⋅3+2⋅3⋅2+3⋅2⋅1)/10=3(1 \cdot 4 \cdot 3 + 2 \cdot 3 \cdot 2 + 3 \cdot 2 \cdot 1)/10 = 3.
  • The singleton count ξ1\xi_1 alone: w1=1w_1 = 1, wi=0w_i = 0 otherwise.

Tajima's D is a scaled difference of the first two. A model that does not fit the neutral expectation (growth, a sweep, structure) changes the shape of the spectrum, and such statistics measure the change in different directions.

Non-examples.

  • A site where all nn sequences carry the derived allele is a fixed difference from the outgroup, not a segregating site. It has no entry ξn\xi_n. The McDonald-Kreitman test counts such sites separately.
  • A site with three alleles has no place in ξ\xi. It cannot occur under the infinite sites model; real data sets drop such sites or split them.
  • A vector of allele frequencies in the whole population is not the SFS of a sample: the SFS depends on nn, and ξi\xi_i for n=10n = 10 and for n=20n = 20 are different quantities.
  • A spectrum from data with unknown ancestral states must not be read as unfolded. Polarizing by an outgroup that has its own mutations flips some sites from ii to n−in - i and creates false high-frequency derived variants.
  • Segregating sites S=∑iξiS = \sum_i \xi_i; see infinite sites model.
  • Joint SFS. For samples from two or more populations, the array of counts of sites with ii derived copies in the first sample and jj in the second. It carries information about divergence times and migration that the SFS of one population does not.
  • Allele frequency. The population frequency of the derived allele at one site; see allele frequency. The SFS is the distribution of the sample version over sites.
  • Expected SFS under other models. Population growth adds singletons (E[ξ1]E[\xi_1] grows relative to θ\theta), a bottleneck can remove them, and a selective sweep adds both rare and high-frequency derived variants. Many demographic inference programs fit the expected spectrum of a model to the observed one. Coalescent simulation gives the expected spectrum of a model when no formula is known.

References

  1. Yun-Xin Fu, Statistical properties of segregating sites, Theoretical Population Biology 48(2), 1995, pp. 172-197 (the expected number of segregating sites of each frequency class, theta / i, and their covariances)
  2. John Wakeley, Coalescent Theory, An Introduction, Roberts and Company, 2009, Chapter 4 (the site frequency spectrum under the infinite-sites model)
  3. Fumio Tajima, Statistical method for testing the neutral mutation hypothesis by DNA polymorphism, Genetics 123(3), 1989, pp. 585-595 (a test that compares two estimators of theta, both linear in the spectrum)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/D8B6H3/text.yaml