simupopD(npop = 1, nloc = 1, na = 2, globalfreq = NULL, which.loc = NULL,
alpha1, alpha2 = 1)
globalfreq
matrix, default considers all locinpop
giving the variance parameter of the Dirichlet
distribution used
to generate allele frequencies in the npop
independent populationstabfreq
object giving the allele frequencies of the chosen reference population,
with the chosen loci.tabfreq
object giving the allele frequencies of the simulated populations.alpha2
.
At a given locus L with n alleles, the allele frequencies are modeled as a vector of random
variables p=(p1, ..., pn) following a Dirichlet distribution with a parameter vector of length n,
where each component is equal to alpha2, p1+...+pn=1 and alpha2 > 0.
Note that a more sophisticated generation of global allele frequencies is possible using the simufreqD
function.
Similarly, allele frequencies in the independent populations are simulated using a Dirichlet Distribution.
For example, for the first population to simulate, at a given locus L with n alleles,
the allele frequencies are modeled as a vector
of random variables p=(p1, ..., pn) following a Dirichlet distribution with a parameter vector of length n:
(p1(1-a1)/alpha1[1], ..., pn(1-alpha1[1])/alpha1[1]), where p1+...+pn=1 and alpha1[1] > 0.
alpha1[1] is the variance parameter for population 1 and is equivalent to Wright's Fst. The closest this parameter is to one,
the more the population allele frequencies are different from the values of the reference population.simufreqD
# simulate allele frequencies for two populations
data(Tu)
simupopD(npop=2,globalfreq=Tu, which.loc=c("FGA","TH01","TPOX"),
alpha1=c(0.2,0.3),alpha2=1)
Run the code above in your browser using DataLab