geno_freqs_scatter: return a 'ggplot2' plot object of observed and expected...

Description Usage Arguments Examples

View source: R/geno_freqs_scatter.R

Description

return a ‘ggplot2’ plot object of observed and expected genotype freqs

Usage

1
geno_freqs_scatter(gfc, alpha = 0.2, max_plot_loci = 500)

Arguments

gfc

a tibble like that created by exp_and_obs_geno_freqs()

alpha

the transparency (alpha) parameter to apply to the points in the scatterplot. Default is 0.2.

max_plot_loci

By default this plots only 500 loci, sampled randomly, to keep ‘ggplot2’ taking forever to plot, for example, 100K points. If you want to plot all the points, set this to a number larger than the number of single nucleotide polymorphisms (SNPs) in the data set.

Examples

1
2
3
4
5
# get the expected and observed geno freqs
gfreqs <- exp_and_obs_geno_freqs(lobster_buz_2000)
g <- geno_freqs_scatter(gfreqs)

# now g is a 'ggplot2' object.

whoa documentation built on Aug. 11, 2021, 9:06 a.m.