Description Usage Arguments Examples
This function is usefull mainly to start a simulation with one allele being rare. If no input frequency is given, it will be assumed that all genotype have equal frequency. However, it might be usefull to start with one allele being very rare. This function allows to do so by automatically computing a initial set of frequency. To do so, it produce a pool of gamete where the given allele appears with the specified allele, and then perform random mating (without taking into account fitness). This ensure that the allele is present at the correct level, and that there is no bias in the sex-ratio.
1 | get.frequency.from.one.allele.frequency(genome, locus, allele, allele.frequency)
|
genome |
A S4 object of type genome |
locus |
the locus at which the allele should have a given frequency |
allele |
the allele which has a given frequency |
allele.frequency |
the initial frequency of the allele. |
1 2 3 4 5 6 | locus1 = create.locus(allele1=c(1,1),allele2 = c(1,2),sd = c(0,1))
locus2 = create.locus(allele1= c(1,1,2),allele2 = c(1,2,2),fitness.female = c(1,0.9,0.8),fitness.male = c(0.6,0.8,1))
genome = create.genome(locus=list(locus1,locus2))
initial.frequency <- get.frequency.from.one.allele.frequency(genome,2,1,0.01)
freqs <- compute.frequency.evolution(genome,initial.frequency)
freqs.allele <- get.allele.frequency(genome, freqs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.