R/visualize.R
xQTLvisual_locusCompare.Rd
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
)
A data.frame or data.table with two columns: dbSNP id and p-value.
A data.frame or data.table with two columns: dbSNP id and p-value.
Default is the snp that is farthest from the origin of the coordinates.
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
(boolean, optional) Should the legend be shown? Default: TRUE.
(string, optional) Either 'bottomright','topright', or 'topleft'. Default: 'bottomright'.
(character, optional) Customized color vectors (5 kinds of colors).
(numberic) text size of the axis labels
(numberic) text size of the axis title
(numberic) text size of the title of the plot
(character) Lable for x-axis
(character) Lable for x-axis
(character) Title of the plot
A data.frame object of LD matrix. Default is null.
A ggplot object.
# \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")
# }