Plotting reported effect allele frequencies (EAF) against a reference set to identify study variants which significantly deviate from the expected population frequencies.

eaf_plot(
  gwas,
  eaf_col = "EAF",
  ref_eaf_col = "EUR_EAF",
  tolerance = 0.2,
  colours = list(missing = "#5B1A18", outlier = "#FD6467", within = "#7294D4"),
  title = NULL,
  facet_grid_row_col = NULL,
  facet_grid_col_col = NULL
)

Arguments

gwas

a data.table

eaf_col

a string, the column containing the study EAF data

ref_eaf_col

a string, the column containing the reference EAF data

tolerance

a numeric, frequency difference that determines outliers

colours

a 3 element list of colour codes, e.g. list(missing="#5B1A18", outlier="#FD6467", within="#7294D4")

title

a string, the plot title

facet_grid_row_col

(optional), a column by which to facet the plot by rows

facet_grid_col_col

(optional), a column by which to facet the plot by columns

Value

a ggplot