if(require(EnsDb.Hsapiens.v75)) {
data(SLE_gwas_sub)
genes <- c("STAT4", "UBE2L3", "IRF5")
loclist <- lapply(genes, locus,
data = SLE_gwas_sub,
ens_db = "EnsDb.Hsapiens.v75",
LD = "r2")
## produce 3 locus plots, one on each page
multi_layout(loclist)
## place 3 locus plots in a row on a single page
multi_layout(loclist, ncol = 3)
## full control
loc <- locus(SLE_gwas_sub, gene = 'STAT4', flank = 1e5, LD = "r2",
ens_db = "EnsDb.Hsapiens.v75")
loc2 <- locus(SLE_gwas_sub, gene = 'IRF5', flank = c(7e4, 2e5), LD = "r2",
ens_db = "EnsDb.Hsapiens.v75")
loc3 <- locus(SLE_gwas_sub, gene = 'UBE2L3', LD = "r2",
ens_db = "EnsDb.Hsapiens.v75")
multi_layout(ncol = 3,
plots = {
locus_plot(loc, use_layout = FALSE, legend_pos = 'topleft')
locus_plot(loc2, use_layout = FALSE, legend_pos = NULL)
locus_plot(loc3, use_layout = FALSE, legend_pos = NULL)
})
}
Run the code above in your browser using DataLab