plot_over_time: Plot the frequencies of all ancestors over time

View source: R/plot_over_time.R

plot_over_timeR Documentation

Plot the frequencies of all ancestors over time

Description

This function plots the frequency of all ancestors over time at a specific location on the chromosome, after performing a simulation.

Usage

plot_over_time(frequencies, focal_location)

Arguments

frequencies

A tibble containing four columns: time, location, ancestor, frequency. A fifth colum population can be included if the tibble is the result of simulate_admixture_migration.

focal_location

Location (in Morgan) where to plot the allele frequencies.

Value

a ggplot2 object

Examples

pop <- simulate_admixture(
           module = ancestry_module(number_of_founders = 10,
                                    markers = 0.5),
           pop_size = 1000,
           total_runtime = 11)
require(ggplot2)
plot_over_time(frequencies = pop$frequencies,
               focal_location = 0.5)

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