| Type: | Package | 
| Title: | Visualization of Multiple Genome-Wide Association Study Summary Statistics | 
| Version: | 0.6.0 | 
| 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>. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| Suggests: | spelling, testthat (≥ 3.0.0) | 
| Config/testthat/edition: | 3 | 
| Imports: | data.table, dplyr, ggplot2, purrr, tibble, tidyr | 
| Language: | en-US | 
| RoxygenNote: | 7.3.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2024-05-06 19:14:04 UTC; wanjun | 
| Author: | Wanjun Gu | 
| Maintainer: | Wanjun Gu <wanjun.gu@ucsf.edu> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-05-07 08:00:07 UTC | 
Visualizing Multiple Genetic Studies
Description
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.
Usage
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"
)
Arguments
| 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"). | 
Value
A 'ggplot' object representing the visualization with the specified data.
Examples
### 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"
# )