- Research
- Open Access

# An efficient algorithm to compute marginal posterior genotype probabilities for every member of a pedigree with loops

- Liviu R Totir
^{1}, - Rohan L Fernando
^{2}Email author and - Joseph Abraham
^{3}

**41**:52

https://doi.org/10.1186/1297-9686-41-52

© Totir et al; licensee BioMed Central Ltd. 2009

**Received: **22 April 2009

**Accepted: **3 December 2009

**Published: **3 December 2009

## Abstract

### Background

Marginal posterior genotype probabilities need to be computed for genetic analyses such as geneticcounseling in humans and selective breeding in animal and plant species.

### Methods

In this paper, we describe a peeling based, deterministic, exact algorithm to compute efficiently genotype probabilities for every member of a pedigree with loops without recourse to junction-tree methods from graph theory. The efficiency in computing the likelihood by peeling comes from storing intermediate results in multidimensional tables called cutsets. Computing marginal genotype probabilities for individual *i* requires recomputing the likelihood for each of the possible genotypes of individual *i*. This can be done efficiently by storing intermediate results in two types of cutsets called anterior and posterior cutsets and reusing these intermediate results to compute the likelihood.

### Examples

A small example is used to illustrate the theoretical concepts discussed in this paper, and marginal genotype probabilities are computed at a monogenic disease locus for every member in a real cattle pedigree.

## Keywords

- Intermediate Result
- Recessive Allele
- Allele State
- Genotype Probability
- Recessive Locus

## Background

For monogenic or oligogenic traits, algorithms for efficient likelihood computations have been described for both pedigrees without loops [1], and pedigrees with loops [2–5] Furthermore, efficient algorithms have been developed to draw samples from the joint posterior distribution of genotypes from complex pedigrees [6, 7]. However, when pedigrees are large with many loops and multiple loci, these sampling methods can become very inefficient, and the J-PCS algorithm was proposed to address this problem [8]. This algorithm involves a) modifying the pedigree by cutting some loops and b) sampling the genotype of an individual *i* that is as distant as possible from the modifications ("cuts"). This sample must be drawn from the marginal posterior genotype probability distribution of *i* given the modified pedigree, which may still have many loops. Furthermore, marginal posterior genotype probabilities are needed in genetic counseling in humans and selective breeding in domesticated species. An efficient, exact, deterministic algorithm is available to compute the marginal posterior genotype probabilities for every member in a pedigree without loops [9]. However, it is not straightforward how to extend this algorithm to compute marginal posterior genotype probabilities for pedigrees with loops. Recently, junction tree methods from graph theory were used to describe an efficient algorithm to compute marginal posterior genotype probabilities for pedigrees with loops [10]. Most geneticists, however, are not familiar with junction tree concepts, and thus such algorithms would not readily be incorporated in genetic analyses, especially because the paper of Lauritzen and Sheehan [10] is not self-contained, but relies on results from other sources. In this paper, we present a self-contained description of an efficient, exact, deterministic algorithm to compute marginal posterior genotype probabilities for every member of a pedigree with loops, without use of junction tree methods. This algorithm has been implemented in the public domain software package MATVEC and can be obtained from the corresponding author.

Following is a brief outline of the presentation. First we define pedigree loops. Next we discuss the relationship between the likelihood and marginal posterior genotype probabilities of pedigree members. Following this, anterior and posterior cutsets are introduced. Anterior cutsets are used to compute the likelihood by the Elston-Stewart algorithm (peeling), and anterior and posterior cutsets are used to describe an efficient algorithm to calculate marginal probabilities for every member of a pedigree with loops. Next, marginal genotype probabilities are calculated for every member in a cattle pedigree that contains loops. Finally, in the appendix, a small example is used to illustrate in detail the theoretical concepts discussed in this article.

## Methods

### Definition of Pedigree Loops

Here we define pedigree loops indirectly by providing a simple algorithm to determine if a pedigree contains loops. A pedigree is a set of individuals, each of which can be classified as a founder or a non-founder. A founder is a pedigree member whose parents are not in the pedigree, and a non-founder is a pedigree member with both parents present in the pedigree. A nuclear family consists of a set of parents and all their off spring. A terminal family is a family that has at most one member who belongs to at least one other nuclear family. Terminal members of a pedigree are members of terminal families that do not belong to another family. The algorithm used to determine if a pedigree contains loops relies on identifying and then eliminating terminal members from the pedigree. If a pedigree does not contain any loops, repeated removal of terminal members from the pedigree will result in all members being removed from the pedigree. On the other hand, if a pedigree contains any loops, not all members of the pedigree can be removed by repeated removal of terminal members. See additional file 1: "Algorithm to detect loops.pdf" for an example of the use of this algorithm to identify loops in arbitrary pedigrees.

### Likelihood and Genotype Probability Calculations for General Pedigrees

*n*individuals, and let

*g*

_{ i }denote the possible genotype and

*y*

_{ i }the observed phenotype of an arbitrary pedigree member

*i*. Note that both

*g*

_{ i }and

*y*

_{ i }can be a function of a single locus or of multiple loci on the chromosome. The likelihood for a genetic model given the observed data can be written as

*F*(g, y;

*ρ*, q, θ) denotes the joint distribution of all

*g*

_{ i }(g) and all

*y*

_{ i }(y) in the pedigree, ρ is the vector of recombination rates between loci, q is the vector of gene frequencies, and θ is the vector of parameters in the genetic model that relates

*y*

_{ i }and

*g*

_{ i }[11]. Furthermore, the likelihood can be written as

*h*(

*y*

_{ i }|

*g*

_{ i }, θ) is the conditional probability of the phenotype

*y*

_{ i }given the genotype

*g*

_{ i }(also known as the penetrance function of individual

*i*), Pr(

*g*

_{ i }| q) is the marginal probability that a founder has genotype

*g*

_{ i }(founder probability) and Pr(

*g*

_{ i }| , , ρ) is the probability that a non-founder has genotype

*g*

_{ i }given that its mother (

*m*

_{ i }) has genotype and its father (

*f*

_{ i }) has genotype (transition probability). When

*g*

_{ i }, and consist of multiple loci, the multilocus transition probability can be written as a product of single-locus transition probabilities and recombination probabilities between adjacent loci, by making use of the Markov property for recombination events between adjacent loci that holds under the assumption of no interference [5, 12]. Note that, for each individual

*i*in the pedigree, a set

*s*

_{ i }is defined that contains either one or three individuals. For founders,

*s*

_{ i }contains only

*i*, while for non-founders,

*s*

_{ i }contains

*i, m*

_{ i }and

*f*

_{ i }. For an arbitrary pedigree member

*i*, marginal genotype probabilities can be written as

where *L* is the likelihood defined in 2, and
is the likelihood computed with *g*_{
i
}fixed at genotype *x*. Thus, the efficient computation of marginal genotype probabilities using equation 4 requires an efficient algorithm to compute the likelihood. The computation of the likelihood using 2 is not efficient for pedigrees having more than about 20 members. However, the Elston-Stewart algorithm, which is also known as peeling, can be used to efficiently compute the likelihood [1, 13]. Still, using equation 4 to compute marginal probabilities for *N* unknown genotypes of individual *i* requires recomputing the likelihood with *g*_{
i
}= *x* for each of the *N* values of *x*. Furthermore, this has to be repeated for all *n* individuals in the pedigree. In the following section we introduce an algorithm to avoid repeating computations by storing intermediate results in multidimensional tables called anterior and posterior cutsets.

### Anterior and Posterior Cutsets

*g*

_{1}of the product of all factors in 2 that contain

*g*

_{1}, for each combination of the other genotypes that occur together with

*g*

_{1}. Results of these summations are stored in a multidimensional table that has been called a cutset [13]. Here we will refer to these tables as anterior cutsets. The anterior cutset obtained after peeling

*g*

_{1}will be denoted by and is calculated as

where *V*_{1} is a set of pedigree members defined as follows. Using the sets *s*_{
i
}defined earlier for each individual in the pedigree, *U*_{1} is defined as the union of all *s*_{
j
}that contain individual 1. Then *V*_{1} is obtained by removing individual 1 from *U*_{1}. Further,
is the set of genotypes for the individuals in *V*_{1}. Note that the product in 5 is over those pedigree members *j* that contain individual 1 in their *s*_{
j
}.

*g*

_{1}, summed over

*g*

_{1}, with gives the following expression for the likelihood

where g_{1} = {*g*_{2} ... *g*_{
n
}} is the set of possible genotypes of the individuals that remain to be peeled, and the product is over those pedigree members *r* that do not contain individual 1 in their *s*_{
r
}. The likelihood expressed as above after peeling *g*_{1}, will be referred to as *LE*_{1}, and in general after peeling *g*_{
i
}, will be referred as *LE*_{
i
}.

Note that after *g*_{1} has been peeled, the summation in 6 is only over the genotypes of individuals 2 ... *n*. As described below, and later illustrated through a hypothetical example in the Appendix, as each individual is peeled, an anterior cutset is generated. After peeling the last individual, the final anterior cutset will have only a single value that is equal to the likelihood. Note that for a pedigree with *n* members, there are *n*! possible peeling orders. Although any choice of a peeling sequence will lead to the same value for the likelihood, not all choices of the peeling sequence lead to anterior cutsets of the same size. As the amount of memory required does depend on the size of the cutsets, a peeling sequence leading to smaller cutsets is more desirable. However, even for moderately large *n*, an exhaustive search for an efficient peeling sequence is not feasible. Furthermore, there is no known algorithm to efficiently find the peeling order with the lowest storage requirements [10]. However, the following simple heuristic procedure can be used to generate a good peeling sequence. At any stage of the peeling process, in order to decide which individual should be peeled next, for each individual *i* that remains to be peeled, we compute the size of the anterior cutset that would be generated by peeling *i*. The individual with the smallest anterior cutset size is chosen to be peeled next [14].

*V*

_{1}, we can define a second multidimensional table called a posterior cutset

*i*. The first set

*s*

_{ i }has already been described earlier, and it is completely determined by the pedigree. The second set

*V*

_{ i }contains the individuals in the cutset that is generated when

*i*is peeled. Thus,

*V*

_{ i }is determined by the pedigree and the peeling order. In general, peeling individual

*i*amounts to computing the sum over

*g*

_{ i }of the product of all factors in

*LE*

_{i-1}that contain

*g*

_{ i }, for each combination of the other genotypes that occur together with

*g*

_{ i }. These summations are stored in the anterior cutset for

*i*:

*j*is an individual whose function

*f*

_{ j }( ) remains in

*LE*

_{i-1}and

*i*∈

*s*

_{ j },

*k*is an individual whose anterior cutset remains in

*LE*

_{i-1}and

*i*∈

*V*

_{ k },

*U*

_{ i }= ( ) ∪ (∪

*V*

_{ k }), and

*V*

_{ i }=

*U*

_{ i }-

*i*. Replacing in

*LE*

_{i-1}the sum over

*g*

_{ i }of the product of all factors containing

*g*

_{ i }with gives the likelihood expression

*LE*

_{ i }:

*LE*

_{i-1}that were not used in the calculation of and are the anterior cutsets from

*LE*

_{i-1}that were not used in the calculation of . Now we obtain the posterior cutset for

*i*by removing from

*LE*

_{ i }:

*m*∈

*V*

_{ i }using anterior and posterior cutsets. As in equation 4, marginal genotype probabilities for

*m*can be written as

*g*

_{ m }fixed at

*x*. If

*m*is in more than one set of pedigree members

*V*

_{ i }, identifying the set

*V*

_{ i }with smallest number of members will minimize the required computations. However, if

*m*is not in any

*V*

_{ i }, we first write the likelihood 12 as a product of the anterior and posterior cutsets for

*m*. In this expression, however,

*m*has already been peeled. Equation 9, which is used to compute the anterior cutset for an arbitrary individual, contains that individual prior to it being peeled. Thus, by substituting in 12, the expression given in 9 for gives

Now the numerator of 13 is obtained by computing 14 with *g*_{
m
}fixed at *x*.

Provided a good peeling sequence is available, computation of the required anterior cutsets and the summation over in 12 or in 14 would be feasible. However, posterior cutsets cannot be computed efficiently using 11 because here the summation may be over a very large set of genotypes. Fortunately, posterior cutsets can be computed recursively as described below. Although the derivation of the recursive algorithm given below is conceptually straightforward, it may be tedious to follow. Thus, at the end of this section, we provide four easy to implement steps to efficiently compute posterior cutsets.

*i*: the set of members that contribute to , the set of members that contribute to , or the set of members in

*V*

_{ i }. For example, in computing the numerator of 13 by using 12, the intermediate results from peeling individuals in the first set were stored in and used repeatedly, the intermediate results from peeling individuals in the second set were stored in and used repeatedly, and only the calculations for peeling individuals in the third set were repeated. This principle of factoring the likelihood into anterior and posterior components is used repeatedly in the following derivations. To derive the recursive algorithm, first we establish that = 1.0, which is the base case of the recursion. Similar to 10, after peeling individual

*n*- 1, the likelihood expression

*LE*

_{n-1}becomes

*n*remains to be peeled,

*V*

_{ u }and

*V*

_{n-1}contain only

*n*. The likelihood now becomes

and thus
= 1.0. Now, for any other individual *i*,
can be computed recursively as follows.

*i*is peeled, is used in the calculation of the anterior cutset generated when

*k*= min(

*V*

_{ i }) is peeled. The resulting anterior cutset can be written as

*k*∈

*s*

_{ r }, and are the remaining anterior cutsets with

*k*∈

*V*

_{ j }in addition to . Similar to (12) we can also write

*U*

_{ k }=

*V*

_{ k }∪ {

*k*}, and thus we can write

Thus, the posterior cutset for individual *i* can be expressed as a function of some anterior cutsets and the posterior cutset for individual *k* > *i*. Starting at individual *n* - 1 all posterior cutsets can be computed in the reverse order of peeling because
= 1.0.

*i*in a pedigree:

- 1.
Compute anterior cutsets for all individuals in the pedigree. This step is done only once.

- 2.
Identify the anterior cutset whose summand contains the factor (see equation 19).

- 3.
Replace in the summand of with , and for each value of sum over the remaining genotypes in this expression (see equation 24).

- 4.

Note that to compute marginal posterior genotype probabilities for an arbitrary member of the pedigree using this algorithm, we need to calculate all anterior cutsets and a subset of all posterior cutsets. Both the anterior and the posterior cutset of a given individual have the same size. The computation of an anterior cutset involves the summation over the genotypes of one individual. The computation of a posterior cutset can involve summations over the genotypes of a variable number individuals. The theoretical concepts introduced in this section are illustrated in detail for a simple example in the Appendix. In the following section we discuss a real data application of the theoretical concepts described above.

### Genotype Probabilities Computations in a Real Cattle Pedigree

Genetic profile of 26 individuals conditional on pedigree and phenotypic data.

Genotype Probabilities | |||||||
---|---|---|---|---|---|---|---|

Individual | Dam | Sire | Phenotype | ||||

A1, A4, A6 | 0 | 0 | Normal | 0.99999 | 0.000005 | 0.000005 | 0.0 |

A2 | 0 | 0 | Normal | 0.0 | 0.5 | 0.5 | 0.0 |

A3, A5 | 0 | 0 | Normal | 1.0 | 0.0 | 0.0 | 0.0 |

A7 | A1 | A2 | Normal | 0.0 | 1.0 | 0.0 | 0.0 |

A8 | A3 | A2 | Normal | 0.00001 | 0.99999 | 0.0 | 0.0 |

A9, A10, A11 | A4 | A2 | Normal | 0.0 | 0.99999 | 0.00001 | 0.0 |

A12, A13 | A4 | A8 | Normal | 0.0 | 0.99999 | 0.00001 | 0.0 |

A14 | A5 | A9 | Normal | 0.0 | 1.0 | 0.0 | 0.0 |

A15, A16 | A6 | A10 | Normal | 0.0 | 0.99999 | 0.00001 | 0.0 |

A17 | A6 | A10 | Normal | 0.5 | 0.5 | 0.0 | 0.0 |

A18 | A6 | A11 | Normal | 0.0 | 0.99999 | 0.00001 | 0.0 |

A19 | A12 | A9 | Normal | 0.33333 | 0.33333 | 0.33333 | 0.0 |

A20 | A12 | A9 | Normal | 0.33333 | 0.33333 | 0.33333 | 0.0 |

A21 | A14 | A15 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A22 | A14 | A16 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A23 | A14 | A7 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A24, A25 | A12 | A9 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A26 | A13 | A18 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

Marker allele scores for two markers flanking the causative recessive locus.

Individual | M1A1 | M1A2 | M2A1 | M2A2 |
---|---|---|---|---|

A1 | 1 | 1 | 3 | 1 |

A2 | 2 | 2 | 2 | 2 |

A3 | 3 | 3 | 2 | 2 |

A4 | 2 | 1 | 1 | 2 |

A5 | 3 | 1 | 2 | 1 |

A6 | 3 | 1 | 2 | 1 |

A7 | 2 | 1 | 2 | 1 |

A8 | 2 | 3 | 2 | 2 |

A9 | 2 | 1 | 2 | 1 |

A10 | 2 | 2 | 2 | 2 |

A11 | 0 | 0 | 0 | 0 |

A12 | 2 | 1 | 2 | 1 |

A13 | 0 | 0 | 0 | 0 |

A14 | 0 | 0 | 0 | 0 |

A15 | 2 | 1 | 2 | 1 |

A16 | 2 | 1 | 2 | 1 |

A17 | 2 | 3 | 2 | 2 |

A18 | 2 | 3 | 2 | 2 |

A19 | 2 | 1 | 2 | 1 |

A20 | 0 | 0 | 2 | 1 |

A21 | 2 | 2 | 2 | 2 |

A22 | 2 | 2 | 2 | 2 |

A23 | 2 | 2 | 2 | 2 |

A24 | 2 | 2 | 2 | 2 |

A25 | 2 | 2 | 2 | 2 |

A26 | 2 | 3 | 2 | 2 |

Genetic profile of 26 individuals conditional on pedigree, marker and phenotypic data.

Genotype Probabilities | |||||||
---|---|---|---|---|---|---|---|

Individual | Dam | Sire | Phenotype | ||||

A1, A4, A6 | 0 | 0 | Normal | 1.0 | 0.0 | 0.0 | 0.0 |

A2 | 0 | 0 | Normal | 0.0 | 0.5 | 0.5 | 0.0 |

A3, A5 | 0 | 0 | Normal | 1.0 | 0.0 | 0.0 | 0.0 |

A7 | A1 | A2 | Normal | 0.0 | 1.0 | 0.0 | 0.0 |

A8 | A3 | A2 | Normal | 0.00001 | 0.99999 | 0.0 | 0.0 |

A9, A10, A11 | A4 | A2 | Normal | 0.0 | 0.99999 | 0.00001 | 0.0 |

A12, A13 | A4 | A8 | Normal | 0.0 | 1.0 | 0.0 | 0.0 |

A14 | A5 | A9 | Normal | 0.0 | 1.0 | 0.0 | 0.0 |

A15, A16 | A6 | A10 | Normal | 0.0 | 1.0 | 0.0 | 0.0 |

A17 | A6 | A10 | Normal | 0.49995 | 0.49995 | 0.00001 | 0.0 |

A18 | A6 | A11 | Normal | 0.0 | 0.99999 | 0.00001 | 0.0 |

A19 | A12 | A9 | Normal | 0.00003 | 0.49999 | 0.49999 | 0.0 |

A20 | A12 | A9 | Normal | 0.00299 | 0.4985 | 0.4985 | 0.0 |

A21 | A14 | A15 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A22 | A14 | A16 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A23 | A14 | A7 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A24, A25 | A12 | A9 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

A26 | A13 | A18 | Affected | 0.0 | 0.0 | 0.0 | 1.0 |

## Discussion

As stated by Jensen and Kong [15] current algorithms for calculating marginal posterior genotype probabilities by peeling are inefficient. As described earlier, computing marginal genotype probabilities for individual *j* using equation 13, requires recomputing the likelihood for each of the possible genotypes of individual *j*. For the last individual in the peeling sequence, this can be done efficiently because intermediate results from peeling individuals 1 through *n* - 1, for each possible value of *g*_{
n
}, have been stored in the anterior cutset
. Thus, by making use of the intermediate results stored in
, only calculations from the last step of peeling need to be repeated to compute
. For any *m* that is in more than one set *V*_{
i
}we identify the smallest *V*_{
i
}containing *m*. The intermediate results from peeling individuals 1 through *i* are stored in anterior cutsets, including
, and do not have to be recomputed. In this paper we have introduced a second type of cutset, called a posterior cutset, together with an algorithm for its efficient computation. The posterior cutset
contains the intermediate results from peeling all individuals that did not contribute to
and are not contained in the set *V*_{
i
}. Thus, by making use of the intermediate results stored in both
and
, only calculations associated with peeling individuals in *V*_{
i
}(except *m*) need to be repeated to compute the numerator
of 13. For any *m* that is not in any *V*_{
i
}the expression used to compute genotype probabilities (14) cannot be written as a product of a single anterior and posterior. However, any of the anterior the posterior cutsets used in 14 can be computed efficiently. Thus, this new peeling based algorithm provides an efficient method to compute marginal genotype probabilities for an arbitrary member of a pedigree with loops. The computational cost of obtaining posterior genotype probabilities for all members of a pedigree would approximately be equal to twice that of computing the likelihood because computing the likelihood only requires computing the anterior cutsets while computing all genotype probabilities would require computing the posterior cutsets also. As stated by Jensen and Kong [15], a peeling based algorithm would be more accessible to researchers in genetics than the currently available junction-tree methods [10].

Throughout this paper the likelihood was written as a sum over genotype variables. However, when the genotype of an individual is defined over *k* loci, the number of genotypes increases exponentially with *k*. In such situations, writing the likelihood as a sum over allele state and origin allele variables may lead to more efficient computations [12]. Algorithms presented in this paper can be used to calculate the posterior allele state and allele origin probabilities by peeling over allele state and allele origin variables.

## Appendix

First we show how to use the Elston-Stewart algorithm to compute the likelihood for a genetic model given this pedigree. Next we describe how to calculate marginal posterior genotype probabilities for an arbitrary member of this pedigree using the efficient algorithm described above.

### Likelihood computations by peeling

*f*

_{1}(

*g*

_{5},

*g*

_{4},

*g*

_{1}) is the only function that involves

*g*

_{1}. Peeling

*g*

_{1}amounts to computing the sum over

*g*

_{1}of

*f*

_{1}(

*g*

_{5},

*g*

_{4},

*g*

_{1}), for each combination of the genotypes for individuals 5 and 4, and storing the results of these summations in the anterior cutset

*N*

_{5}×

*N*

_{4}, where

*N*

_{5}and

*N*

_{4}are the number of possible genotypes for individuals 5 and 4. Replacing the sum over

*g*

_{1}of

*f*

_{1}(

*g*

_{5},

*g*

_{4},

*g*

_{1}) in 25 with gives the likelihood expression

*LE*

_{1}:

*LE*

_{1}

*f*

_{2}(

*g*

_{5},

*g*

_{4},

*g*

_{2}) is the only function that involves

*g*

_{2}. Therefore, the anterior cutset for 2 (obtained by peeling

*g*

_{2}) is

*g*

_{2}of

*f*

_{2}(

*g*

_{5},

*g*

_{4},

*g*

_{2}) in

*LE*

_{1}with gives the likelihood expression

*LE*

_{2}:

*LE*

_{2}

*f*

_{3}(

*g*

_{5},

*g*

_{4},

*g*

_{3}) is the only function that involves

*g*

_{3}. Therefore, the anterior cutset for 3 (obtained by peeling

*g*

_{3}) is

*g*

_{3}of

*f*

_{3}(

*g*

_{5},

*g*

_{4},

*g*

_{3}) in

*LE*

_{2}with gives the likelihood expression

*LE*

_{3}:

*LE*

_{3}not only

*f*

_{4}(

*g*

_{7},

*g*

_{6},

*g*

_{4}), but also , and involve

*g*

_{4}. Thus, peeling

*g*

_{4}yields the following anterior cutset

*N*

_{7}×

*N*

_{6}×

*N*

_{5}, where

*N*

_{7},

*N*

_{6}and

*N*

_{5}are the number of possible genotypes for individuals 7, 6 and 5. replaces in

*LE*

_{3}the factors

*f*

_{4}(

*g*

_{7},

*g*

_{6},

*g*

_{4}), , and summed over

*g*

_{4}. Thus, the likelihood expression

*LE*

_{4}becomes

*LE*

_{4}both

*f*

_{5}(

*g*

_{7},

*g*

_{6},

*g*

_{5}) and involve

*g*

_{5}. Peeling

*g*

_{5}yields the following anterior cutset

*LE*

_{4}the factors

*f*

_{5}(

*g*

_{7},

*g*

_{6},

*g*

_{5}) and summed over

*g*

_{5}. Thus, the likelihood expression

*LE*

_{5}becomes

### Genotype probability computations

*g*

_{3}fixed at

*x*. As discussed earlier, using this procedure to compute marginal genotype probabilities for

*N*unknown genotypes of individual 3 requires recomputing the likelihood for the entire pedigree

*N*times. However by writing the likelihood as in 12, these computations can be done efficiently. Consider computing marginal posterior genotype probabilities for individual 3. Recall that, as shown in 26, = Σ

_{g 3}

*f*

_{3}(

*g*

_{5},

*g*

_{4},

*g*

_{3}). Using this in 12 we obtain

Note that 32 can be used to calculate the denominator of 31, while the numerator of 31 can be obtained by fixing *g*_{3} in 32 at *x*. To complete the calculations, however, we need to compute
. This is done using the recursive procedure described previously as shown below.

*g*

_{4}and

*g*

_{5}, the sum over

*g*

_{7}and

*g*

_{6}is computed to obtain

Following step 4, note that is not computed yet. Thus, steps 2, 3 and 4 are repeated as follows.

*g*

_{7},

*g*

_{6}and

*g*

_{5}, we obtain

Following step 4, note that is not computed yet. Thus, steps 2, 3 and 4 are repeated as follows.

Following step 2, we determine that contributes to the computation of (see equation 29).

Following step 4, note that is not computed yet. Thus, steps 2, 3 and 4 are repeated as follows.

Following step 2, we determine that contributes to the computation of (see equation 30).

Following step 4, note that = 1.0, and thus the calculations for can be completed. Now using , the calculations for can be completed, and using , the calculations for can be completed. Finally, using , the calculations for can be completed.

## Declarations

### Acknowledgements

The authors would like to thank James Reecy and James Koltes for providing the marker and phenotypic data for the real cattle pedigree discussed in this article. RLF is supported by the United States Department of Agriculture, National Research Initiative grant USDA-NRI-2007-35205-17862.

## Authors’ Affiliations

## References

- Elston RC, Stewart J: A general model for the genetic analysis of pedigree data. Human Hered. 1971, 21: 523-542. 10.1159/000152448.View ArticleGoogle Scholar
- Lange K, Elston RC: Extension to pedigree analysis. I. Likelihood calculations for simple and complex pedigrees. Hum Hered. 1975, 25: 95-105. 10.1159/000152714.View ArticlePubMedGoogle Scholar
- Cannings C, Thompson EA, Skolnick MH: Probability functions on complex pedigrees. Adv Appl Prob. 1978, 10: 26-61. 10.2307/1426718.View ArticleGoogle Scholar
- Thomas A: Approximate computation of probability functions for pedigree analysis. IMA J Math Appl Med Biol. 1986, 3: 157-166. 10.1093/imammb/3.3.157.View ArticlePubMedGoogle Scholar
- Lander ES, Green P: Construction of multilocus genetic linkage maps in humans. Proc Natl Acad Sci USA. 1987, 84 (8): 2363-2367. 10.1073/pnas.84.8.2363.PubMed CentralView ArticlePubMedGoogle Scholar
- Heath S: Markov chain Monte Carlo segregation and linkage analysis for oligonec models. Am J Hum Genet. 1997, 61: 748-760. 10.1086/515506.PubMed CentralView ArticlePubMedGoogle Scholar
- Fernández SA, Fernando RL, Gulbrandtsen B, Totir LR, Carriquiry AL: Sampling genotypes in large pedigrees with loops. Genet Sel Evol. 2001, 33: 337-367. 10.1186/1297-9686-33-4-337.PubMed CentralView ArticlePubMedGoogle Scholar
- Fernando R, Totir L, Pita F, Stricker C, Abraham K: Algorithms to compute allele state and origin probabilities for QTL mapping. 8th World Congress Genet Appl Livest Prod. 2006Google Scholar
- Fernando RL, Stricker C, Elston RC: An efficient algorithm to compute the posterior genotypic distribution for every member of a pedigree without loops. Theor Appl Genet. 1993, 87: 89-93. 10.1007/BF00223750.View ArticlePubMedGoogle Scholar
- Lauritzen SL, Sheehan NA: Graphical models for genetic analysis. Statist Sci. 2003, 18: 489-514. 10.1214/ss/1081443232.View ArticleGoogle Scholar
- Thompson E: Pedigree Analysis in Human Genetics. 1986, The Johns Hopkins University Press, BaltimoreGoogle Scholar
- Fishelson M, Geiger D: Exact genetic linkage computations for general pedigrees. Bioinformatics. 2002, 18: S189-S198.View ArticlePubMedGoogle Scholar
- Cannings C, Thompson EA, Skolnick MH: The recursive derivation of likelihoods on complex pedigrees. Adv Appl Prob. 1976, 8: 622-625. 10.2307/1425918.View ArticleGoogle Scholar
- Lange K, Boehnke M: Extensions to pedigree analysis. V. Optimal calculation of mendelian likelihoods. Hum Hered. 1983, 33: 291-301. 10.1159/000153393.View ArticlePubMedGoogle Scholar
- Jensen CS, Kong A: Blocking Gibbs sampling for linkage analysis in large pedigrees with many loops. Am J Hum Genet. 1999, 65: 885-901. 10.1086/302524.PubMed CentralView ArticlePubMedGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.