Learn R Programming

QTLEMM (version 3.0.1)

D.make: Generate D Matrix

Description

Generate the genetic design matrix of specified QTL number and effects.

Usage

D.make(
  nQTL,
  type = "RI",
  a = TRUE,
  d = TRUE,
  aa = FALSE,
  dd = FALSE,
  ad = FALSE
)

Value

The genetic design matrix, where the elements represent the coded variables of the QTL effects. It is a g*p matrix, where g is the number of possible QTL genotypes, and p is the number of effects in the MIM model.

Arguments

nQTL

integer. The number of QTLs.

type

character. The population type of the dataset. Includes backcross (type="BC"), advanced intercross population (type="AI"), and recombinant inbred population (type="RI"). The default value is "RI".

a

integer or vector. A integer or vector to determines which additive effects of QTLs will be considered in this design matrix. If a=TRUE, the additive effect of all QTLs will be considered. If a=FALSE, no additive effect will be considered.

d

integer or vector. A integer or vector to determines which dominant effects of QTLs will be considered in this design matrix. If d=TRUE, the dominant effect of all QTLs will be considered.If d=FALSE, no dominant effect will be considered.

aa

vector or matrix. The additive-by-additive interaction. Two format can be used in this parameter. One format is a vector, where every two elements indicate a combination of additive-by-additive interaction. The other format is a 2*i matrix, where i is the number of combinations of interaction, and each column indicates the two interacting QTLs. Additionally, if aa=TRUE, all combinations of additive-by-additive interaction will be considered. If aa=FALSE, no additive-by-additive interaction will be considered.

dd

vector or matrix. The dominant-by-dominant interaction. The format is the same as that in aa.

ad

vector or matrix. The additive-by-dominant interaction. The format is the same as that in aa. Note that in each pair of QTLs, the first element indicates the additive effect, and the second element indicates the dominant effect.

References

KAO, C.-H. and Z.-B. ZENG 1997 General formulas for obtaining the maximum likelihood estimates and the asymptotic variance-covariance matrix in QTL mapping when using the EM algorithm. Biometrics 53, 653-665. <doi: 10.2307/2533965.>

KAO, C.-H., Z.-B. ZENG and R. D. TEASDALE 1999 Multiple interval mapping for Quantitative Trait Loci. Genetics 152: 1203-1216. <doi: 10.1093/genetics/152.3.1203>

Examples

Run this code
D.make(4, d = c(1,3,4), aa = c(1,2,2,3), dd = c(1,3,1,4), ad = c(1,2,2,1,2,3,3,4))

aa <- matrix(c(1,2,3,4,4,5), 2, 3)
aa
D.make(5, type = "BC", a = c(1,3,4,5), aa = aa)

Run the code above in your browser using DataLab