Imaginings of a Livestock Geneticist

Recursive Method to Generate A

The Henderson (1976) paper was an influential paper that described a method to generate the numerator relationship matrix (A) and its associated inverse (A-1). This section describes the code that is utilized to generate A. This paper initially looks like it would be very difficult to understand, but I urge you to go through the exercises with a simple pedigree (even simpler than his!!) and tabulate how each cell is calculated. As you start to go through the examples you will start to see tendencies that Dr. Henderson picked up, in order to come up with his simple rules to generate the inverse of a relationship matrix. Prior to reading over this section it is advised to read Wright (1922) which provides a great background on the principles outlined in the code below. After reading the Wright (1922) paper you will notice that elements of A are the numerator of Wright's coefficient of relationship and in a non-inbred population, A is equal to Wright's coefficient of relationship. The A matrix is equal to twice co-ancestry coefficient (f) and nice proof for that relationship is in "An Introduction to Population Genetic Theory" by Crow and Kimura (page 67-68). In animal breeding models, A-1 when multiplied by the additive genetic variance is utilized to account for the additive genetic covariances between records of related individuals. Furthermore, A is also utilized to manage the inbreeding levels within a population based on avoiding parents that are highly related or minimizing the average relationship between mated parents in the context of designed matings. The properties of elements of A are outlined below:

The primary principle behind the method is that the coancestry between two individuals is the average coancestry between one individual and the parents of the other. As outlined in Chang et al. (2001), this principle is always true, with the condition that the former individual is not a direct descendent of the latter. Or in other words, this principle will always hold if the pedigree is sorted so that parents come before progeny. Furthermore, the inbreeding of an animal is equal to half of the relationship between the parents if they are both known. 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 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 looks like at the end of each iteration of the for loop.

A: Loop Iteration 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 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1 2 3 4 5 6 7
1 1.0 0.0 0.5 0.5 0.5 0.75 0.0
2 0.0 1.0 0.0 0.5 0.25 0.25 0.0
3 0.5 0.0 1.0 0.25 0.625 0.375 0.0
4 0.5 0.5 0.25 1.0 0.625 0.75 0.0
5 0.5 0.25 0.625 0.625 1.125 0.5625 0.0
6 0.75 0.25 0.375 0.75 0.5625 1.25 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0
A: Loop Iteration 7
1 2 3 4 5 6 7
1 1.0 0.0 0.5 0.5 0.5 0.75 0.625
2 0.0 1.0 0.0 0.5 0.25 0.25 0.25
3 0.5 0.0 1.0 0.25 0.625 0.375 0.5
4 0.5 0.5 0.25 1.0 0.625 0.75 0.6875
5 0.5 0.25 0.625 0.625 1.125 0.5625 0.84375
6 0.75 0.25 0.375 0.75 0.5625 1.25 0.90625
7 0.625 0.25 0.5 0.6875 0.84375 0.90625 1.28125

References