powered by
sim.haplotype returns haplotypes of the specified number of SNPs simulated under linkage equilibrium.
sim.haplotype
sim.haplotype(freq, nhaplo)
vector of values between 0 and 1.
positive integer.
A matrix of nhaplo rows and length(freq) columns. Reference alleles are coded 1, alternate alleles are coded 2.
nhaplo
length(freq)
freq are reference allele frequencies. nhaplo haplotypes are simulated independently.
freq
# NOT RUN { nsnp = 7 # number of SNPs freq = runif(nsnp, 0.05, 0.95) nhaplo = 4 # number of founder haplotypes sim.haplotype(freq, nhaplo) # }
Run the code above in your browser using DataLab