LocusXcanR is an R package that creates an R Shiny application to assist with TWAS fine-mapping. It allows researchers to integrate information from multiple sources (GWAS and TWAS) and interactively visualize TWAS results in-context, one genomic locus at a time. LocusXcanR aids TWAS interpretation, can be extended to other ‘omics data, and highlights R Shiny’s effectiveness at presenting results in an approachable, interactive, and visual format.
For additional details and an application of LocusXcanR, please reference our manuscript currently available on bioRxiv: https://www.biorxiv.org/content/10.1101/2021.02.23.432444v1
Source code available in R/app.R
The LocusXcanR package depends on R (>= 4.0.3) and imports the following R packages:
- data.table
- dplyr
- DT
- ggplot2
- Gviz
- magrittr
- plotly
- RColorBrewer
- shiny
- stats
- tidyr
- visNetwork
First, install the devtools package. You can do this from CRAN. Invoke R and then type:
install.packages("devtools")
Load the devtools package:
library(devtools)
Install the package from GitHub using install_github("author/package") as follows:
install_github("amanda-tapia/LocusXcanR")
A vignette documenting the use of LocusXcanR is contained within the package. After installing the package, run:
vignette("LocusXcanR")
This should bring up the vignette in the help window of the R console. If this doesn't work, you may need to try the following:
devtools::install(build_vignettes = TRUE)
vignette("LocusXcanR")
See R/example/example_script.R
to render an example R Shiny application.
Example datasets can be found in inst/extdata
.