Use the coloc results (coloc_QTLs) to determine which full summary stats (gwas.qtl_paths) to plot.

multi_locus_plot(
  gwas.qtl_paths = NULL,
  coloc_QTLs = NULL,
  plot_dat = NULL,
  qtl_thresh = 1e-05,
  coloc_thresh = 0.8,
  gwas_label = "GWAS",
  remove_extra_panes = T,
  y_facet_angle = 0,
  x_facet_angle = 270,
  show_plot = T,
  verbose = T
)

Examples

data("coloc_QTLs") gwas.qtl_paths <- example_eQTL_Catalogue_query_paths() gg_gwas.qtl <- multi_locus_plot(gwas.qtl_paths=gwas.qtl_paths, coloc_QTLs=coloc_QTLs, coloc_thresh=.5, qtl_thresh=.005, remove_extra_panes=F)
#> [1] "++ 2 GWAS.QTL.eGene combinations will be plotted." #> [1] "+ Merging 2 files." #> [1] "+ Using 4 cores." #> [1] "+ Merged data.table: 39348 rows x 51 columns."
#> Error: Can't add `gg.qtls` to a ggplot object.
if (FALSE) { data("coloc_QTLs_full") library(ggplot2); library(dplyr); root_dir <- "/pd-omics/brian/catalogueR_queries/Nalls23andMe_2019" gwas.qtl_paths <- list.files(root_dir, pattern="*.tsv.gz", recursive = T, full.names = T) gwas.qtl_paths <- gsub("___","__",gwas.qtl_paths) colnames(coloc_QTLs_full) <- gsub("\\.df1",".QTL",colnames(coloc_QTLs_full)) colnames(coloc_QTLs_full) <- gsub("\\.df2",".GWAS",colnames(coloc_QTLs_full)) plot_dat <- gather_colocalized_data(gwas.qtl_paths=gwas.qtl_paths, coloc_QTLs=coloc_QTLs_full, qtl_thresh=NULL, coloc_thresh=.95) gg_gwas.qtl <- multi_locus_plot(plot_dat=plot_dat) }