Skip to main content
Genetics logoLink to Genetics
. 2012 Dec;192(4):1477–1482. doi: 10.1534/genetics.112.145367

Genomic Tests of Variation in Inbreeding Among Individuals and Among Chromosomes

Joshua G Schraiber 1, Stephannie Shih 1, Montgomery Slatkin 1,1
PMCID: PMC3512152  PMID: 23051641

Abstract

We examine the distribution of heterozygous sites in nine European and nine Yoruban individuals whose genomic sequences were made publicly available by Complete Genomics. We show that it is possible to obtain detailed information about inbreeding when a relatively small set of whole-genome sequences is available. Rather than focus on testing for deviations from Hardy–Weinberg genotype frequencies at each site, we analyze the entire distribution of heterozygotes conditioned on the number of copies of the derived (non-chimpanzee) allele. Using Levene’s exact test, we reject Hardy–Weinberg in both populations. We generalized Levene’s distribution to obtain the exact distribution of the number of heterozygous individuals given that every individual has the same inbreeding coefficient, F. We estimated F to be 0.0026 in Europeans and 0.0005 in Yorubans, but we could also reject the hypothesis that F was the same in each individual. We used a composite-likelihood method to estimate F in each individual and within each chromosome. Variation in F across chromosomes within individuals was too large to be consistent with sampling effects alone. Furthermore, estimates of F for each chromosome in different populations were not correlated. Our results show how detailed comparisons of population genomic data can be made to theoretical predictions. The application of methods to the Complete Genomics data set shows that the extent of apparent inbreeding varies across chromosomes and across individuals, and estimates of inbreeding coefficients are subject to unexpected levels of variation, which might be partly accounted for by selection.

Keywords: exact test of Hardy–Weinberg, Levine distribution, Complete Genomics, Hardy–Weinberg frequencies


DEVIATIONS from Hardy–Weinberg genotypes frequencies (HWF) can have many causes, including population subdivision, natural selection, assortative mating by phenotype, consanguineous mating, or the avoidance of consanguineous mating. In general, population subdivision and either inbreeding or inbreeding avoidance will affect the whole genome while selection and assortative mating will affect only those loci associated with particular phenotypes. Methods for testing for genome-wide and local deviations from HWF are useful for detecting these processes and for detecting evidence of inbreeding depression resulting from excess homozygosity (Charlesworth and Willis 2009). In this article, we develop and apply methods for using whole-genome sequences to detect small deviations from HWF, both locally and globally, and compare detailed theoretical predictions with publically available sequence data for two human populations. Even small deviations from HWF are detectable at individual loci if sample sizes are large enough. Several methods for testing for deviations from HWF have been developed and tested extensively (reviewed by Weir 1996, Chap. 3). The availability of whole-genome sequences from several individuals creates the opportunity to detect systematic deviations from HWF even if sample sizes are small.

In this article, we show that the distribution of the number of heterozygous individuals, stratified by the number of copies of the derived (i.e., non-chimpanzee) allele, indicates significant deviations from HWF. To illustrate the utility of our approach, we examine two sets of nine genomic sequences made available by Complete Genomics (CG) (http://www.completegenomics.com/public-data/). These are high-coverage sequences (51×–89×). The error rate for the methodology used is reported to be low (1 miscalled variant per 100 kb) (Drmanac et al. 2010). We compare the distribution of the number of heterozygous sites with the expectations based on the exact distribution derived by Levene (1949) and show that we can reject HWF in both data sets. We then test whether we can fit a model in which each individual is inbred to the same extent and reject that model also. Next, we show that there are small but significant differences in the estimated inbreeding coefficient across individuals. Even with that assumption, however, there is more variation in the estimated inbreeding coefficients for different chromosomes than is consistent with sampling effects. We conclude that simple theoretical models do not fit the data closely and that there are additional sources of variation in estimated inbreeding coefficients across chromosomes that are unaccounted for by simple models. We find that in one of the two populations (CEU) there is a slight effect of distance from coding genes, suggesting a subtle role for selection. High-quality genomic sequences provide a detailed picture of deviations from HWF that warrant further exploration.

Data

We downloaded the VCF file containing 54 unrelated individuals from Complete Genomics. We did not use any cutoff for minor allele frequencies but we did filter out all triallelic sites. Although we restricted our later analyses to the 18 individuals in the CEU and YRI populations (9 in each), we used the larger data set to filter out sites whose genotypes appeared to be the result of alignment errors of duplicated regions. Such regions would be expected to create sites that are apparently heterozygous in every or nearly every individual, thus creating artifactual deviations from HWF. Supporting information, Figure S1 shows the distribution of the number of heterozygous individuals in the whole data set and Figure S1 focuses on sites with large numbers of heterozygous sites. There is an excess of sites where all 54 individuals are heterozygous. We chose to restrict to sites at which <49 of 54 individuals were heterozygous. Using other cutoff values did not significantly change our results.

Expectation with No Inbreeding

We assume that a sample of n diploid individuals from a population has been genotyped. Each polymorphic site is characterized by i, the number of copies of the derived (i.e., non-chimpanzee) allele, i = 1, …, 2n–1. Levene (1949) showed that in a randomly mating population, conditional on i and n, the probability distribution of h, the number of heterozygous individuals, is

P(h;i,n)=Pr(h|i,n)=i!(2ni)!(2n)!2hn!((ih)/2)!h!((2nih)/2)!. (1)

P(h; i, n) is unchanged if i is replaced by 2ni. The value of i constrains the possible values of h: h can take only even values if i is even and only odd values if i is odd, and h ≤ min(i, 2ni).

Emigh (1980) compares an exact test of random mating (Haldane 1954) based on Equation 1 with other tests. Smith (1970) and Mantel and Li (1974) have also explored the utility of the exact test.

Equation 1 can be derived from a balls-and-boxes argument (Haldane 1954). There are n boxes (individuals) and 2n balls (alleles) to be placed randomly in them, i white balls (derived alleles), and 2ni red balls (ancestral alleles). There are (2n)!/[i!(2ni)!] distinguishable arrangements of the balls. Let n2, n1 and n0 be the numbers of boxes with 2, 1, and 0 white balls: (n2 + n1 + n0 = n). Note that n1 = h, n2 = (jh)/2 and n0 = (2njh)/2 in the notation in Equation 1. Given n2, n1, and n0, there are in 2n1n!/(n2!n1!n0!) distinguishable ways to assign pairs of balls to the n boxes. A factor of 2 is needed for each box containing 1 red and 1 white ball because they can be arranged in two ways. Equation 1 is the second number divided by the first.

Single Inbreeding Coefficient

We next compare the empirical distribution of h with the distribution expected if every individual has the same positive inbreeding coefficient, F. We derive that distribution from Equation 1 by assuming that, at each polymorphic site, each individual has a probability F of being identical by descent (i.b.d.) and a probability 1 – F of not being i.b.d. If an individual is i.b.d., we assume it is homozygous at that site. That is, we assume that identity by descent is equivalent to identity in state. The number of individuals that are potentially heterozygous at that site is the difference between n and the number that are i.b.d. This derivation does not allow for negative values of F, which would indicate a significant excess of heterozygotes. Assuming a single positive F for each individual is appropriate when an excess of homozygotes is the result of the mixing of two or more subpopulations (the Wahlund effect).

We assume the distribution of the number of individuals j who are i.b.d. at a site is binomially distributed. If i is even, then that distribution has sample size n and probability F. If i is odd, then at least one individual is not i.b.d. because there has to be at least one heterozygous site. In that case, the distribution of j is binomial with sample size n – 1 and probability F. These two cases can be combined by defining n=n if i is even and n=n1 if i is odd:

Pr(j|n,F)=(nj)Fj(1F)nj. (2)

Given j, the number k of individuals who are homozygous for the derived allele because they are i.b.d. has a hypergeometric distribution

Pr(k|j,i,n)=[(i/2k)(ni/2jk)]/(nj), (3)

Where i=i if i is even and i=i1 if i is odd. The logic is that there are i′/2 pairs of derived alleles available to be drawn with replacement from n′ pairs.

Given j and k, the probability that there are h individuals heterozygous at the site has the distribution given by Equation 1 with n = nj and j = j – 2k. Therefore, summing over j and k yields

Pr(h|i,n,F)=j=0nk=0jP(h,i2k,nj)Pr(j|F,n)Pr(k|j,i,n). (4)

If F = 0, Equation 4 reduces to Equation 1 because the last two probabilities are 0 except for j = k = 0.

To use Equation 4 as a likelihood for each i, we replace n by ni, the observed number of sites at which there are i derived alleles, and h by hi, the number of those sites that are heterozygous. It is then straightforward to obtain the maximum-likelihood estimate (MLE) of F for that i, F^i. An alternative is to assume the same value of F for all i. In that case, the likelihoods from Equation 4 as a function of F for each i are multiplied to obtain an overall likelihood of F, from which the MLE is computed. To test whether a single F is appropriate for all i, we used a likelihood ratio test of the hypothesis that all F^i are equal. Allowing for F to depend on i lets us test whether lower frequency-derived alleles, which will be younger on average, indicate different levels of deviation from HWF, something that would possibly indicate the effects of selection.

We computed the empirical distribution of h for the CG data for both populations, as well as the expectations under the model with no inbreeding, the model with a single F for all individuals, and the model with a different F for each i (2 ≤ i ≤ 16). Table S1a and Table S1b show the results summarized for the nine European (CEU) and nine Yoruban (YRI) individuals. When fitting a single F to all allele frequencies, we find F^ = 0.0026 in CEU and F^ = 0.0005 in YRI. These results suggest there is possibly a small Wahlund effect in CEU data but much less so in the YRI data.

We performed a likelihood ratio test to determine whether assuming a different Fi for each i fit the data better than a single F for all i. In both the CEU and YRI populations the tests were highly significant: the likelihood ratios were 566 (P = 0.0) and 188 (P = 0.0), respectively with 14 d.f.

Once we computed the best fit of F^ under each model, we used a multinomial likelihood ratio test to determine if the expected frequencies fit the data. Briefly, let πi = (πi0, πi1, …, πin) be the vector of the expected fraction of sites with i copies of the derived allele that have h = 0, 1, …, n heterozygotes under a given model, pi = (pi0, pi1, , pin) be the observed fraction of sites with i copies of the derived allele that have 0, 1, …, n heterozygotes, and hi = (hi0, hi1, , hin) be the observed count of sites with i copies of the derived allele that have 0, 1, …, n heterozygotes. We computed the test statistic

Λ=2i=22n2j=0nhijlog(πij/pij). (5)

To compute P-values, we used a parametric bootstrap (Kunsch 1989). In the CEU population, this results in Λ of 2165.685, 1854.912, and 1288.163 for the models that assume F = 0, Fi=F for all i, and Fi not constrained to be equal respectively. These all correspond to P ≈ 0. In the YRI, the values of Λ are 773.375, 757.5121, and 568.4466, respectively, each corresponding to P ≈ 0. Thus, even allowing for a different F for each i, the data are not consistent with the assumption that the inbreeding coefficient is the same in each individual.

Individual-Specific Inbreeding Coefficients

We next allow each individual to have a different inbreeding coefficient. Let Fj be the inbreeding coefficient for individual j (j = 1,…, n). It is possible in principle to find the MLE of the set (F1, …, Fn), given i (the number of copies of the derived allele) and (h1,…, hn), where hj=(hj1, hj2, , hjL) in which hjl = 1 if individual j is heterozygous at site l and 0 otherwise. It is computationally difficult, however, to compute the exact likelihood of the F’s given the data. Instead we compute the composite likelihood obtained by assuming that each individual’s heterozygosity is determined independently:

Pr(h1,h2,,hn|F1,F2,,Fn,i)=j=1nl=1LPr(hjl=1|Fj,il)hjl(1Pr(hjl=1|Fj,il))1hjl, (6)

where L is the number of polymorphic sites and

Pr(hj=1|Fj,i)=(1Fj)i(2ni)n(2n1). (7)

In Equation 7, Fj may be negative. Its lower limit is constrained by i and n, however, because the right-hand side has to be <1.

Assuming independence of individuals, we can obtain the MLE Fj for each from Equations 6 and 7. We used a block jackknife (Kunsch 1989) with 5-Mb block sizes to compute standard errors on the estimates of Fj. Briefly, we broke the genome up into 5-Mb blocks and computed jackknife replicates by removing each block one at a time and finding the MLE of Fj for the rest of the genome. The results are summarized in Table 1. By the theory of the jackknife, the estimate of Fj divided by its standard error is normally distributed with 1 SD (Kunsch 1989). We first performed a two-sided Z-test of the hypothesis that Fj = 0 for each j. All individuals except for one YRI sample strongly rejected Fj = 0. Next, we tested for heterogeneity between individuals in their estimated Fj. If two individuals have equal Fj, the difference in their estimated Fj should be normally distributed with variance equal to the sum of their squared standard errors. We therefore performed a two-sided test of the null hypothesis that the difference was equal to 0 for every pair of individuals. In the CEU, the P-values ranged from 0 to 0.38, while in YRI the P-values ranged from 0 to 0.84.

Table 1 . Composite likelihood estimates of F for each individual.

Individual Population F SE p(F = 0)
NA06985 CEU 0.002899 0.000231 4.89 × 10−36
NA06994 CEU 0.001816 0.000232 7.22 × 10−15
NA07357 CEU 0.005715 0.000230 2.08 × 10−38
NA10851 CEU 0.009451 0.000235 0.0
NA12004 CEU −0.009265 0.000232 0.0
NA12889 CEU −0.001092 0.000242 6.17 × 10−6
NA12890 CEU −0.002710 0.000242 4.10 × 10−29
NA12891 CEU 0.007769 0.000237 6.76 × 10−235
NA12892 CEU −0.000785 0.000253 0.0019
NA18501 YRI −0.000013 0.000182 0.944
NA18502 YRI 0.005057 0.000167 7.22 × 10−202
NA18504 YRI 0.002068 0.000160 2.79 × 10−38
NA18505 YRI −0.000609 0.000159 0.00012
NA18508 YRI −0.010578 0.000151 0.0
NA18517 YRI 0.005012 0.000158 6.57 × 10−220
NA19129 YRI 0.007051 0.000158 0.0
NA19238 YRI 0.001575 0.000157 9.25 × 10−24
NA19239 YRI −0.002547 0.000159 6.74 × 10−58

The standard error was obtained from the block jackknife analysis described in the text. The P-value was obtained assuming a normal distribution of estimates.

Our likelihood method for estimating F for each individual differs from the method-of-moments estimator implemented in the widely used program package PLINK (Purcell et al. 2007). PLINK estimates F by equating the number of homozygous sites in an individual to nF+(1F)(i=1L2pi(1pi)) and solving for F, where L is the number of polymorphic sites in each individual and pi is the allele frequency at the ith site. We implemented this method and found a high correlation between estimated F’s for each individual (Spearman’s ρ = 0.96). The MLE estimates did not tend to be larger than the method-of-moments estimates (Wilcoxon test: P = 0.86 for YRI, P = 1 for CEU). Figure S2 compares the estimates of F obtained using the two methods. Keller et al. (2011) found that estimates of individual F based on runs of homozygosity (ROH) were somewhat better than estimates obtained from PLINK for the purpose of detecting inbreeding depression in apparently outbred populations. We did not attempt to implement the Keller et al. ROH method because it was developed for SNP data, not sequence data of the type we analyzed.

Variation Among Chromosomes

For each individual, we estimated Fj separately for each chromosome. Figure 1 shows the results summarized for both populations. We tested whether there is more variation between chromosomes within each individual than can be accounted for by random sampling from that individual’s genomic background. For a chromosome with L polymorphic loci, we sampled each site by first sampling its allele frequency from the frequency spectrum and then sampling the status of that site (heterozygous or homozygous) from the individual’s background frequency of heterozygous sites for sites with the given allele frequency. We then inferred the F that fit the bootstrapped data best. We performed this test 10000 times for each chromosome in each individual; P-values are shown in Table S2a and Table S2b. Each population had 198 hypothesis tests, and after a Bonferroni correction we found that 141 and 132 tests were significant at the 0.05 level in the CEU and YRI populations, respectively. As shown, there is substantial variation among the median estimates for each chromosome. Furthermore, median estimates of F per chromosome were not correlated between CEU and YRI (Figure 2), thus ruling out the possibility that there are chromosome-specific factors contributing to the variation among chromosomes we detected.

Figure 1 .

Figure 1 

Boxplots of estimates of F for each chromosome in both CEU and YRI samples. The top row shows data from the CEU population and the bottom row shows data from the YRI population. The left column shows variation within individuals across chromosomes (individuals 1 through 9 are CEU, and 10 through 18 are YRI), while the right column shows variation within chromosome across individuals.

Figure 2 .

Figure 2 

Scatter plot of median values of F for each chromosome in each population. Numbers in the plot indicate the chromosome (1 through 22). The slope of a best-fit line using major axis regression is not significantly different from 0 (P = 0.64).

Distance from Genes

We tested whether there is an effect of the distance from coding sequences on the extent of deviation from HWF. We stratified sites depending on whether they are more or less than 5 kb from the beginning or end of an annotated coding region and computed the MLE of F for each individual and each i. We did this by creating an artificial chromosome made by concatenating all regions that are within 5 kb from genes (or respectively 5 kb away from genes) and computing the likelihood using Equation 4 assuming the same F for each i. The values shown in Table 2 are the maximum-likelihood estimates of F. We performed a likelihood ratio test of whether there is a significant effect of stratifying by distance from genes. There is for CEU (P = 3 × 10−6) but not for YRI (P = 1). Thus, there is some evidence that selection might be contributing to variation in the apparent inbreeding coefficients.

Table 2. Values of F estimated for sites stratified by whether they were closer or farther than 5 kb from the nearest gene.

Distance from genes (kb) CEU YRI
<5 0.0036 0.00035
>5 0.0023 0.00043

Sequencing Error

Although the error rate in the CG data are low, it is not zero. As long as the probability of sequencing error is independent of whether the error is at a site that is actually heterozygous or homozygous, sequencing error will cause the estimated F to be closer to zero than it actually is. Thus, if the true F is slightly positive, the apparent F will be somewhat smaller. The reason is that the Levene distribution (Equation 1) is derived under the assumption of equally probable configurations of alleles in n pairs. Randomly relabeling alleles because of sequencing error will not disturb the underlying randomness of the configurations but the apparent number of sites with each i will differ from the actual number. Therefore, if the actual distributions of h for each i fit the Levene distribution, the apparent distribution for each i will also fit. What will change is the frequency spectrum, i.e., the numbers of sites with different i.

If F is not zero and the probability of sequencing error does not depend on whether a site is homozygous or heterozygous, then the additional randomness introduced by sequencing error will tend to reduce F slightly because it will tend to restore randomness. Therefore sequencing error of this type will cause estimates of F to be slightly too small, with the difference between the apparent and true values being proportional to the error rate.

If the probability of sequencing error does depend on whether a site is heterozygous or homozygous, then the effect of sequencing error on estimates of F depends on whether there is a greater tendency to create homozygous or heterozygous sites. We have no information about the error structure of the CG data so we did not attempt to compensate for errors of different kinds.

Discussion and Conclusion

We have shown that it is possible to test for deviations from HWF and to quantify those deviations when high-quality genome sequences are available for a relatively small number of individuals. We show that a detailed examination of the numbers of heterozygous sites allows us to test hypotheses that are not testable when only small numbers of polymorphic loci are examined. In particular, we can test whether the apparent inbreeding depends on the frequency of the derived allele or on the distance to coding sequence, and we can test for chromosome-specific or individual-specific differences. Finding dependence on allele frequency or distance to coding sequence indicates that selection might interact with deviations from HWF. Finding differences among individuals provides a way to test for subtle inbreeding depression (Keller et al. 2011).

We used the exact distribution of heterozygous sites conditioned on the number of copies of the derived allele at each polymorphic site, to test for a fit to HWF and to estimate inbreeding coefficients, both for the set of individuals considered together and for each individual separately. We applied our method to sequences of nine individuals from each of two populations, Europeans and Yorbans. We found that neither population fits HWF but that the deviation was slightly greater in Europeans than in Yorubans. We also found that inbreeding coefficients estimated for each individual differ significantly. In Europeans, but not in Yorubans, there was a significant effect of distance from coding sequence, suggesting a role for selection.

Although the overall fit of the theory to the data is quite good, there are still unexplained sources of variation. Although variation in the inbreeding coefficient among individuals is to be expected because mating is not perfectly random even in a well-mixed population, some of the differences in inbreeding coefficient may reflect past population substructure. Variation in the inbreeding coefficients among chromosomes is more difficult to account for. In humans, linkage disequilibrium decays on a scale of a few hundred kilobases (Reich et al. 2001), making it unlikely that differences among chromosomes reflect accidental correlations in the ancestries of different chromosomes.

It seems unlikely that sequencing error would be an important cause of variation among chromosomes. The sequence data we used was based on 51×–89× coverage, which implies a low error rate. Our analysis was of polymorphic sites that had between 2 and 16 copies of the derived nucleotide in 9 individuals. Sequencing errors that created an apparently single polymorphic nucleotide would have no effect. Sequencing errors at sites that were already polymorphic would have to create an additional copy of a nucleotide that was already present, because we ignored sites at which three or four nucleotides were present. As discussed above, sequencing error that is independent of whether a site is heterozygous or homozygous will tend to reduce F slightly, making our estimates somewhat conservative. Only if sequencing error had a strong tendency to create an excess of homozygous sites would our estimates of F be too large.

We conclude that high-quality genome sequences permit detailed examination of the fit to HWF. Although the fit to expectations is good when inbreeding coefficients are different for different individuals, there are still deviations from expectations that are not accounted for.

Software Resources

We have posted the script used to carry out the analysis described in this article at http://cteg.berkeley.edu/software.html.

Supplementary Material

Supporting Information

Acknowledgments

This research was supported in part by Training Grant T32-HG00047 and National Institutes of Health Grant R01-GM40282 to M.S.

Footnotes

Communicating editor: N. A. Rosenberg

Literature Cited

  1. Charlesworth D., Willis J. H., 2009.  The genetics of inbreeding depression. Nat. Rev. Genet. 10: 783–796 [DOI] [PubMed] [Google Scholar]
  2. Drmanac R., Sparks A. B., Callow M. J., Halpern A. L., Burns N. L., et al. , 2010.  Human genome sequencing using unchained base reads on self-assembling DNA nanoarrays. Science 327: 78–81 [DOI] [PubMed] [Google Scholar]
  3. Emigh T. H., 1980.  A comparison of tests for Hardy–Weinberg equilibrium. Biometrics 36: 627–642 [PubMed] [Google Scholar]
  4. Haldane J. B. S., 1954.  An exact test for randomness of mating. J. Genet. 52: 631–635 [Google Scholar]
  5. Keller M. C., Visscher P. M., Goddard M. E., 2011.  Quantification of inbreeding due to distant ancestors and its detection using dense single nucleotide polymorphism data. Genetics 189: 237–249 [DOI] [PMC free article] [PubMed] [Google Scholar]
  6. Kunsch H. R., 1989.  The jackknife and the bootstrap for general stationary observations. Ann. Stat. 17: 1217–1241 [Google Scholar]
  7. Levene H., 1949.  On a matching problem arising in genetics. Ann. Math. Stat. 20: 91–94 [Google Scholar]
  8. Mantel N., Li C. C., 1974.  Estimation and testing of a measure of nonrandom mating. Ann. Hum. Genet. 37: 445–454 [DOI] [PubMed] [Google Scholar]
  9. Purcell S., Neale B., Todd-Brown K., Thomas L., Ferreira M. A. R., et al. , 2007.  PLINK: s tool set for whole-genome association and population-based linkage analyses. Am. J. Hum. Genet. 81: 559–575 [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Reich D. E., Cargill M., Bolk S., Ireland J., Sabeti P. C., et al. , 2001.  Linkage disequilibrium in the human genome. Nature 411: 199–204 [DOI] [PubMed] [Google Scholar]
  11. Smith C. A. B., 1970.  A note on testing the Hardy–Weinberg law. Ann. Hum. Genet. 33: 377–383 [Google Scholar]
  12. Weir B. S., 1996.  Genetic Data Analysis II. Sinauer, Sunderland, MA. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supporting Information

Articles from Genetics are provided here courtesy of Oxford University Press

RESOURCES