xQTLvisual_locusCompare | R Documentation |
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"),
snpLD = NULL
)
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'. |
snpLD |
A data.frame object of LD matrix. Default is null. |
A ggplot object.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.