Alleles are explicitly traced through a pedigree to obtain coefficients of fraternity between pairs of individuals (the probability of sharing both alleles identical by descent) - for either autosomes or sex chromosomes. This is accomplished in an iterative process to account for the various routes by which an allele will progress through a pedigree due to Mendelian sampling at either autosomes or sex chromosomes. The autosomal case is an implementation of the simulation approach of Ovaskainen et al. (2008).
makeDsim(
pedigree,
N,
parallel = FALSE,
ncores = getOption("mc.cores", 2L),
invertD = TRUE,
calcSE = FALSE,
returnA = FALSE,
verbose = TRUE
)makeSdsim(
pedigree,
heterogametic,
N,
DosageComp = c(NULL, "ngdc", "hori", "hedo", "hoha", "hopi"),
parallel = FALSE,
ncores = getOption("mc.cores", 2L),
invertSd = TRUE,
calcSE = FALSE,
returnS = FALSE,
verbose = TRUE
)
a list
:
the A or S matrix in sparse matrix form
the approximate D or Sd matrix in sparse matrix form
the log determinant of the D or Sd matrix
the inverse of the approximate D or approximate Sd matrix in sparse matrix form
the three column form of the non-zero elements for the inverse of the approximate D matrix or the inverse of the approximate Sd matrix
the simulated D or Sd matrix in sparse matrix form
the log determinant of the simulated D or simulated Sd matrix
the inverse of the simulated D or simulated Sd matrix in sparse matrix form
the three column form of the non-zero and non-self elements for the simulated D or simulated Sd matrix
the three column form of the non-zero elements for the inverse of the simulated D or the inverse of the simulated Sd matrix
A pedigree with columns organized: ID, Dam, Sire. For use
with makeSdsim
, a fourth column indicates the sex of each individual
in the pedigree.
The number of times to iteratively trace alleles through the pedigree
A logical indicating whether or not to use parallel processing. Note, this may only be available for Mac and Linux operating systems.
The number of cpus to use when constructing the dominance relatedness matrix. Default is all available.
A logical indicating whether or not to invert the D or Sd matrix
A logical indicating whether or not the standard errors for each coefficient of fraternity should be calculated
Logical, indicating if the numerator relationship matrix (A or S) should be stored and returned.
Logical, indicating if progress messages should be displayed.
Character indicating the label corresponding to the heterogametic sex used in the "Sex" column of the pedigree
A character indicating which model of dosage compensation.
If NULL
then the “ngdc” model is assumed.
Missing parents (e.g., base population) should be denoted by either 'NA', '0', or '*'.
parallel
= TRUE should only be used on Linux or Mac operating systems
(i.e., not Windows).
Ovaskainen et al. (2008) indicated that the method of calculating the D
matrix (see makeD
) is only an approximation. They proposed a
simulation method that is implemented here. This should be more
appropriate, especially when inbreeding occurs in the pedigree.
The objects listDsim
and listSdsim
will list both the
approximate values (returned from makeD
or
makeSd
) as well as the simulated values. If calcSE
is
TRUE, these values will be listed in listDsim
or listSdsim
.
Ovaskainen, O., Cano, J.M., & Merila, J. 2008. A Bayesian framework for comparative quantitative genetics. Proceedings of the Royal Society B 275, 669-678.
makeD
, makeSd
simD <- makeDsim(Mrode9, N = 1000, parallel = FALSE,
invertD = TRUE, calcSE = TRUE)$listDsim
simSd <- makeSdsim(FG90, heterogametic = "0", N = 1000, parallel = FALSE,
invertSd = TRUE, calcSE = TRUE)$listSdsim
Run the code above in your browser using DataLab