GLOWr implements the GLOW (inteGrative anaLysis using Optimized Weights) methodology for integrative variant-set association analysis with optimal weighting in whole-genome sequencing (WGS) studies. It provides Burden, SKAT, Fisher, and Omnibus variant-set tests with data-adaptive optimal weights, supporting both continuous and binary phenotypes with covariate adjustment, and scales to genome-wide analysis.
GLOWr is the methods-and-estimation layer of the GLOW software family: it implements the single-region/single-variant tests, the optimal-weight training (the effect-size model B and the variant-importance score PI), and the I/O for GDS/aGDS inputs. It builds on the GFisher package for accurate generalized Fisher-type combination p-values.
GLOW_Omni) that combines them via the Cauchy Combination Test (CCT), for continuous and binary phenotypes with covariate adjustment.B (get_B) and the variant-importance score PI (get_PI), combined into the per-variant weights used by the set-level tests (Optimal_Weights_M).getZ_marg_score) with saddlepoint (SPA) calibration for binary traits (getZ_marg_score_binary_SPA) and a genome-wide single-variant scan (marginal_scan).calibrate_pvalues), genomic-inflation estimation (estimate_inflation_factor, compute_lambda_gc), and LD-score regression utilities (ldsc_regression, compute_ld_scores).define_regions_gene, define_regions_window, define_regions_custom), variant-set extraction from GDS/aGDS (extract_variant_set), and FAVOR functional-annotation support (annotate_favor).
# install.packages("remotes")
remotes::install_github("ZWuLab/GLOWr")GLOWr depends on GFisher (ZWuLab/GFisher). The GitHub install resolves it automatically via the Remotes: field in DESCRIPTION; no separate step is needed. For a from-source install you may need to install GFisher first:
remotes::install_github("ZWuLab/GFisher")
remotes::install_github("ZWuLab/GLOWr")Several capabilities rely on Suggested packages installed on demand:
gdsfmt, SeqArray, SNPRelate (Bioconductor), and STAAR for the FAVOR/aGDS paths.readxl.MASS, mvtnorm.Install the Bioconductor dependencies with:
The set-level tests take per-variant score statistics together with the optimal-weight inputs B (allelic effect sizes) and PI (variant-importance prior). In a real analysis B and PI are estimated from training data with get_B() / get_PI() (see the vignettes); the toy values below stand in only to show the call shape.
library(GLOWr)
# Simulate a small variant set (n samples x m variants), covariates, and a
# binary phenotype.
set.seed(123)
n <- 500; m <- 20
G <- matrix(rbinom(n * m, 2, 0.1), n, m) # genotypes (0/1/2)
X <- matrix(rnorm(n * 2), n, 2) # covariates
Y <- rbinom(n, 1, 0.3) # binary phenotype
# Per-variant score statistics (fits the null model internally).
marg_stats <- getZ_marg_score(G, X, Y, trait = "binary")
# Optimal-weight inputs (normally estimated via get_B() / get_PI()).
B <- rnorm(m, mean = 0, sd = 0.2) # allelic effect sizes
PI <- runif(m, 0.1, 0.9) # variant-importance score
# GLOW omnibus test (combines Burden / SKAT / Fisher via CCT).
result <- GLOW_Omni(marg_stats, B, PI)
# The final omnibus p-value is the last row of the p-value matrix.
result$PVAL[nrow(result$PVAL), ]For the full optimal-weighting workflow (estimating B and PI, then running genome-wide), see the package vignettes (below) and the GLOWpipeline orchestration package.
vignette("estimating_effect_sizes", package = "GLOWr") — estimating the allelic effect sizes B for optimal weighting.vignette("data-preparation-get-B", package = "GLOWr") — preparing data for B estimation.vignette("B_estimation_diagnostics_example", package = "GLOWr") — diagnostic tools for B estimation.vignette("favor-annotation-quick-start", package = "GLOWr"): the short route through annotate_favor(): when to use it, what to have ready, which settings to choose, what comes out, and how to check it.vignette("favor-annotation", package = "GLOWr") — annotating a cohort with FAVOR: the matching rule, what a tier claims, the rsID evidence, and the cost.?GLOW_Omni, ?get_B, ?get_PI, ?getZ_marg_score, etc.?GLOWr.GLOWr/
├── R/ # R function implementations
├── src/ # C++ source (RcppArmadillo)
├── tests/testthat/ # Unit tests
├── vignettes/ # Tutorials and worked examples
├── data/ # Bundled training datasets
└── inst/extdata/ # Reference annotation / SNP-list resources
If you use GLOWr, please cite the GLOW methodology paper:
Zhang, H., Liu, M., Landers, J. E., and Wu, Z. (2026). Integrated weighted association test with application to genetic association studies. The Annals of Applied Statistics, 20(3), 2074-2097. https://doi.org/10.1214/26-AOAS2223
See inst/CITATION (or run citation("GLOWr")).
GLOWr builds on and interoperates with:
annotate_favor, get_PI). Zhou, H., Arapoglou, T., Li, X., et al. (2023). FAVOR: functional annotation of variants online resource and annotator for variation across the human genome. Nucleic Acids Research, 51(D1), D1300-D1311. doi:10.1093/nar/gkac966
SPAtest package, for binary-trait single-variant score tests (getZ_marg_score_binary_SPA, marginal_scan), which calibrates the score statistic under case-control imbalance and for rare variants. Dey, R., Schmidt, E. M., Abecasis, G. R., and Lee, S. (2017). A fast and accurate algorithm to test for binary phenotypes and its application to PheWAS. American Journal of Human Genetics, 101(1), 37-49. doi:10.1016/j.ajhg.2017.05.014
Maintainer: Zheyang Wu (zheyangwu@wpi.edu). Please file bugs and questions at https://github.com/ZWuLab/GLOWr/issues.
Developed with AI assistance; see AI-USE.md.