gwasViewer is an interactive R Shiny application designed for Genome-Wide Association Study (GWAS) result exploration. It connects directly to a Spark-based catalog, enabling scalable analysis of large GWAS summary statistics.
- 📊 Interactive Manhattan Plot using Plotly
- 📈 QQ Plot for visualizing p-value distributions
- 🧬 GWAS Table Viewer with download support
- 🔍 Dynamic database selector based on Spark catalog
- ⚡ High-performance Spark backend with
sparklyr - 🎨 Customizable genome-wide significance threshold
The app imports the following packages:
shiny, qqman, DT, sparklyr, DBI, shinycssloaders, plotly, scales, dplyrInstall them via:
install.packages(c("shiny", "qqman", "DT", "DBI", "shinycssloaders", "plotly", "scales", "dplyr"))
# For sparklyr
install.packages("sparklyr")# Install from GitHub
remotes::install_github("atgenomix/atgwas")
# Launch the viewer
atgwas::gwasViewer()-
Sidebar
Genome-wide threshold: Customize p-value significance cutoffDatabase Selector: Choose Spark SQL database to analyze
-
Tabs
Table: Displays the GWAS result table with CSV exportQQ Plot: Observed vs expected p-values (supports PNG export)Manhattan: Interactive Manhattan plot with zoom, tooltips
The selected Spark database table must contain at least:
CHR: Chromosome identifierBP: Base-pair positionP: p-value- (Optional)
SNP: Variant ID
Significant variants (e.g., P < 5e-8) are highlighted interactively. The app preprocesses and subsets data to optimize rendering for large datasets.
Displays p-value inflation/deflation to detect population stratification or biases.
dbBrowserUI()/dbBrowserServer()— Spark database selectionsparkConnectionUI()/sparkConnectionServer()— Custom Spark connectionplot_manhattan()— Static ggplot2-based Manhattan plotprep_manhattan()— Data preprocessing for Manhattan plot
- CSV Download — Filtered GWAS result table
- PNG Download — QQ Plot
- Start the app and connect to your Spark master
- Select a database from the sidebar
- View and download the GWAS summary table
- Switch to the QQ plot tab and export as PNG
- Explore the Manhattan plot interactively
This project is licensed under the Apache License 2.0.
See the LICENSE file for details.