8000 GitHub - atgenomix/atgwas: gwasViewer: R Shiny app for interactive GWAS result exploration powered by Spark
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

atgenomix/atgwas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gwasViewer: Spark-Powered Shiny App for GWAS Visualization

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.

🚀 Features

  • 📊 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

📦 Required R Packages

The app imports the following packages:

shiny, qqman, DT, sparklyr, DBI, shinycssloaders, plotly, scales, dplyr

Install them via:

install.packages(c("shiny", "qqman", "DT", "DBI", "shinycssloaders", "plotly", "scales", "dplyr"))
# For sparklyr
install.packages("sparklyr")

🔧 Usage

# Install from GitHub
remotes::install_github("atgenomix/atgwas")
# Launch the viewer
atgwas::gwasViewer()

🖥️ UI Overview

  • Sidebar

    • Genome-wide threshold: Customize p-value significance cutoff
    • Database Selector: Choose Spark SQL database to analyze
  • Tabs

    • Table: Displays the GWAS result table with CSV export
    • QQ Plot: Observed vs expected p-values (supports PNG export)
    • Manhattan: Interactive Manhattan plot with zoom, tooltips

📂 Data Requirements

The selected Spark database table must contain at least:

  • CHR: Chromosome identifier
  • BP: Base-pair position
  • P: p-value
  • (Optional) SNP: Variant ID

📈 Visualization Details

Manhattan Plot

Significant variants (e.g., P < 5e-8) are highlighted interactively. The app preprocesses and subsets data to optimize rendering for large datasets.

QQ Plot

Displays p-value inflation/deflation to detect population stratification or biases.

🧪 Developer Modules

  • dbBrowserUI() / dbBrowserServer() — Spark database selection
  • sparkConnectionUI() / sparkConnectionServer() — Custom Spark connection
  • plot_manhattan() — Static ggplot2-based Manhattan plot
  • prep_manhattan() — Data preprocessing for Manhattan plot

📤 Export Options

  • CSV Download — Filtered GWAS result table
  • PNG Download — QQ Plot

👨‍🔬 Example Workflow

  1. Start the app and connect to your Spark master
  2. Select a database from the sidebar
  3. View and download the GWAS summary table
  4. Switch to the QQ plot tab and export as PNG
  5. Explore the Manhattan plot interactively

📄 License

This project is licensed under the Apache License 2.0.

See the LICENSE file for details.

🤝 Acknowledgements

About

gwasViewer: R Shiny app for interactive GWAS result exploration powered by Spark

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0