Abstract
Background
Detailed study of genetic variation at the population level in humans and other species is now possible due to the availability of large sets of single nucleotide polymorphism data. Alleles at two or more loci are said to be in linkage disequilibrium (LD) when they are correlated or statistically dependent. Current efforts to understand the genetic basis of complex phenotypes are based on the existence of such associations, making study of the extent and distribution of linkage disequilibrium central to this endeavour. The objective of this paper is to develop methods to study finescale patterns of allelic association using probabilistic graphical models.
Results
An efficient, lineartime forwardbackward algorithm is developed to estimate chromosomewide LD models by optimizing a penalized likelihood criterion, and a convenient way to display these models is described. To illustrate the methods they are applied to data obtained by genotyping 8341 pigs. It is found that roughly 20% of the porcine genome exhibits complex LD patterns, forming islands of relatively high genetic diversity.
Conclusions
The proposed algorithm is efficient and makes it feasible to estimate and visualize chromosomewide LD models on a routine basis.
Background
Alleles at two loci are said to be in linkage disequilibrium (LD) when they are correlated or statistically dependent. The term refers to the idea that in a large homogeneous population subject to random mating, recombination between two loci will cause any initial association between them to vanish over time. In observed data, however, nonzero allelic associations are pervasive, particularly at short distances, but also at long distances and even between chromosomes. These associations arise in a complex interplay between processes such as mutation, selection, genetic drift and population admixture, and are broken down by recombination. The patterns of association are of interest, partly because they underpin the relation of genotype to phenotype at the population level, and partly because they reflect population history.
Patterns of LD may be represented in different ways. A common method is to display pairwise measures of LD as triangular heatmaps [1,2]: in these displays, LD blocks (genomic intervals within which all loci are in high LD) stand out clearly. Early work in the HapMap project led researchers to hypothesize that the human genome consists of a series of disjoint blocks, within which there is high LD, low haplotype diversity and little recombination, and that are punctuated by short regions with high recombination (recombination hotspots) [36]. Subsequently various authors [7,8] reported that genetic variation follows more complex patterns, for which richer models are required.
Discrete graphical models [9] (also known as discrete Markov networks) provide a rich family of statistical models to describe the distribution of multivariate discrete data. They may be represented as undirected graphs in which the nodes represent variables (here, SNPs) and absent edges represent conditional independence relations, in the sense that two variables that are not connected by an edge are conditionally independent given some other variables. To motivate this focus on conditional rather than marginal associations, consider three loci , and suppose that initially s_{2} is polymorphic and s_{1} and s_{2} monomorphic, so that two haplotypes (1,1,1) and (1,2,1) are initially present. Suppose further that a mutation subsequently occurs at s_{1} in the haplotype (1,1,1), and another at s_{3} in the haplotype (1,2,1), so that the population now contains the four haplotypes (1,1,1), (1,2,1), (2,1,1) and (1,2,2). Observe that in general s_{1} and s_{3} are marginally associated (are in LD), but in the subpopulations corresponding to s_{2}=1 and s_{2}=2 they are unassociated: in other words, they are conditionally independent given s_{2}. More complex mutation histories give rise to more complex patterns of conditional independences that can be represented as graphical models [8].
Other authors have used graphical models for the joint distributions of allele frequencies. Usually, in highdimensional applications, attention is restricted to a tractable subclass, the decomposable graphical models [10]. In the first use of decomposable models in this context [11], models were selected using a greedy algorithm based on significance tests. In [8,12] methods and programs for selecting decomposable graphical models using Monte Carlo Markov Chain (MCMC) sampling were described. These methods are computationally feasible for modest numbers of markers (say, several hundreds), but not for modern SNP arrays with hundreds of thousands of SNPs per chromosome. To improve efficiency, the search space may be restricted to graphical models whose dependence graphs are interval graphs[13,14]. These are graphs for which each vertex may be associated with an interval of the real line such that two vertices are connected by an edge if and only if their intervals overlap. In this context the ordering of SNPs along the real line is their physical ordering along the chromosome. MCMC sampling from this model class may be performed more efficiently [13,14]. This work was extended in [15] to a more general subclass of decomposable models, namely those in which distant marker pairs (i.e., with more than a given number of intervening markers) are conditionally independent given the intervening markers.
In an alternative approach [1618] latent mixtures of forests have been applied, in order to accommodate short, medium and longrange LD patterns. Also directed graphs (Bayesian networks) have been applied, selecting edges and their directions using causal discovery algorithms [19]. There are close links between decomposable models and Bayesian networks ([10], Sect. 4.5.1).
A rather different approach to modelling the joint distribution of allele frequencies [20,21] is implemented in the software package BEAGLE [22], which is widely used to process data from SNP arrays. The approach is based on a class of models arising in the machine learning literature called acyclic probabilistic finite automata (APFA) [23]. These are related to timevariant variable length Markov chains. For phase estimation and imputation BEAGLE uses an iterative scheme analogous to the EM algorithm, alternating between sampling from a haplotypelevel model given the observed genotype data (the Estep) and selecting a haplotypelevel model given the samples (the Mstep). A similar computational scheme for decomposable graphical models has been described and implemented in the FitGMLD program [15].
Characterization of genetic variation at the population level is of fundamental importance to understanding how phenotypes relate to genotypes. Some specific uses to which joint models for allele frequencies have been put include
1. Insight into the population history of different genomic intervals. Under simplifying assumptions, the ancestral history of a short genomic interval can be reconstructed from a decomposable graphical model for the SNPs in the interval [8].
2. Quality control of genome assembly, in that some motifs may suggest errors in SNP positioning.
3. Phase estimation and imputation as described above [15,21].
4. Derivation of more informative covariates involving multiple loci to plug into genomic prediction models [20].
5. Use in pedigree simulation to model LD in founders, for example in connection with gene drop simulation [14] and assessment of SNP streak statistics [24].
In this paper decomposable graphical models are used to model finescale, local LD patterns. By local is meant that the proposed methods are designed to capture shortrange associations between loci, but not long range ones. The same is true of other approaches [1315] mentioned above. Here, an efficient, lineartime algorithm is developed to select a model using a penalized likelihood criterion, and it is shown how such a model may conveniently be displayed, allowing finescale LD structure to be visualized.
Methods
Graphs and graphical models
The following notation and terminology is mainly based on [9]. A graph is defined as a pair , where V is a set of vertices or nodes and E is a set of edges. Each edge is associated with a pair of nodes, its endpoints. Here only undirected graphs are considered, that is, with graphs undirected edges only. Two vertices α and β are said to be adjacent, written α∼β, if there is an edge between them. The neighbours of a vertex is the set of nodes that are adjacent to it. A subset A⊆V is complete if all vertex pairs in A are connected by an edge. A clique is a maximal complete subset, that is to say, a complete subset that is not contained in a larger complete subset.
A path (of length n) between vertices α and β in an undirected graph is a set of vertices where α_{i−1}∼α_{i} for . If a path has α=β then the path is said to be a cycle of length n. If a cycle has adjacent elements α_{i}∼α_{j} with j∉{i−1,i+1} then it is said to have a chord. If it has no chords it is said to be chordless. A graph with no chordless cycles of length ≥4 is called triangulated or chordal.
A subset D⊂V in an undirected graph is said to separateA⊂V from B⊂V if every path between a vertex in A and a vertex in B contains a vertex from D. The graph is said to be a subgraph of if V_{0}⊆V and E_{0}⊆E. For A⊆V, let E_{A} denote the set of edges in E between vertices in A. Then is the subgraph induced byA.
The boundary bd(A) of a vertex set A⊆V is the set of vertices adjacent to a vertex in A but not in A, that is ,.
Let be an undirected graph with cliques . Consider a joint density f() of the variables in V. If this admits a factorization of the form
for some functions where g_{j}() depends on x only through then f() is said to factorize according to . If all the densities in a model factorize according to , then the model is said to be Markov. When this is true encodes the conditional independence structure of the model, through the following result (the global Markov property): whenever sets A and B are separated by a set C in , A and B are conditionally independent given C under the model. This is written as A⊥ ⊥B  C. A decomposable graphical model is one whose dependence graph is triangulated.
Selecting graphical models for chromosomewide LD
Suppose that N observations of p SNPs from the same chromosome are sampled from some population. The variable set is written , and it is assumed that these are ordered by physical position on the chromosome. The variables may be either observed genotypes or inferred haplotypes, if these have been imputed: the former are trichotomous and the latter binary. Here an algorithm to use these data to select a graphical model for the distribution of V is described. It is based on a penalized likelihood criterion
where is the maximized loglikelihood under , is the number of free parameters under , and α is a penalization constant. For the AIC, α=2 and for the BIC, α= log(N). The latter penalizes complex models more heavily and so selects simpler models. Under suitable regularity conditions, the BIC is consistent in the sense that for large N it will select the simplest model consistent with the data ([25], Sect. 2.6).
A technical but nonetheless important point is that calculation of the correct model dimension is not straightforward for highdimensional models, since not all parameters may be estimable. A simple expression exists however for the difference in model dimension between two decomposable models that differ by a single edge ([10], pp. 3740). This is useful when the search space is restricted to decomposable models and the search algorithm only involves comparison of models differing by single edges (as here).
A forwardbackward approach to estimate the graphical model for V is used. The first (forward) step is based on a greedy forward search algorithm. To take account of the physical ordering of the SNPs, the algorithm starts from a model where E_{0} is the set of edges between physically adjacent SNPs: this model is called the skeleton. To seek the minimum BIC (or AIC) model, the algorithm repeatedly adds the edge associated with the greatest reduction in BIC (AIC): only edges whose inclusion results in a decomposable model are considered. The process continues until no more edges improve the criterion. The search space in this step is the class of decomposable models that include the skeleton. Note that this algorithm – as with almost all greedy algorithms — is not guaranteed to find the global optimum.
There are several advantages to initially constraining the search space to include the skeleton. An unconstrained search starting off from the null model (with no edges) would not take the physical ordering into account. Since the graphs considered are consistent with this ordering, they are conveniently displayed as LD maps, as illustrated below. Because decomposable models contain no chordless cycles of length ≥4, two distal loci cannot be linked by an edge unless there are sufficiently many intermediate (chordal) edges to prevent the occurrence of such cycles. Thus the algorithm proceeds by filling out around the skeleton by incrementally adding edges. The effect of this is that only local LD is modelled. Since both association and (implicitly) proximity are required, the edges included are more likely to be for real (that is, less likely to be due to chance), so in this sense the model selection process is more reliable. In addition, restricting the search space in this way improves computational efficiency. The lineartime algorithm described in the following section also builds on the physical vertex ordering.
In the second (backward) step the graph found in the first step is pruned, again using a greedy algorithm that seeks to minimize the BIC (AIC) criterion by removing edges, without requiring that the skeletal edges are retained. Keeping these in the model would be appropriate if adjacent SNPs are in high LD, but this is not always the case. For example, there may be recombination hotspots, or genome assembly errors may have led to errors in positioning the SNPs. The graphs may be used to examine whether this has occurred.
To display the resulting graph, a suitable graph layout is needed. After some experimentation, one such was obtained by modifying the horizontal dot layout in Rgraphviz [26], by exponentially smoothing the ycoordinates and replacing the xcoordinates with the SNPnumber. In this way the ycoordinates are chosen so as to clarify the graphical structure: a consequence of this is that nodes with large absolute ycoordinates tend to signal genomic regions of high structural complexity.
For some purposes it is helpful to use more objective measures of complexity, and two such measures are used here. Consider a chromosome with p SNPs. For each , the heighth_{i} of the interval between SNPs i and i+1 is defined to be the number of edges of the form (j,k), where j≤i and i+1≤k, and the widthw_{i} is defined to be the maximum value of k−j of such edges. Note that by the global Markov property, when h_{i}=0 or equivalently w_{i}=0, the SNPs V_{≤i}={v_{j}:j≤i} are independent of V_{>i}={v_{j}:j>i}. Similarly, when h_{i}=1 or equivalently w_{i}=1, V_{<i}⊥⊥V_{>i}v_{i}.
As a measure of haplotype diversity, the entropy[27] is used here. Suppose that in some genomic interval there are k distinct haplotypes with relative frequencies . Then the entropy is defined as . It is large when there are many distinct haplotypes that are equally frequent.
A useful way to display marker data over short genomic intervals is the sample tree[23]. This summarizes a set of discrete longitudinal data of the form for . A rooted tree is constructed in which the nonroot nodes represent partial outcomes of the form for k≤q present in the sample data. Edges may be coloured with the marker value and labelled with the corresponding sample counts, or drawn with width proportional to the sample counts.
A fast selection algorithm
For highdimensional models, the first step of the algorithm described above can be computationally demanding. To address this a much faster algorithm for the same task is now described. This involves combining a series of overlapping marginal models of lower dimension. Call the block length (model dimension) L and the overlap K. Thus the first block is , the second is and so on. In the applications described here L=100 and K=20 are used.
Suppose that the true model for is , and that is the estimate of obtained by performing the first step of the algorithm described in the previous section. The goal is to construct an approximation to by combining models obtained by applying that same algorithm to blocks V_{i} for .
A way to construct a model for V_{1}∪V_{2} by combining and is now described. Let . Then is defined as , where and .
The rationale for this is that marginal models may include spurious associations on the boundaries. For example, let and be the subgraphs of induced by V_{1} and V_{2}, respectively. Then the marginal distribution of V_{2} will not in general be Markov, but it will be Markov for a graph derived from by completing the boundary of each connected component of in [28]. So will tend to contain edges not in . To estimate the boundary of V_{1}∖V_{2} in , is used: the boundary is estimated to be contained in the set . Hence by only including edges with w>m^{∗} edges in this boundary are omitted. Similarly, the boundary of V_{2}∖V_{1} in may contain spurious associations, so may contain unnecessary edges. To avoid this the overlap length K is chosen to be sufficiently large so that m^{∗}< min{v:∃ (v,w)∈E_{2} with w≥L+1}. If the maximum width was known in advance this inequality could be ensured by setting K to be twice the maximum width, but so large a value appears to be unnecessary in practice.
The algorithm proceeds in the obvious fashion combining with and so on. Since the construction may result in chordless cycles it is necessary to triangulate the resulting graph . This can be done using the maximum cardinality search algorithm [29] which can be implemented in linear time.
Assuming that the time for deriving the estimates for fixed L is bounded, the algorithm described here is by construction linear in p. But the proportionality constant can be expected to be depend on various factors, such as the density of the minimum AIC/BIC model.
Implementation
The methods are implemented in a set of R functions which are provided as Additional files 1 and 2 to the paper. The selection algorithms build on the forward search algorithm implemented in the stepw function in the gRapHD package [30]. Currently this function requires that there are no missing data. The backward search algorithm was developed by the author in the course of preparing this paper, and has subsequently been implemented in the gRapHD package. The functions to perform the selection algorithms, and others to work with and display the graphs, build on the following packages: igraph [31], graph [32], Rgraphviz [26] and gRapHD. The triangular heatmaps were produced using the LDheatmap package [33]. Simulation from a fitted decomposable model was carried out using the gRain package [34]. The package rJPSGCS provides an interface between R and the FitGMLD program which was used to perform the algorithm of [15].
Additional file 1. LDgraph. The R functions implementing the methods of the paper.
Format: R Size: 6KB Download file
Additional file 2. exampleScript. R code illustrating how the R functions may be used.
Format: R Size: 1KB Download file
Results
To illustrate the methods described above, they were applied to SNP data obtained from three commercial pig breeds. In all 4239, 1979 and 2123 pigs of the Duroc, Landrace and Yorkshire breeds were genotyped using the Illumina Porcine SNP60 BeadChip [35]. After preprocessing on the basis of call rate, minimal allele frequency and other quality criteria, missing values were imputed using BEAGLE [22]. Using the methods described above, decomposable graphical models were selected for each chromosome and breed, using data at the genotype level. The BIC penalizing constant α= log(N) was used throughout.
Figure 1 compares the running times of the two algorithms, and confirms that the fast algorithm is approximately linear in the number of SNPs. Table 1 gives more detailed information. It is seen that the estimate is indeed a good approximation to , and that the algorithm is considerably faster than the standard greedy algorithm.
Figure 1. Running times of the two algorithms. The running times (in minutes) of the forward step of the standard and fast algorithms for the different chromosomes and breeds are shown in (a) and (b), respectively.
Table 1. The performance of the two algorithms
Figure 2 shows the LD graph for one chromosome (Duroc chromosome 1): the same graph is obtained with both algorithms. It is a long thin graph with 2863 nodes and 4340 edges. It has 32 connected components, of which 20 are isolated vertices — suggesting SNP positioning errors — and four are long intervals with 997, 569, 786 and 452 SNPs. Curiously, the subgraph induced by the last 35 SNPs contains 7 connected components, which suggests positioning errors in this region. The most striking feature of the graph is that for about 80% of the chromosome, a simple serial or nearserial association structure is found, but for the remaining 20% more complex patterns of LD are observed. Similar results are found for all chromosomes and breeds.
Figure 2. The LD graph for Duroc chromosome 1. The estimated LD graph for chromosome, constructed using the unphased genotypes, is shown.
Genomic intervals with simple association structure tend to be associated with low haplotype diversity, and intervals with complex structure with high diversity (Figure 3). To further compare the low and high complexity regions, two representative intervals of the same length were selected: SNPs numbered 18001825 (low complexity), and SNPs numbered 24702495 (high complexity). These have sample entropies of 0.79 and 4.05, respectively. Their subgraphs are shown in Figure 4, and their sample trees in Figure 5. These show the low diversity of the low complexity interval, and the relatively high diversity of the high complexity interval. Corresponding triangular heatmaps are shown in Figures 6 and 7. The low complexity interval has high LD whereas the high complexity interval shows a more mosaic structure.
Figure 3. Entropy versus height and width for Duroc chromosome 1. In (a) a plot of median entropy, a measure of haplotype diversity, versus width for Duroc chromosome 1 is shown. In (b), a corresponding plot of median entropy versus height is shown. The entropy was calculated for each interval of 7 adjacent SNPs using the phased data.
Figure 4. The subgraphs of typical low and high complexity intervals. The subgraphs of a typical low complexity interval (SNPs 18001825) and high complexity interval (SNPs numbered 24702495) are shown in (a) and (b), respectively.
Figure 5. The sample tree for the low and high complexity intervals. Sample trees for the low and high complexity intervals are shown in (a) and (b), respectively. The trees are based on the phased haplotype data. The root node is drawn on the left. Edge widths are proportional to the numbers of observations passing through the edges. The colour of the edges signifies the allele: red is 1 and blue 2. It is seen that the interval shown in (a) has low haplotype diversity, dominated by a single common haplotype, whereas that shown in (b) has high haplotype diversity, with one or two relatively common haplotypes.
Figure 6. A triangular heatmap for the low complexity interval. A heatmap of the pairwise LD values in the low complexity interval is shown. All associations are high.
Figure 7. A triangular heatmap for the high complexity interval. A heatmap of the pairwise LD values in the high complexity interval is shown. The LD values form a mosaic of mostly low associations.
Thus low complexity regions tend to consist of series of haplotype blocks with high LD and low haplotype complexity, and may be dominated by a few common haplotypes. In contrast, regions of high complexity tend to have high haplotype diversity and little or no haplotype block structure. It must be stressed that the SNPs in such regions are not generally in linkage equilibrium: on the contrary, complex patterns of association, not marginal independences, are observed.
Figure 2 and Table 1 show the results of applying the algorithms to unphased, genotype data, but as mentioned above they may also be applied to phased haplotypelevel data. This implicitly regards the inferred haplotypes as a random sample of size 2N from an underlying population of haplotypes. Analyses based on inferred haplotypes may be subject to a loss of efficiency [36]. For the current data phase imputation was carried out using the BEAGLE software [22]: applying the fast algorithm to the phased data for Duroc chromosome 1 resulted in the graph shown in Figure 8. This is slightly denser than the graph in Figure 2, with 375 more edges. This may be ascribed to the reduced model dimension due to the use of binary rather than trichotomous variables, which leads to a weaker penalization of complex models in (1). Haplotype and genotypelevel graphical models are related but in general distinct: it has been shown that they are identical only when the haplotypelevel graph is acyclic [37].
Figure 8. The LD graph for Duroc chromosome 1 based on phased data. The estimated LD graph for Duroc chromosome 1, constructed using the phased haplotypes, is shown.
To assess the accuracy of the algorithm, twenty simulated data sets each with the same number of observations as the data sets analyzed above (N=4239) were constructed. The first ten were generated by taking N random samples from the skeleton, that is, the graphical model with edges between physically adjacent SNPs only, fitted to the Duroc chromosome 1 genotype data. The second ten were generated by taking N random samples from the model shown in Figure 2, fitted to the same data. The results of applying the fast algorithm to each data set are summarized in Table 2. For the skeleton, the edgewise false negative rate was 0.029 and the edgewise false inclusion rate was 0.00024. For the model in Figure 2 the corresponding rates were 0.031 and 0.019. To visually represent the latter results, Figure 9 shows a graph , in which the edge colours represent the frequency that the edge was found in the 10 models. The graph suggests that model uncertainty is primarily restricted to the genomic intervals with complex dependence structure.
Table 2. Results from simulations
Figure 9. The union of LD graphs for Duroc chromosome 1 derived from ten simulated data sets. The figure represents the results of applying the fast algorithm to ten data sets simulated under the LD graph shown in Figure 1. The union of the ten selected graphs is shown. Edges present in all ten graphs are black, and the colour of the others is interpolated between light blue (those found once) and blue (those found nine times).
Finally, for comparison purposes the algorithm of [15] was applied to the Duroc chromosome 1 genotype data. This algorithm automatically imputes phase and missing marker data, cycling between imputation and model selection as sketched in the background section. The selected graph is shown in Figure 10. Like the graphs shown in Figures 2 and 8, it is long and stringy, but rather more dense. This greater density may be explained by the use in [15] of a Metropolis acceptance rule that is based on the penalized likelihood (1), but with a smaller penalizing constant α=(1/8) log(N). A detailed comparison of the two algorithms would be valuable but is not attempted here.
Figure 10. Haplotypelevel graph found using the algorithm of [[15]]. The figure shows the result of applying the algorithm of [15] to the same data set as used with Figure 2. The algorithm estimates a haplotypelevel graph for the data.
Discussion
This paper has introduced an efficient, lineartime forwardbackward algorithm to estimate chromosomewide probabilistic graphical models of finescale linkage disequilibrium, and has described a convenient way to display these models. In illustration, the methods have been applied to data obtained from three commercial breeds of pigs using the Illumina Porcine SNP60 BeadChip.
The forward part of the algorithm proceeds by combining a series of overlapping marginal decomposable models of dimension L and overlap length K. This implicitly assumes that the maximum width of the true graph is at most K. The resulting model is then triangulated and backward selection performed. The search space closely resembles that of [15], which samples from decomposable models with a given maximum width, using sliding windows. The difference in approaches lies primarily in the search method: here greedy search to optimize a penalized likelihood criterion is used, whereas in [15] MCMC sampling methods are applied.
The R function used for greedy forward search currently requires that the input data contain no missing values, so it was necessary to impute missing values prior to performing the algorithm, and the BEAGLE software [22] was used for this. This raises the possibility of circularity, or more precisely, that the model selection is influenced by constraints or assumptions implicit in the models used by BEAGLE. But given BEAGLE’s high imputation accuracy with such data it seems unlikely that this plays an important role here.
The algorithm was found to have high accuracy when applied to simulated data sets of the dimensions considered here (N∼4000;p∼3000), with edgewise false positive and negative rates of around 3%. That it is good at reconstructing the model generating the data is reassuring. Needless to say, the algorithm does not necessarily identify the “true” model, which may not be in the search space. As noted previously, the approach captures short range associations, but not long range ones. Moreover, higher edgewise false negative rates may occur when observed data are used if there are infinitesimal departures from a model that are not detectable at the given sample size, as these are filtered out when data are simulated under a selected model.
A comparison of triangular heatmaps with LD graphs is instructive. The former are compact graphical representations of all pairwise marginal associations for a set of SNPs. They are particularly wellsuited to identify LD blocks, which stand out as highlighted triangles. LD graphs supplement heatmaps by showing patterns of association but not their strength. Since they are parametric models they can be put to a number of quantitative uses as described in the background section. At one level, heatmaps and LD graphs convey similar information, since intervals with simple dependence structures tend to appear as series of LD blocks in the heatmap, whereas those with complex structures tend to occur in the interblock regions and have a more mosaic appearance. But the graphs provide a more incisive characterisation of genetic variation, building on the concept of conditional rather than marginal dependence. In this regard, it may be helpful to regard conditional independence statements as expressing the notion of irrelevance, in the sense that A⊥ ⊥B  C implies that if we know C, information about A is irrelevant for knowledge of B. Thus the graphs say something about connections between specific SNPs, for example about which SNPs are required to predict a specific SNP.
The graphs may also be useful in fine mapping. Genomewide association studies seek to find the genetic basis of complex traits, typically using single locus methods  that is, by identifying SNPs with strong marginal association with the complex trait. Due to LD, many SNPs in a genomic region may exhibit strong association with the trait, making it hard to identify the causal loci. A way to address this is to assess the effect of a putative causal SNP on the complex trait in a linear model that also includes terms for the two flanking SNPs, in order to adjust for confounding with nearby effects due to LD. This implicitly assumes a simple serial dependence structure between the SNPs, and when the dependence structure is more complex such adjustment might be insufficient, leading to false positives. This may be prevented by including terms for the neighbours of the putative causal SNP, not just for the flanking SNPs. Any SNP is separated from the remaining SNPs by its neighbours, so by the global Markov property it is independent of the remaining SNPs given its neighbours. A similar method has been proposed based on Bayesian networks [38].
Like graphical models, the APFA models that underlie BEAGLE may be represented as graphs that encode a set of conditional independence relations, but in a very different way. In the present context, for example, nodes in APFA graphs represent haplotype clusters rather than SNPs. Where the model classes intersect, APFA graphs are much more complex than the corresponding dependence graphs, and so less amenable to visualization.
A striking feature of the LD graphs for the pig data was that for roughly 80% of the genome, simple serial or nearserial LD patterns were found, but for the remaining 20%, more complex patterns were observed. The regions with the simple serial structure tend to have low haplotype diversity, which is to be expected in livestock breeds with small effective population sizes [39]. Perhaps more unexpected is that roughly 20% of the porcine genome exhibits complex LD patterns, forming islands of relatively high genetic diversity. This information may be useful in an animal breeding context, to identify regions with high genetic variation. It will also be interesting to compare graphs obtained using different SNP densities in a given breed or species to examine whether and how their topologies change with varying marker densities.
Conclusions
The proposed algorithm is efficient and makes it feasible to estimate and visualize chromosomewide LD models on a routine basis.
Competing interests
The author declares he has no competing interests.
Acknowledgements
The data were kindly provided by the Danish Pig Research Centre and in particular Tage Ostersen. The work was performed in a project funded through the Green Development and Demonstration Programme (grant no. 3405110279) by the Danish Ministry of Food, Agriculture and Fisheries, the Pig Research Centre and Aarhus University. Ole F. Christensen, Peter Sørensen, Luc Janss and Lei Wang are acknowledged for helpful discussions.
References

Barrett J, Fry B, Maller J, Daly M: Haploview: analysis and visualization of LD and haplotype maps.
Bioinformatics 2005, 21(2):263265. PubMed Abstract  Publisher Full Text

AbadGrau M, Montes R, Sebastiani P: Building chromosomewide LD maps.
Bioinformatics 2006, 22(16):19331934. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Cardon L, Abecasis G, et al.: Using haplotype blocks to map human complex trait loci.
Trends Genet 2003, 19(3):135140. PubMed Abstract  Publisher Full Text

Daly M, Rioux J, Schaffner S, Hudson T, Lander E: Highresolution haplotype structure in the human genome.
Nat Genet 2001, 29(2):229232. PubMed Abstract  Publisher Full Text

Gabriel S, Schaffner S, Nguyen H, Moore J, Roy J, Blumenstiel B, Higgins J, DeFelice M, Lochner A, Faggart M, et al.: The structure of haplotype blocks in the human genome.
Science 2002, 296(5576):22252229. PubMed Abstract  Publisher Full Text

Stumpf M: Haplotype diversity and the block structure of linkage disequilibrium.
Trends Genet 2002, 18(5):226228. PubMed Abstract  Publisher Full Text

Crawford D, Carlson C, Rieder M, Carrington D, Yi Q, Smith J, Eberle M, Kruglyak L, Nickerson D: Haplotype diversity across 100 candidate genes for inflammation, lipid metabolism, and blood pressure regulation in two populations.
Am J Hum Genet 2004, 74(4):610. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Thomas A, Camp N: Graphical modeling of the joint distribution of alleles at associated loci.
Am J Hum Genet 2004, 74(6):10881101. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Lauritzen SL: Graphical Models. Oxford: Oxford University Press; 1996.

Højsgaard S, Edwards D, Lauritzen S: Graphical Models with. R. New York, Dordrecht, Heidelberg, London: Springer; 2012.

Edwards D: Linkage analysis using loglinear models.
Comput Stat Data Anal 1992, 13(3):281290. Publisher Full Text

Thomas A: Characterizing allelic associations from unphased diploid data by graphical modeling.
Genet Epidemiol 2005, 29:2335. PubMed Abstract  Publisher Full Text

Thomas A: Estimation of graphical models whose conditional independence graphs are interval graphs and its application to modelling linkage disequilibrium.
Comput Stat Data Anal 2009, 53(5):18181828. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Thomas A: A method and program for estimating graphical models for linkage disequilibrium that scale linearly with the number of loci, and their application to gene drop simulation.
Bioinformatics 2009, 25(10):12871292. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Abel H, Thomas A: Accuracy and computational efficiency of a graphical modeling approach to linkage disequilibrium estimation.

Mourad R, Sinoquet C, Leray P, et al.: A Bayesian network approach to model local dependencies among SNPs. In MODGRAPH 2009 Probabilistic Graphical Models for Integration of Complex Data and Discovery of Causal Models in Biology, Satellite meeting of JOBIM 2009.. : ; 2009.

Mourad R, Sinoquet C, Dina C, Leray P: Visualization of Pairwise and Multilocus Linkage Disequilibrium Structure Using Latent Forests.
PloS one 2011, 6(12):e27320. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Mourad R, Sinoquet C, Leray P: Probabilistic graphical models for genetic association studies.
Brief Bioinform 2012, 13:2033. PubMed Abstract  Publisher Full Text

Morota G, Valente B, Rosa G, Weigel K, Gianola D: An assessment of linkage disequilibrium in Holstein cattle using a Bayesian network.
J Anim Breed Genet 2012, 129(6):474487.
[http://dx.doi.org/10.1111/jbg.12002 webcite]
PubMed Abstract  Publisher Full Text 
Browning S: Multilocus association mapping using variablelength Markov chains.
Am J Hum Genet 2006, 78(6):903913. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Browning B, Browning S: Efficient multilocus association testing for whole genome association studies using localized haplotype clustering.
Genet Epidemiol 2007, 31(5):365375. PubMed Abstract  Publisher Full Text

Browning S, Browning B: Rapid and accurate haplotype phasing and missingdata inference for wholegenome association studies by use of localized haplotype clustering.
Am J Hum Gen 2007, 81(5):10841097. Publisher Full Text

Ron D, Singer Y, Tishby N: On the Learnability and Usage of Acyclic Probabilistic Finite Automata.
J Comput Sys Sci 1998, 56:133152. Publisher Full Text

Thomas A: Assessment of SNP streak statistics using gene drop simulation with linkage disequilibrium.
Genet Epidemiol 2010, 34(2):119124. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Ripley BD: Pattern Recognition and Neural Networks. Cambridge, United Kingdom: Cambridge University Press; 1996.

Gentry J, Long L, Gentleman R, Falcon S, Hahne F, Sarkar D, Hansen K:
Rgraphviz: Provides plotting capabilities for R graph objects.
[R package version 2.2.1]

Su SC, Kuo CC, Chen T: Inference of missing SNPs and information quantity measurements for haplotype blocks.
Bioinformatics 2005, 21(9):20012007. PubMed Abstract  Publisher Full Text

Asmussen S, Edwards D: Collapsibility and response variables in contingency tables.
Biometrika 1983, 70(3):567578. Publisher Full Text

Tarjan R, Yannakakis M: Simple lineartime algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs.
SIAM J Comput 1984, 13:566579. Publisher Full Text

Abreu G, Edwards D, Labouriau R: HighDimensional Graphical Model Search with the gRapHD R Package.
J Stat Softw 2010, 37:118.
[http://www.jstatsoft.org/v37/i01/ webcite]

Gabor C, Tamas N: The igraph software package for complex network research.
InterJournal 2006 Complex Systems:1695.
[http://igraph.sf.net webcite]

Gentleman R, Whalen E, Huber W, Falcon S:
graph: A package to handle graph data structures.
[R package version 1.36.0]

Shin JH, Blay S, McNeney B, Graham J: LDheatmap: An R Function for Graphical Display of Pairwise Linkage Disequilibria Between Single Nucleotide Polymorphisms.
J Stat Softw 2006, 16:Code Snippet 3.
[http://jstatsoft.org/v16/c03 webcite]

Højsgaard S: Graphical Independence Networks with the gRain Package for R.
J Stat Softw 2012, 46(10):126.
[http://www.jstatsoft.org/v46/i10/ webcite]
PubMed Abstract  PubMed Central Full Text 
Ramos AM, Crooijmans R, Affara N, Amaral A, Archibald A, Beever J, Bendixen C, Churcher C, Clark R, Dehais P, et al.: Design of a high density SNP genotyping assay in the pig using SNPs identified and characterized by next generation sequencing technology.
PLoS One 2009, 4(8):e6524. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Morris A, Whittaker J, Balding D: Little loss of information due to unknown phase for finescale linkagedisequilibrium mapping with singlenucleotide–polymorphism genotype data.
Am J Hum Genet 2004, 74(5):945. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Thomas A: The conditional independences between variables derived from two independent identically distributed Markov random fields when pairwise order is ignored.
Math Med Bio 2010, 27(3):283288. Publisher Full Text

Han B, Park M, Chen Xw: A Markov blanketbased method for detecting causal SNPs in GWAS.
BMC Bioinformatics 2010, 11(Suppl 3):S5. PubMed Abstract  BioMed Central Full Text  PubMed Central Full Text

Uimari P, Tapio M: Extent of linkage disequilibrium and effective population size in finnish landrace and finnish yorkshire pig breeds.
J An Sci 2011, 89(3):609614. Publisher Full Text