%\VignetteEngine{knitr::knitr} %\VignetteIndexEntry{Intro into regionplot}
library(topr) library(dplyr)
Zoom-in on the region around the IL23R gene:
regionplot(CD_UKBB, gene="IL23R")
knitr::include_graphics('figures/regionplot.jpg')
Label the top variant with it´s ID (rsid):
regionplot(CD_UKBB, gene="IL23R", annotate=5e-9)
knitr::include_graphics('figures/regionplot_annotate.jpg')
Increase variant label density by setting region_size
to 100000.
Annotate with vlines to get a better visual of where the variants are in relation to the genes and exons shown below:
regionplot(CD_UKBB, gene = "IL23R", annotate_with_vline = 5e-9, region_size = 100000)
knitr::include_graphics('figures/regionplot_annotate_vline.jpg')
Zoom in on the IL23R gene for multiple GWAS results
regionplot(list(UC_UKBB,CD_UKBB,CD_FINNGEN), gene = "IL23R", annotate_with_vline = 5e-6, legend_labels = c("UC UKBB","CD UKBB","CD FINNGEN"))
knitr::include_graphics('figures/regionplot_multi.jpg')
Note!! To be able to use the locuszoom function the input dataframe needs to include the R2
column with the pre-calculated correlation (R2) values, since topr does not do these calculations.
locuszoom(R2_CD_UKBB)
knitr::include_graphics('figures/locuszoom.jpg')
Annotate the variants with vertical lines highlighting their positions on the plot:
locuszoom(R2_CD_UKBB, annotate_with_vline = 1e-9, region_size = 100000)
knitr::include_graphics('figures/locuszoom_annotate.jpg')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.