Description Usage Arguments Details Value Examples
sim.haplotype
returns haplotypes of the specified number of SNPs simulated under linkage equilibrium.
1 | sim.haplotype(freq, nhaplo)
|
freq |
vector of values between 0 and 1. |
nhaplo |
positive integer. |
freq
are reference allele frequencies. nhaplo
haplotypes are simulated independently.
A matrix of nhaplo
rows and length(freq)
columns. Reference alleles are coded 1, alternate alleles are coded 2.
1 2 3 4 | nsnp = 7 # number of SNPs
freq = runif(nsnp, 0.05, 0.95)
nhaplo = 4 # number of founder haplotypes
sim.haplotype(freq, nhaplo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.