Calculates the numerator relationship matrix of a population from the
pedigree recorded in the SimParam. The pedigree must have
been tracked from the start of the simulation, see
setTrackPed.
Value
Returns a symmetric matrix with a row and column for each individual, named by their IDs. The diagonal is one plus the inbreeding coefficient times one less than the ploidy.
Details
The relationship matrix is calculated from the pedigree of the
population's individuals and all of their ancestors by the indirect
method of Colleau (2002)
, which
gives the values of the tabular method of
Henderson (1976)
without forming the
relationship matrix of the whole pedigree.
Individuals in the base population, those created by
newPop, are taken to be unrelated and not inbred, unless
the founders were inbred, as with runMacs(inbred=TRUE), in which
case they are taken to be unrelated and fully inbred.
Doubled haploids, made with makeDH, are fully inbred and
are related to every individual that is not their descendant exactly as
their parent is, because a doubled haploid's genome is two copies of a
single gamete from that parent. A selfed individual likewise has its
parent's relationships to everyone but its own descendants, and is
partly inbred, or fully inbred when its parent is. A descendant is
closer to the individual it descends from than to that individual's
parent: a self of a doubled haploid has a relationship of 2 with the
doubled haploid but 1 with an outbred parent of it.
For a ploidy level above 2, inheritance is taken to be autopolyploid, without double reduction, following Kerr et al. (2012) and Hamilton and Kerr (2018) . The matrix is scaled so that the relationships of an individual's progeny are the average of its parents', and its diagonal is \(1+(v-1)F\) for ploidy \(v\), where the inbreeding coefficient \(F\) is the probability that two distinct alleles of the individual are identical by descent. Allopolyploids that pair like diploids should be simulated as diploids.
The ploidy level must stay the same throughout the simulation. An error
is given for an odd ploidy, but individuals made by
reduceGenome, doubleGenome or
mergeGenome, or descended from them, cannot be detected,
and their relationships will be wrong.
Memory use grows with the square of the number of individuals in the population, and the time taken with that number times the size of its pedigree.
References
Colleau J (2002).
“An indirect approach to the extensive calculation of relationship coefficients.”
Genetics Selection Evolution, 34(4), 409–421.
doi:10.1186/1297-9686-34-4-409
.
Hamilton MG, Kerr RJ (2018).
“Computation of the inverse additive relationship matrix for autopolyploid and multiple-ploidy populations.”
Theoretical and Applied Genetics, 131(4), 851–860.
doi:10.1007/s00122-017-3041-y
.
Henderson CR (1976).
“A simple method for computing the inverse of a numerator relationship matrix used in prediction of breeding values.”
Biometrics, 32(1), 69–83.
doi:10.2307/2529339
.
Kerr RJ, Li L, Tier B, Dutkowski GW, McRae TA (2012).
“Use of the numerator relationship matrix in genetic analysis of autopolyploid species.”
Theoretical and Applied Genetics, 124(7), 1271–1282.
doi:10.1007/s00122-012-1785-y
.
Examples
#Create founder haplotypes
founderPop = quickHaplo(nInd=4, nChr=1, segSites=10)
#Set simulation parameters
SP = SimParam$new(founderPop)
SP$setTrackPed(TRUE)
#Create a pedigree with crosses and doubled haploids
pop = newPop(founderPop, simParam=SP)
pop2 = randCross(pop, nCrosses=2, nProgeny=2, simParam=SP)
pop3 = makeDH(pop2, nDH=2, simParam=SP)
#Relationships among the doubled haploids
pedigreeA(pop3, simParam=SP)
#> 9 10 11 12 13 14 15 16
#> 9 2.00 1.00 0.50 0.50 0.25 0.25 0.25 0.25
#> 10 1.00 2.00 0.50 0.50 0.25 0.25 0.25 0.25
#> 11 0.50 0.50 2.00 1.00 0.25 0.25 0.25 0.25
#> 12 0.50 0.50 1.00 2.00 0.25 0.25 0.25 0.25
#> 13 0.25 0.25 0.25 0.25 2.00 1.00 0.50 0.50
#> 14 0.25 0.25 0.25 0.25 1.00 2.00 0.50 0.50
#> 15 0.25 0.25 0.25 0.25 0.50 0.50 2.00 1.00
#> 16 0.25 0.25 0.25 0.25 0.50 0.50 1.00 2.00