View source: R/FUN_relationships.R
| D.mat | R Documentation |
C++ implementation of the dominance matrix. Calculates the realized dominance relationship matrix. Can help to increase the prediction accuracy when 2 conditions are met; 1) The trait has intermediate to high heritability, 2) The population contains a big number of individuals that are half or full sibs (HS & FS).
D.mat(X,nishio=TRUE,min.MAF=0,return.imputed=FALSE,ploidy=NULL)
X |
Matrix ( |
nishio |
If TRUE, Nishio and Satoh (2014), which uses the orthogonal parameterization of Vitezica et al. (2013). Otherwise Su et al. (2012). See Details and references.
With |
min.MAF |
Minimum minor allele frequency, a finite value between zero and 0.5. Markers at or below this threshold and all constant markers are removed. |
return.imputed |
When TRUE, the imputed marker matrix is returned. |
ploidy |
Number of chromosome copies, a finite integer of at least two.
The default |
Missing values are replaced by the column (marker) mean before the matrix is computed. At least two individuals and one variable marker surviving the frequency filter are required. Genotypes must lie in [-1,1]; a marker with no observed genotypes cannot be imputed. Markers with minor allele frequency less than or equal to min.MAF and all constant markers are removed. For each marker k, p_k is the frequency of the allele counted by the code 1, estimated as the column mean of (X+1)/2, and q_k = 1-p_k.
For the nishio method (Nishio and Satoh, 2014; Vitezica et al., 2013): genotypes are coded as w_{ik} = -2q_k^2 for x_{ik}=1, 2p_kq_k for x_{ik}=0 and -2p_k^2 for x_{ik}=-1, computed as w_{ik} = -x_{ik}^2 + (p_k-q_k)x_{ik} + 2p_kq_k. Fractional values are passed through the same formula; note that a mean-imputed value x_{ik} = p_k-q_k receives the heterozygote code 2p_kq_k. Then D = W W'/c, where c = \sum_k (2p_kq_k)^2. Under Hardy-Weinberg equilibrium this coding is orthogonal to the additive coding.
For the Su method (Su et al., 2012): heterozygosity is coded as h_{ik} = 1-|x_{ik}| and centered as m_{ik} = h_{ik} - 2p_kq_k. Then D = M M'/c, where c = \sum_k 2p_kq_k(1-2p_kq_k).
Versions of sommer earlier than 4.4.9 used a different formula for nishio=TRUE: h_{ik} centered by its column mean and divided by \sum_k (2p_kq_k)^2. That was not the Nishio and Satoh (2014) method, so results from those versions will differ.
For explicit ploidy P>2, let d_{ik} be allele dosage,
p_k=\bar d_k/P, q_k=1-p_k, and
t_{ik}=d_{ik}-Pp_k. The orthogonal digenic code is
w_{ik}=-t_{ik}^2+(1-2p_k)t_{ik}+Pp_kq_k,
and the relationship matrix is
D=WW'/\sum_k 2P(P-1)(p_kq_k)^2.
For d_k\sim\mathrm{Binomial}(P,p_k), this code has zero mean,
zero covariance with the additive code t_k, and variance
2P(P-1)(p_kq_k)^2. At P=2, it reduces to the
Nishio/Vitezica code above. Its sign convention makes the
heterozygous allele-pair contribution positive.
This extension models only digenic (allele-pair) dominance, not the
full nonadditive genetic variance of a polyploid: trigenic and higher
within-locus interactions are excluded. The binomial equilibrium
assumption corresponds to independent homologous allele copies
(polysomic random segregation without double reduction); it is not
a model for arbitrary disomic inheritance, inbreeding, or double
reduction. Orthogonality need not hold in an observed sample.
Fractional dosages use the same polynomial after marker-mean
imputation; the returned X retains its original dosage scale.
An imputed mean dosage receives code Pp_kq_k, not zero.
See Endelman et al. (2018) for digenic and higher-order dominance
in autotetraploids.
The Su heterozygosity model has no uniquely specified polyploid
extension here. Consequently nishio=FALSE with
ploidy>2 raises an error instead of silently treating
polyploid genotypes as diploid. All methods retain the same mean
imputation and strict MAF/constant-marker filters.
If return.imputed = FALSE, the n \times n dominance relationship matrix is returned.
If return.imputed = TRUE, the function returns a list containing
the D matrix
the imputed marker matrix
Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744
Nishio M and Satoh M. 2014. Including Dominance Effects in the Genomic BLUP Method for Genomic Evaluation. Plos One 9(1), doi:10.1371/journal.pone.0085792
Vitezica ZG, Varona L, Legarra A. 2013. On the Additive and Dominant Variance and Covariance of Individuals Within the Genomic Selection Scope. Genetics 195(4): 1223-1230. doi:10.1534/genetics.113.155176
Su G, Christensen OF, Ostersen T, Henryon M, Lund MS. 2012. Estimating Additive and Non-Additive Genetic Variances and Predicting Genetic Merits Using Genome-Wide Dense Single Nucleotide Polymorphism Markers. PLoS ONE 7(9): e45293. doi:10.1371/journal.pone.0045293
Endelman JB et al. 2018. Genetic Variance Partitioning and Genome-Wide Prediction with Allele Dosage Information in Autotetraploid Potato. Genetics 209(1):77-87. doi:10.1534/genetics.118.300685.
####=========================================####
#### EXAMPLE 1
####=========================================####
####random population of 20 lines with 100 markers
X <- matrix(rep(0,20*100),20,100)
for (i in 1:20) {
X[i,] <- sample(c(-1,0,0,1), size=100, replace=TRUE)
}
D <- D.mat(X)
#### Orthogonal digenic dominance from tetraploid dosages
data(DT_polyploid, package="enhancer")
numo <- enhancer::atcg1234(GT_polyploid[,1:100], ploidy=4, silent=TRUE)
D4 <- D.mat(numo$M, ploidy=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.