Imaginings of a Livestock Geneticist

Method to Generate Subsets A

The previous methods have focused on algorithms to generate the inverse of the numerator relationship matrix (A) in order to generate breeding values in the mixed model equations. This section focuses on methods to generate A for a subset of individuals without having to set up A across all of the individuals in a pedigree (i.e. outlined in the Recursive Method to Create A section ). Generating subsets of A are useful when generating mating designs on a given list of sire and dams or to generate the H matrix when generating breeding values with single-step genomic BLUP. The algorithm is outlined in Colleau (2002), although I found it difficult to figure out how to write up the algorithm. I found manuscripts by Aguilar et al. (2011) and Misztal et al. (2009) to be helpfull and are a great place to go after reading over the initial Colleau (2002) manuscript. The method generates subsets of a relationship matrix across the desired individuals based on solving the following equation:

$$ w = Av $$

where w is a vector of the relationship between a desired individual and all of the animals in the pedigree, A is the full relationship and v is a vector with a value of '1' for the desired individual and a '0' for all remaining animals in the pedigree. The first part of the algorithm generates inbreeding values across all individuals prior to generating relationships for a subset of individuals. Once inbreeding estimates are generated, a vector, q is initialized that loops through all individuals in the pedigree to calculate the fraction that derivies from its ancestors and is similar to code from a previous section (i.e. Computation of Inbreeding Coeffecients ). Lastly, the final steps involve calculation of D (i.e. square root of diagonals of L) and the numerator relationship values between an animals and the other animals in the subset.

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 . It is assumed that the inbreeding coefficients are known across all animals in the pedigree prior to actually starting to compute relationships. The first part of the code below computes the inbreeding coefficients using the method outlined in the Quaas (1976) section or the Meuwissen & Luo (1992) section.

The full pedigree file from Henderson (1976) can be utilized to compute relationships between the last three animals (5, 6 and 7) utilizing the R function 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 for the three animals, v and w look like at the end of each iteration of the for loop.

Loop Iteration 1
v
0 0 0 0 1 0 0
w
0.500 0.250 0.625 0.625 1.125 0.563 0.844
A
5 6 7
5 1.125 0.0 0.0
6 0.563 0.0 0.0
7 0.844 0.0 0.0
Loop Iteration 2
v
0 0 0 0 0 1 0
w
0.750 0.250 0.375 0.750 0.563 1.250 0.906
A
5 6 7
5 1.125 0.563 0.0
6 0.563 1.250 0.0
7 0.844 0.906 0.0
Loop Iteration 3
v
0 0 0 0 0 0 1
w
0.625 0.250 0.500 0.688 0.844 0.906 1.281
A
5 6 7
5 1.125 0.563 0.844
6 0.563 1.250 0.906
7 0.844 0.906 1.281

References