Imaginings of a Livestock Geneticist

Computation of Inbreeding Coeffecients

This section describes an alternative method developed by Meuwissen & Luo (1992) to compute the inbreeding coefficients without having to set up the full L matrix that was described in a previous section . One of the benefits of this algorithm is you can save the results from a previous run and only compute the inbreeding coefficients for the new batch of animals instead of having to recompute inbreeding coefficients for all the animals. The motivation for the algorithm is based off the Henderson (1976) and Quaas (1976) paper that outlined a method to generate A-1 directly from a list of sires and dams and the inbreeding coefficients for each animal. In the Quaas (1976) algorithm, elements of L are computed one column at a time based on a recursive method and the current algorithm computes elements of L one row at a time. One of the important things to note about L is that elements are non-zero only if an individual is a descendant of the current column being computed. As a result, row i of L gives the fraction of genes that animal i derives from its ancestors. For example, Li,sire and Li,dam both equal 0.5, where sire and dam refer to the sire and dam of animal i. Based on this each row of L can be built by proceeding up the pedigree adding half the "contribution" of the current animal to each of its parents.
    Similar to previous methods, the pedigree has to be sorted so that parents come before progeny. Lastly, if animals are numbered from 1 to the very last animal then the sire and dam values can be used to index where the respective elements are located within the algorithm. Algorithms to sort and renumber a pedigree is outlined in the following section . The algorithm outlined below generates the diagonal values of L (i.e. D values) based on the method outlined above and then the remaining portion of the algorithm is the exact same as outlined in a Recursive Method to Create A Inverse section.

The following pedigree file from Henderson (1976) can be utilized with the R code above. The columns are animal, sire and dam and the pedigree is already ordered so that parents come before progeny. Lastly the animals go from 1 to the total number of animals. Outlined below is what (A-1), L, F and D look like at the end of each iteration of the for loop.

Loop Iteration 1
L1
1.000 0.000 0.000 0.000 0.000 0.000 0.000
D
1.000 0.000 0.000 0.000 0.000 0.000 0.000
F
-1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
A-1
1 2 3 4 5 6 7
1 1.0 0.0 0.0 0.0 0.0 0.0 0.0
2 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 0.0 0.0 0.0 0.0 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Loop Iteration 2
L2
0.000 1.000 0.000 0.000 0.000 0.000 0.000
D
1.000 1.000 0.000 0.000 0.000 0.000 0.000
F
-1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
A-1
1 2 3 4 5 6 7
1 1.0 0.0 0.0 0.0 0.0 0.0 0.0
2 0.0 1.0 0.0 0.0 0.0 0.0 0.0
3 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 0.0 0.0 0.0 0.0 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Loop Iteration 3
L3
0.500 0.000 1.000 0.000 0.000 0.000 0.000
D
1.000 1.000 0.750 0.000 0.000 0.000 0.000
F
-1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
A-1
1 2 3 4 5 6 7
1 1.3333 0.0 -0.6667 0.0 0.0 0.0 0.0
2 0.0 1.0 0.0 0.0 0.0 0.0 0.0
3 -0.6667 0.0 1.3333 0.0 0.0 0.0 0.0
4 0.0 0.0 0.0 0.0 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Loop Iteration 4
L4
0.500 0.500 0.000 1.000 0.000 0.000 0.000
D
1.000 1.000 0.750 0.500 0.000 0.000 0.000
F
-1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
A-1
1 2 3 4 5 6 7
1 1.8333 0.5 -0.6667 -1.0 0.0 0.0 0.0
2 0.5 1.5 0.0 -1.0 0.0 0.0 0.0
3 -0.6667 0.0 1.3333 0.0 0.0 0.0 0.0
4 -1.0 -1.0 0.0 2.0 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Loop Iteration 5
L5
0.500 0.250 0.500 0.500 1.000 0.000 0.000
D
1.000 1.000 0.750 0.500 0.500 0.000 0.000
F
-1.000 0.000 0.000 0.000 0.000 0.125 0.000 0.000
A-1
1 2 3 4 5 6 7
1 1.8333 0.5 -0.6667 -1.0 0.0 0.0 0.0
2 0.5 1.5 0.0 -1.0 0.0 0.0 0.0
3 -0.6667 0.0 1.8333 0.5 -1.0 0.0 0.0
4 -1.0 -1.0 0.5 2.5 -1.0 0.0 0.0
5 0.0 0.0 -1.0 -1.0 2.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Loop Iteration 6
L6
0.750 0.250 0.000 0.500 0.000 1.000 0.000
D
1.000 1.000 0.750 0.500 0.500 0.500 0.000
F
-1.000 0.000 0.000 0.000 0.000 0.125 0.250 0.000
A-1
1 2 3 4 5 6 7
1 2.8333 0.5 -0.6667 -0.5 0.0 -1.0 0.0
2 0.5 1.5 0.0 -1.0 0.0 0.0 0.0
3 -0.6667 0.0 1.8333 0.5 -1.0 0.0 0.0
4 -0.5 -1.0 0.5 3.0 -1.0 -1.0 0.0
5 0.0 0.0 -1.0 -1.0 2.0 0.0 0.0
6 -1.0 0.0 0.0 -1.0 0.0 2.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Loop Iteration 7
L7
0.625 0.250 0.250 0.500 0.500 0.500 1.000
D
1.000 1.000 0.750 0.500 0.500 0.500 0.406
F
-1.000 0.000 0.000 0.000 0.000 0.125 0.250 0.281
A-1
1 2 3 4 5 6 7
1 2.3333 0.5 -0.6667 -0.5 0.0 -1.0 0.0
2 0.5 1.5 0.0 -1.0 0.0 0.0 0.0
3 -0.6667 0.0 1.8333 0.5 -1.0 0.0 0.0
4 -0.5 -1.0 0.5 3.0 -1.0 -1.0 0.0
5 0.0 0.0 -1.0 -1.0 2.6154 0.6154 -1.2308
6 -1.0 0.0 0.0 -1.0 0.6154 2.6154 -1.2308
7 0.0 0.0 0.0 0.0 -1.2308 -1.2308 2.4615
References