Description Usage Arguments Details Value Author(s) Examples
Calculate for a number of regularly spaced markers the relative frequency of each ancestor in the population.
1 | calculate_allele_frequencies(source_pop, step_size, progress_bar)
|
source_pop |
Population for which to estimate allele frequencies |
step_size |
Distance between markers, a smaller step_size provides a more complete overview, but is also more computationally heavy. |
progress_bar |
Displays a progress_bar if TRUE. Default value is TRUE |
Markers are equidistantly spaced, with a distance of step_size
in between them.
A tibble containing the allele frequencies
Thijs Janzen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
number_founders = 20
wildpop = create_population(pop_size = 1000,
number_of_founders = number_founders,
total_runtime = 10,
morgan = 1,
seed = 666)
freq_output <- calculate_allele_frequencies(wildpop,
step_size = 0.001,
progress_bar = TRUE)
require(ggplot2)
ggplot(freq_output, aes(x=location, y = frequency, col = as.factor(ancestor))) +
geom_line()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.