plot_single_locus_extended: Plot a single locus in details

View source: R/plot_single_locus_extended.R

plot_single_locus_extendedR Documentation

Plot a single locus in details

Description

Plots several locus-specific variables through time for a specific locus, together with information about the regression of genetic values against genotypes across the population, at various time points.

Usage

plot_single_locus_extended(genome_data, indiv_genomes, locus)

Arguments

genome_data

Data frame containing locus-specific data (see ?read_loci and ?plot_single_locus)

indiv_genomes

Data frame containing individual whole genome data (see ?read_individual_genomes and plot_gene_regression)

locus

Index of the locus to plot

Value

A patchwork

Note

The regression of genetic values against genotypes requires whole-genome data at the individual-level, which may likely come from a separate simulation. This is because it uses a lot of memory to record individual whole genomes as often as one might record locus-specific variables, which are summaries across the population.

See https://github.com/rscherrer/speciome for more details.

See Also

read_loci, read_individual_genomes, plot_single_locus, plot_gene_regression

Examples


root <- system.file("extdata", "sim-example", package = "speciomer")
root_indiv_genomes <- system.file(
  "extdata", "sim-indiv-genomes", package = "speciomer"
)
genome_data <- read_loci(root, c("freq", "Fst", "Qst", "Cst", "alpha"))
indiv_genomes <- read_individual_genomes(
  root_indiv_genomes, individual_variables = "ecotypes"
)

plot_single_locus_extended(genome_data, indiv_genomes, locus = 1)


rscherrer/speciomer documentation built on March 11, 2023, 5:37 p.m.