| sim.cross {qtl} | R Documentation |
Simulates data for a QTL experiment using a model in which QTLs act additively. A backcross, intercross, or phase-known 4-way cross may be simulated.
sim.cross(map, model=NULL, n.ind=100, type=c("f2", "bc", "4way"),
error.prob=0, missing.prob=0, partial.missing.prob=0,
keep.qtlgeno=FALSE,error.ind=TRUE,
map.function=c("haldane","kosambi","c-f"))
map |
A list of length n.chr; its components are vectors containing the marker locations on each of the chromosomes. |
model |
A matrix where each row corresponds to a different QTL, and gives the chromosome number, cM position and effects of the QTL. |
n.ind |
Number of individuals to simulate. |
type |
Indicates whether to simulate an intercross ("f2"), a backcross ("bc"), or a 4-way cross ("4way"). |
error.prob |
The genotyping error rate to simulate. |
missing.prob |
The rate of missing genotypes to simulate. |
partial.missing.prob |
When simulating an intercross or 4-way cross, this gives the rate at which markers will be incompletely informative (i.e., dominant or recessive). |
keep.qtlgeno |
If TRUE, genotypes for the simulated QTLs are not removed from the marker genotype data or genetic maps. |
error.ind |
If TRUE, and if error.prob > 0, the components
of geno will each contain a matrix, errors, with 1's
indicating a simulated genotyping error. |
map.function |
Indicates whether to use the Haldane, Kosambi or Carter-Falconer map function when converting genetic distances into recombination fractions. |
Meiosis is assumed to exhibit no crossover interference. If one of
the chromosomes has class X, it is assumed to be the X
chromosome, and is assumed to be segregating in the cross. Thus, in an
intercross, it is segregating like a backcross chromosome. In a 4-way
cross, a second phenotype, sex, will be generated.
In order to ensure that the code is relatively easy to read,
simulation is actually performed in a set of subfunctions,
sim.cross.bc, sim.cross.f2, and sim.cross.4way.
An object of class cross. See read.cross for
details.
Karl W Broman,
kbroman@jhsph.edu
http://biosun01.biostat.jhsph.edu/~kbroman/software/qtl.html
read.cross, fake.f2,
fake.bc fake.4way
map <- sim.map() fake <- sim.cross(map,type="f2", model = rbind(c(1,20,1,2),c(5,20,0.5,0.5)))