Description Usage Arguments Details Value Author(s) References See Also Examples
This function is used to simulate genotypic, phenotypic and covariate data for BC and F2 populations. The underlying genetic model is Cockerham's model and data for both continuous (normally distributed only) and ordinal traits can be generated.
1 2 3 4 5 6 7 | qb.sim.cross(len = rep(100,20), n.mar = 11, eq.spacing = TRUE,
n.ind = 400, type = c("f2","bc","riself","risib"), missing.geno = 0.0,
missing.pheno = 0.0, ordinal = c(0.5,0.5),
qtl.pos = NULL, qtl.main = NULL, qtl.epis = NULL,
covariate = NULL, gbye = NULL, seed = NULL )
## S3 method for class 'qb.sim'
summary(object, ...)
|
len |
defines the length (in cM) of each chromosome and number of
chromosomes. Thus |
n.mar |
The number of markers per chromosome. This can be specified as a single number or as a vector. If a single number is specified, all the chromosomes will have the same number of markers. If n.mark is a vector then it must have the same number of entries as there are chromosomes. For example, if n.mar = c(10,11,9) then we have a three chromosome model in which the first chromosome has 10 markers, the second has 11 and the third has 9.a vector specifying the number of markers per chromosome. |
eq.spacing |
if TRUE, markers will be equally spaced. Default is TRUE. If FALSE, markers are generated uniformly over the chromosome. |
n.ind |
specifies the number of individuals. |
type |
indicates whether to simulate an intercross ("f2") or a backcross ("bc"). |
missing.geno |
the frequency of missing genotypes. |
missing.pheno |
the frequency of missing phenotypic values. |
ordinal |
define the probabilities of each ordinal category and the number of elements in the vector will determine the number of categories. The elements must be positive and the should sum up to 1 |
qtl.pos |
This parameter specifies the positions
of qtl as a matrix with
dimensions (number of qtl) x 2. Note
that the row dimension is the number
of qtl and is not the number of
chromosomes. Each row identifies a qtl, the
first column entries represent the chromosome's index, the second
column entries represent the location on the chromosome
of the qtl. The (row) order in which qtl are listed in this parameter
is the index by which they are identified later on in the parameters
|
qtl.main |
The parameter |
qtl.epis |
It is a matrix specifying epistatic effects. There are 3 or 6 columns
depending on |
covariate |
A vector of two elements, the first being the true value of the coffecient for the fixed covariate and the second the true value for the standard deviation of the random covariate. |
gbye |
A matrix specifying the interaction between the fixed covariate and QTL main effect. The first column is the index of the QTL, the other column(s) is(are) the value(s) of interaction(s). |
seed |
Set pseudo-random number seed with
|
object |
An object of class |
... |
Not used here. |
The most important difference of this simulation function from others is that it computes phenotype values with full genetic model. i.e. both additive, dominance, and espistatic effects are considerred. Furthermore, environmental effects and gene-environment interactions can be included in the model to simulate phenotypes.
The outputted genotypes for markers and qtls will be coded as 1 and 2 for BC and 1,2, and 3 for F2. Missing data will be coded as NA.
qb.sim.cross
returns an object of class cross
(see read.cross
for details) with two additional
components, qtl
and gvalue
.
gvalue
is a vector of predicted values of the same length as
the phenotype pheno.normal
.
qtl
is of class qb.sim
is added which is a list of atmost 6
components depending on the options specified.
geno |
is a matrix of true QTL genotypes for every
individual and each locus. The genotypes are
defined following |
pos |
is a matrix of true QTL position. Same as |
herit.main |
is a matrix of the heritability of main effects.
|
herit.epis |
is a matrix of the heritability of epistatic effects.
|
herit.cov |
is a vector of length 2 containing the heritability of the fixed and random covariate. |
herit.gbye |
is a matrix of heritability of GxE interactions.
|
Dr. Nengjun Yi, et al., nyi@ms.ssg.uab.edu
qb.genoprob
, qb.data
qb.model
, qb.mcmc
,
sim.cross
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
## Simulate large intercross.
cross <- qb.sim.cross(len = rep(100,20), n.mar = 11, eq.spacing =FALSE,
n.ind = 500, type = "f2", ordinal = c(0.3,0.3,0.2,0.2),
missing.geno = 0.03, missing.pheno = 0.03,
qtl.pos = rbind(qtl.1=c(chr=1,pos=15),qtl.2=c(1,45),qtl.3=c(3,12),
qtl.4=c(5,15),qtl.5=c(7,15),qtl.6=c(10,15),qtl.7=c(12,35),qtl.8=c(19,15)),
qtl.main = rbind(main.1=c(qtl=1,add=0.5,dom=0),main.2=c(2,0,0.7),
main3=c(3,-0.5,0),main4=c(4,0.5,-0.5)),
qtl.epis = rbind(epis1=c(qtl.a=4,qtl.b=5,aa=-0.7,ad=0,da=0,dd=0),
epis2=c(6,8,0,1.2,0,0)),
covariate = c(fix.cov=0.5,ran.cov=0.07),
gbye = rbind(GxE.1=c(qtl=7,add=0.8,dom=0)) )
## Examine simulation information.
summary(cross$qtl)
## End(Not run)
## Simulate small backcross.
cross <- qb.sim.cross(len = rep(60,3), n.mar = 7, eq.spacing =FALSE,
n.ind = 100, type = "bc", ordinal = c(0.3,0.3,0.2,0.2),
missing.geno = 0.03, missing.pheno = 0.03,
qtl.pos = rbind(qtl.1=c(chr=1,pos=15), qtl.2=c(1,45),
qtl.3=c(2,12), qtl.4=c(3,15)),
qtl.main = rbind(main.1=c(qtl=1,add=1.5), main.2=c(2,0),
main3=c(3,-1), main4=c(4,0)),
qtl.epis = rbind(epis1=c(qtl.a=2,qtl.b=3,aa=-2), epis2=c(2,4,3)),
covariate = c(fix.cov=0.5,ran.cov=0.07),
gbye = rbind(GxE.1=c(qtl=3,add=2)))
summary(cross$qtl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.