plot_frequencies: Plot the frequencies of all ancestors along the genome.

View source: R/plot_frequencies.R

plot_frequenciesR Documentation

Plot the frequencies of all ancestors along the genome.

Description

This function plots the frequency of all ancestors after performing a simulation.

Usage

plot_frequencies(
  result,
  locations = seq(0, 1, length.out = 100),
  progress_bar = FALSE
)

Arguments

result

An object which is the result of select_population or create_population_selection, being a list with four properties: population, frequencies, initial_frequencies and final 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 FALSE

Value

a ggplot2 object

Examples

pop <- simulate_admixture(
             module = ancestry_module(number_of_founders = 4),
             pop_size = 1000,
             total_runtime = 11)
require(ggplot2)
plot_frequencies(result = pop)

thijsjanzen/GenomeAdmixR documentation built on Feb. 16, 2024, 7:27 p.m.