manhattan.Rd
Create a Manhattan plot with ggplot2 geom_point.
manhattan(
gwas,
highlight_snps = NULL,
highlight_win = 100,
annotate_snps = NULL,
colours = c("#d9d9d9", "#bfbfbf"),
highlight_colour = "#e15758",
highlight_shape = 16,
highlight_alpha = 1,
sig_line_1 = 5e-08,
sig_line_2 = NULL,
y_limits = c(NULL, NULL),
title = NULL,
subtitle = NULL,
base_text_size = 14,
hit_table = FALSE,
max_table_hits = 10,
downsample = 0.9,
downsample_pval = 0.7
)
a data.table with a minimum of columns SNP, CHR, BP, and P
(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 between 0 and 1; the alpha of the highlighted points colour
(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