Create a Miami plot. Please look carefully at the parameters as these largely map to the manhattan() parameters, the main difference being that you need to supply a 2 element list of the parameter, one for the upper and one for the lower plot aspect of the Miami plot. Some parameters are not duplicated however - see the example defaults below.

miami(
  gwases,
  highlight_snps = list(top = NULL, bottom = NULL),
  highlight_win = list(top = 100, bottom = 100),
  annotate_snps = list(top = NULL, bottom = NULL),
  colours = list(top = c("#d9d9d9", "#bfbfbf"), bottom = c("#bfbfbf", "#d9d9d9")),
  highlight_colour = list(top = "#e15758", bottom = "#4f79a7"),
  highlight_shape = list(top = 16, bottom = 16),
  sig_line_1 = list(top = 5e-08, bottom = 5e-08),
  sig_line_2 = list(top = NULL, bottom = NULL),
  y_limits = list(top = c(NULL, NULL), bottom = c(NULL, NULL)),
  title = NULL,
  subtitle = list(top = NULL, bottom = NULL),
  base_text_size = 14,
  hit_table = FALSE,
  max_table_hits = 10,
  downsample = 0.1,
  downsample_pval = 0.1
)

Arguments

gwases

a list of 2 data.tables

highlight_snps

(optional) a character vector of SNPs to highlight

highlight_win

(optional) a numeric, the number of kb either side of the highlight_snps to also highlight (i.e create peaks)

annotate_snps

(optional) a character vector of SNPs to annotate

colours

(optional) a character vector colour codes to be replicated along the chromosomes

highlight_colour

(optional) a character colour code; the colour to highlight points in

highlight_shape

(optional) a numeric shape code; the shape of the highlight points (see ggplot2 shape codes)

sig_line_1

(optional) a numeric value (-log10(P)) for where to draw a horizontal line

sig_line_2

(optional) a numeric value (-log10(P)) for where to draw a second horizontal line

y_limits

(optional) a numeric length 2 vector c(min-Y, max-Y)

title

(optional) a string title

subtitle

(optional) a string subtitle

base_text_size

an integer, base_size for the ggplot2 theme

hit_table

(optional) a logical, whether to display a table of top hits (lowest P values)

max_table_hits

(optional) an integer, how many top hits to show in the table

downsample

(optional) a numeric between 0 and 1, the proportion by which to downsample by, e.g. 0.6 will remove 60% of points above the downsample_pval threshold (can help increase plotting speed with minimal impact on plot appearance)

downsample_pval

(optional) a numeric between 0 and 1, the p-values affected by downsampling, default >0.1

Value

a ggplot