powered by
Simulate genotypes for a given pedigree, allele frequency and mutation rate at each marker locus.
simulateGen(ped, AF, mut.rate = 0, seed = NA)
M : The simulated genotype data.frame with rows corresponding to animals (in the same order as in the pedigree) and columns corresponding to markers.
data.frame
: Pedigree data.frame with columns for animal, sire, and dam identification.
: Vector of allele frequencies at different loci for the genotypes to be simulated.
: Vector of mutation rates at different loci for the genotypes to be simulated, default = 0 for no mutation.
: A numeric variable input to the random number generator for reproducible simulations, default = `NA` for non-reproducible simulations.
Only diploid and bi-allelic situations are covered. No linkage disequilibrium is simulated.
nSNP = 100 AF = runif(nSNP, 0.01, 0.99) mut.rate = runif(nSNP, 0, 10^-5) ped = data.frame(ID=1:5, SIRE=c(0,0,1,0,3), DAM=c(0,0,2,2,4)) gen = simulateGen(ped, AF, mut.rate, seed=684)
Run the code above in your browser using DataLab