This function is rebuilt from locuscompare.R (https://github.com/boxiangliu/locuscomparer/blob/master/R/locuscompare.R).

xQTLvisual_locusCompare(
  eqtlDF,
  gwasDF,
  highlightSnp = "",
  population = "EUR",
  legend = TRUE,
  legend_position = c("topright", "bottomright", "topleft"),
  point_color = NULL,
  axis_text_size = 1.3,
  axis_title_size = 1.3,
  title_size = 1.4,
  xlab_text = "",
  ylab_text = "",
  title_text = "",
  snpLD = NULL
)

Arguments

eqtlDF

A data.frame or data.table with two columns: dbSNP id and p-value.

gwasDF

A data.frame or data.table with two columns: dbSNP id and p-value.

highlightSnp

Default is the snp that is farthest from the origin of the coordinates.

population

One of the 5 popuations from 1000 Genomes: 'AFR', 'AMR', 'EAS', 'EUR', and 'SAS'.#' @param token LDlink provided user token, default = NULL, register for token at https://ldlink.nci.nih.gov/?tab=apiaccess

legend

(boolean, optional) Should the legend be shown? Default: TRUE.

legend_position

(string, optional) Either 'bottomright','topright', or 'topleft'. Default: 'bottomright'.

point_color

(character, optional) Customized color vectors (5 kinds of colors).

axis_text_size

(numberic) text size of the axis labels

axis_title_size

(numberic) text size of the axis title

title_size

(numberic) text size of the title of the plot

xlab_text

(character) Lable for x-axis

ylab_text

(character) Lable for x-axis

title_text

(character) Title of the plot

snpLD

A data.frame object of LD matrix. Default is null.

Value

A ggplot object.

Examples

# \donttest{
library(data.table)
# load data:
eqtlDF <-fread("https://gitee.com/stronghoney/exampleData/raw/master/eqtl/eqtlAsso1.txt")
gwasDF <-fread("https://gitee.com/stronghoney/exampleData/raw/master/gwas/AD/gwasChr6Sub3.txt")
# visualize:
xQTLvisual_locusCompare( eqtlDF, gwasDF, legend_position="topleft")
# }