Given a pedigree, the matrix of additive by dominance (AD) genetic relatedness, dominance by dominance (DD) genetic relatedness, or both are returned.
makeDomEpi(
pedigree,
output = c("AD", "DD", "both"),
parallel = FALSE,
invertD = FALSE,
det = TRUE
)
All of the following will be returned. However, the values of the
output
and invertD
options passed to the function will
determine which of the following are not NULL objects within the list:
the D matrix in sparse matrix form
the log determinant of the D matrix
the AD matrix in sparse matrix form
the log determinant of the AD matrix
the DD matrix in sparse matrix form
the log determinant of the DD matrix
the inverse of the D matrix in sparse matrix form
the inverse of the AD matrix in sparse matrix form
the inverse of the DD matrix in sparse matrix form
the three column form of the non-zero elements for the inverse of the D matrix
the three column form of the non-zero elements for the inverse of the AD matrix
the three column form of the non-zero elements for the inverse of the DD matrix
A pedigree where the columns are ordered ID, Dam, Sire
Character(s) denoting which matrix and its inverse is to be constructed.
A logical indicating whether or not to use parallel processing. Note, this may only be available on Mac and Linux operating systems.
A logical indicating whether or not to invert the D matrix
A logical indicating whether or not to return the determinants for the epistatic relationship matrices
Missing parents (e.g., base population) should be denoted by either 'NA', '0', or '*'.
Because of the computational demands of constructing the D matrix (see
makeD
), this function allows for the inverses that are derived
from the D matrix (i.e., D-inverse, AD-inverse, and DD-inverse)to be
constructed at the same time. This way, the D matrix will only have to be
constructed once for use in the three separate genetic relatedness inverse
matrices that depend upon it. However, using the output
and
invertD
options in different combinations will ensure that only the
desired matrix inverses are constructed.
parallel
= TRUE should only be used on Linux or Mac OSes (i.e., not
Windows).
Both the AD and DD matrix are computed from the Hadamard product of the
respective matrices (see also, makeAA
).
makeA
, makeD
, makeAA
Boutput <- makeDomEpi(Mrode9, output = "b", parallel = FALSE, invertD = FALSE)
str(Boutput)
DADoutput <- makeDomEpi(Mrode9, output = "AD", parallel = FALSE, invertD = TRUE)
str(DADoutput)
Run the code above in your browser using DataLab