Learn R Programming

mpMap (version 1.14)

sim.mpcross: Simulate data from multi-parent designs

Description

Data is simulated according to a pedigree, map and QTL model

Usage

sim.mpcross(map, pedigree, qtl = NULL, vare = 1, error.prob = 0, missing.prob = 0, full.prob = 0, keep.qtlgeno = TRUE, transpos = 1, transval = 0, map.function = c("haldane", "kosambi"), seed = 1, fg = NULL, founderld = FALSE)

Arguments

map
Linkage map with which to generate data. See sim.map
pedigree
Pedigree for a multi-parent cross. Can be generated using sim.mpped
qtl
QTL model, defined by a matrix with one row per QTL and 6 columns: the chromosome of the QTL, the position in cM on that chromosome, and the four founder effects
vare
Phenotypic error variance
error.prob
Probability of genotyping errors - data will be changed with this probability to one of the other founder values
missing.prob
Probability of missing data in final genotypes
full.prob
Probability of fully informative markers. Markers will be assigned with this probability to retain IBD genotypes from founders rather than being recoded into binary values. See details below for more information
keep.qtlgeno
Flag for whether to retain the QTL genotypes as a component in the output mpcross object
transpos
Positions of potential translocation (vector)
transval
Which founder carries the translocation
map.function
Map function for conversion of linkage map into recombination fractions. Default is "haldane"
seed
Random seed for generation of data
fg
Input founder genotypes (optional) - otherwise generated randomly
founderld
Flag for whether to generate founder genotypes in linkage equilibrium (FALSE=default) or according to recombination map (TRUE)

Value

Object of class mpcross. See mpcross for further details. Additional components are:
ibd
Fully informative founder genotypes for all markers
qtlgeno
If argument keep.qtlgeno is TRUE then QTL genotypes will be retained

Details

Data are initially generated by transmitting founder genotypes down through the pedigree to the finals. Errors, missing data, and binary alleles are then overlaid on this data (stored in $ibd). If founderld==FALSE, binary alleles are generated at each locus with probability 0.25 that one founder will have the allele; 0.50 that two founders will have the allele; and 0.25 that three founders will have the allele. The founders with the allele are randomly selected after the number of founders with the allele has been simulated. If founderld==TRUE then some markers may be monomorphic and will need to be removed from the resulting object using clean.mpcross.

Note that if founder genotypes are input they should be coded as follows: DArT markers take values in 0,1 SNP markers take values in 0,2 All other markers take some other set of values.

See Also

sim.mpped, sim.map

Examples

Run this code
map <- sim.map(len=100, n.mar=11, eq.spacing=TRUE, include.x=FALSE)
sim.ped <- sim.mpped(4, 1, 500, 6, 1)
sim.dat <- sim.mpcross(map=map, pedigree=sim.ped, qtl=matrix(data=c(1, 50, .4, 0, 0, 0), nrow=1, ncol=6, byrow=TRUE), seed=1)

Run the code above in your browser using DataLab