Description Usage Arguments Details Value Examples

View source: R/calculate_allele_frequencies.R

Calculate for a number of regularly spaced markers the relative frequency of each ancestor in the population.

1 2 | ```
calculate_allele_frequencies(source_pop, locations = seq(0, 1, length.out
= 100), progress_bar = TRUE)
``` |

`source_pop` |
Population for which to estimate allele frequencies |

`locations` |
A vector indicating the locations (in Morgan) where to calculate the allele frequencies. |

`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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
## Not run:
number_founders = 20
wildpop = simulate_admixture(pop_size = 1000,
number_of_founders = number_founders,
total_runtime = 10,
morgan = 1,
seed = 666)
freq_output <- calculate_allele_frequencies(wildpop,
progress_bar = TRUE)
require(ggplot2)
ggplot(freq_output, aes(x=location, y = frequency,
col = as.factor(ancestor))) +
geom_line()
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.