simufreqD function simulate single population allele frequencies for independent loci.
Allele frequencies are generated as random deviates from a Dirichlet distribution, whose parameters control
the mean and the variance of the simulated allele frequencies.
simufreqD(nloc = 1, nal = 2, alpha = 1)
the number of loci to simulate
the numbers of alleles per locus. Either an integer, if the loci have the same number of alleles, or an integer vector, if the number of alleles differ between loci
the parameter used to simulate allele frequencies from the Dirichlet distribution. If the
When the number of alleles differ between loci,
Allele frequencies for independent loci are simulated using a Dirichlet distribution with parameter
alpha. At a given locus L with n alleles, the allele frequencies are modeled as a vector of random
p=(p1, ..., pn), following a Dirichlet distribution with parameters:
alpha = (alpha1, ..., alphan) where p1+...+pn=1 and alpha1,..., alphan > 0.
A matrix containing the simulated allele frequencies. The data is presented in the format of the Journal of Forensic Sciences for genetic data: allele names are given in the first column, and frequencies for a given allele are read in rows for the different markers in columns. When an allele is not observed for a given locus, the value is coded NA (instead of "-" in the original format).
The code used here for the generation of random Dirichlet deviates was previously implemented in the gtools library.
Hinda Haned email@example.com
Johnson NL, Kotz S, Balakrishnan N. Continuous Univariate Distributions, vol 2. John Wiley & Sons, 1995.
Wright S. The genetical structure of populations. Ann Eugen 1951;15:323-354.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.