simulateGen {pedSimulate} | R Documentation |
Simulate genotypes
Description
Simulate genotypes for a given pedigree, allele frequency and mutation rate at each marker locus.
Usage
simulateGen(ped, AF, mut.rate = 0, seed = NA)
Arguments
ped |
: Pedigree |
AF |
: Vector of allele frequencies at different loci for the genotypes to be simulated. |
mut.rate |
: Vector of mutation rates at different loci for the genotypes to be simulated, default = 0 for no mutation. |
seed |
: A numeric variable input to the random number generator for reproducible simulations, default = 'NA' for non-reproducible simulations. |
Details
Only diploid and bi-allelic situations are covered. No linkage disequilibrium is simulated.
Value
M : The simulated genotype data.frame
with rows corresponding to animals (in the same order as in the pedigree) and columns corresponding to markers.
Examples
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)
[Package pedSimulate version 1.4.3 Index]