aba.plot: aba.plot() - Plot aba results

Description Usage Arguments Value Author(s) Examples

View source: R/aba.R

Description

This function tries to create a bubble plot to illustrate the coloc region. This function returns a ggplot object which can be viewed or saved. It is highly recommended to save the plot to pdf for best visualization of the plot.

Usage

1
aba.plot(.data, ...)

Arguments

p12_ge

[Default = 0.80] Values below this will be colored as non-significant, while above have color for direction.

max_dot_size

[Default = 5] Adjust max size of dots.

title

Set the plot title. NULL will remove title.

Value

ggplot2 object for viz and export.

Author(s)

Karsten Sieber karsten.b.sieber@gsk.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
Basic use:
coloc_plot <- aba.plot(colocs)
coloc_plot <- aba.plot(colocs, max_dot_size = 3, title = "Cool plot")

View the returned object:
coloc_plot

Save the object to PDF:
ggsave(filename = "coloc_aba.pdf", 
       plot     = coloc_plot, 
       width    = 11,  
       height   = 8.5, 
       dpi      = 300)
       
Advanced use: query data, remove death related traits, filter, and then plot
colocs <- aba.wrapper(hgncid = "HMGCR")
colocs %>% dplyr::filter(input == "HMGCR") %>% pluck("figures", 1) + ggtitle("Best plot ever")
colocs %>% dplyr::filter(input == "HMGCR") %>% pluck("data", 1) %>% dplyr::filter(hgncid != "bad_gene") %>% aba.plot()

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.