A.mat {evola} | R Documentation |
Calculates the realized additive relationship matrix.
A.mat(X,min.MAF=NULL)
X |
Matrix ( |
min.MAF |
Minimum minor allele frequency. The A matrix is not sensitive to rare alleles, so by default only monomorphic markers are removed. |
For vanraden method: the marker matrix is centered by subtracting column means M= X - ms
where ms is the coumn means. Then A=M M'/c
, where c = \sum_k{d_k}/k
, the mean value of the diagonal values of the M M'
portion.
If return.imputed = FALSE, the n \times n
additive relationship matrix is returned.
If return.imputed = TRUE, the function returns a list containing
the A matrix
Giovanny Covarrubias-Pazaran (2024). evola: a simple evolutionary algorithm for complex problems. To be submitted to Bioinformatics.
evolafit
– the core function of the package
## random population of 200 lines with 1000 markers
X <- matrix(rep(0,200*1000),200,1000)
for (i in 1:200) {
X[i,] <- ifelse(runif(1000)<0.5,-1,1)
}
A <- A.mat(X)
## take a look at the Genomic relationship matrix
colfunc <- colorRampPalette(c("steelblue4","springgreen","yellow"))
hv <- heatmap(A[1:15,1:15], col = colfunc(100),Colv = "Rowv")
str(hv)