miami.Rd
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
)
a list of 2 data.tables
(optional) a character vector of SNPs to highlight
(optional) a numeric, the number of kb either side of the highlight_snps to also highlight (i.e create peaks)
(optional) a character vector of SNPs to annotate
(optional) a character vector colour codes to be replicated along the chromosomes
(optional) a character colour code; the colour to highlight points in
(optional) a numeric shape code; the shape of the highlight points (see ggplot2 shape codes)
(optional) a numeric value (-log10(P)) for where to draw a horizontal line
(optional) a numeric value (-log10(P)) for where to draw a second horizontal line
(optional) a numeric length 2 vector c(min-Y, max-Y)
(optional) a string title
(optional) a string subtitle
an integer, base_size
for the ggplot2 theme
(optional) a logical, whether to display a table of top hits (lowest P values)
(optional) an integer, how many top hits to show in the table
(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)
(optional) a numeric between 0 and 1, the p-values affected by downsampling, default >0.1
a ggplot