Title: | Visualization of Multiple Genome-Wide Association Study Summary Statistics |
---|---|
Description: | A 'grammar of graphics' approach for visualizing summary statistics from multiple Genome-wide Association Studies (GWAS). It offers geneticists, bioinformaticians, and researchers a powerful yet flexible tool for illustrating complex genetic associations using data from various GWAS datasets. The visualizations can be extensively customized, facilitating detailed comparative analysis across different genetic studies. Reference: Uffelmann, E. et al. (2021) <doi:10.1038/s43586-021-00056-9>. |
Authors: | Wanjun Gu [aut, cre] |
Maintainer: | Wanjun Gu <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.6.0 |
Built: | 2025-03-05 03:17:15 UTC |
Source: | https://github.com/broccolito/ggmugs |
This function processes and combines summary statistics from multiple genetic studies and creates a visualization for all studies. The genetic loci are colored based on three significance thresholds to facilitate the visualization of highly significant genomic regions.
ggmugs( study_name = c("sumstat1", "sumstat2", "sumstat3", "sumstat4", "sumstat5"), summary_stat = c("data/sumstat1.txt", "data/sumstat2.txt", "data/sumstat3.txt", "data/sumstat4.txt", "data/sumstat5.txt"), p1 = 0.001, p2 = 5e-05, p3 = 1e-08, color1 = "#FFFFE0", color2 = "#FFC300", color3 = "#FF5733" )
ggmugs( study_name = c("sumstat1", "sumstat2", "sumstat3", "sumstat4", "sumstat5"), summary_stat = c("data/sumstat1.txt", "data/sumstat2.txt", "data/sumstat3.txt", "data/sumstat4.txt", "data/sumstat5.txt"), p1 = 0.001, p2 = 5e-05, p3 = 1e-08, color1 = "#FFFFE0", color2 = "#FFC300", color3 = "#FF5733" )
study_name |
A character vector of names for the studies. |
summary_stat |
A character vector of file paths where each path points to the summary statistics data file for the corresponding study. Files should be in a tabular format readable by 'fread' from the 'data.table' package. The files should contain 3 fields: 'chr' (Chromosome), 'pos' (chromosome position), and 'p' (association p-value). The positions of multiple GWAS summary statistics should have consistent genome builds. |
p1 |
The first significance level threshold for p-values (default is 1e-3). |
p2 |
The second, more stringent significance level threshold for p-values (default is 5e-5). |
p3 |
The most stringent significance level threshold for p-values (default is 1e-8). |
color1 |
The color for points below the first significance level (default is "#FFFFE0"). |
color2 |
The color for points between the first and second significance levels (default is "#FFC300"). |
color3 |
The color for points above the second significance level (default is "#FF5733"). |
A 'ggplot' object representing the visualization with the specified data.
### NOT RUN # ggmugs( # study_name = c("study1", "study2", "study3", "study4", "study5"), # summary_stat = c("https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat1.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat2.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat3.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat4.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat5.txt"), # p1 = 1e-4, # p2 = 1e-6, # p3 = 1e-8, # color1 = "#FFFFE0", # color2 = "#FFC300", # color3 = "#FF5733" # )
### NOT RUN # ggmugs( # study_name = c("study1", "study2", "study3", "study4", "study5"), # summary_stat = c("https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat1.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat2.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat3.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat4.txt", # "https://raw.githubusercontent.com/Broccolito/ggmugs_data/main/sumstat5.txt"), # p1 = 1e-4, # p2 = 1e-6, # p3 = 1e-8, # color1 = "#FFFFE0", # color2 = "#FFC300", # color3 = "#FF5733" # )