Overview

GLOWpipeline is the orchestration-and-summary layer of the GLOW software family. It scales the single-region GLOW variant-set test (GLOWr) up to a genome-wide scan: it splits a genome into chunks for a compute-cluster array, runs the GLOWr single-region test over each chunk’s regions under an output policy, and aggregates the per-chunk results into a genome-wide table with significance thresholding and overlapping-window locus merging.

GLOWpipeline is the STAARpipeline analog in the GLOWpipeline -> GLOWr -> GFisher stack. It is deliberately cohort- and cluster-agnostic (resolved objects in, tables out), so a workflow script binds it to a specific dataset and scheduler.

Key Features

Installation

# install.packages("remotes")
remotes::install_github("ZWuLab/GLOWpipeline")

GLOWpipeline depends on GLOWr (ZWuLab/GLOWr), which itself depends on GFisher (ZWuLab/GFisher). The GitHub install resolves this transitive chain automatically via the Remotes: field in DESCRIPTION; no separate step is needed. For a from-source install you may prefer to install the dependencies first, GFisher before GLOWr:

remotes::install_github("ZWuLab/GFisher")
remotes::install_github("ZWuLab/GLOWr")
remotes::install_github("ZWuLab/GLOWpipeline")

System Requirements

  • R >= 3.5.0
  • The Bioconductor package SeqArray (a hard dependency, for GDS/aGDS I/O)

Install the Bioconductor dependency with:

# install.packages("BiocManager")
BiocManager::install("SeqArray")

Optional Dependencies

Several capabilities rely on Suggested packages installed on demand:

  • Coding-scan and aGDS paths: STAAR, gdsfmt, SNPRelate (Bioconductor).
  • Fast on-disk results IO: fst.

Quick Start

A genome-wide GLOW scan has three phases: chunk the genome, scan each chunk (typically one cluster-array task per chunk), then aggregate. The snippet below shows the call shapes for the first and last phases; the per-chunk scan (glow_scan_chunk() / run_scan_unit()) needs a GDS file plus a fitted null model and weight inputs, which a workflow script supplies (see the vignette).

library(GLOWpipeline)

# 1. Chunk the genome into sliding-window array tasks. Each row is one chunk:
#    a chromosome and a contiguous run of window start positions.
chrom_spans <- data.frame(
  chr   = c("21", "22"),
  start = c(5010000L, 10510000L),
  end   = c(48120000L, 50810000L)
)
chunks <- define_genome_chunks(
  chrom_spans,
  window_size = 2000, step_size = 1000,
  chunk_strategy = "fixed_mb", chunk_size_mb = 5
)
head(chunks)

# 2. Per chunk (one cluster-array task), run the scan over its windows.
#    glow_scan_chunk() / run_scan_unit() take a GDS path plus the resolved
#    null model + weight inputs from prepare_scan_run(); see the vignette.

# 3. Aggregate the per-chunk result files into a genome-wide table, flag
#    significant windows, and merge overlapping windows into loci.
# agg <- aggregate_scan_results(chunk_files, primary_test = "GLOW_Omni",
#                               alpha = 0.05)
# agg$scan_results_all   # genome-wide flat table
# agg$scan_sig_windows   # significant windows

For the full workflow (resolving the shared setup with prepare_scan_run(), running the scan, and aggregating), see the package vignette.

Documentation

Testing

The package includes a testthat suite:

devtools::test()

Package Structure

GLOWpipeline/
├── R/                  # orchestration + summary functions
├── man/                # function help (Rd)
├── tests/testthat/     # unit tests
└── vignettes/          # the orchestration overview vignette

License

GPL-3

Citation

If you use GLOWpipeline, 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("GLOWpipeline")).

GLOWpipeline builds on and interoperates with:

  • FAVOR — functional annotations underpinning the aGDS annotation paths consumed by the scan. 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
  • STAAR / STAARpipeline — the STAARpipeline analog this package mirrors; the coding aggregator merges native STAAR omnibi and uses STAARpipeline genes_info. Li, X., Li, Z., Zhou, H., et al. (2020). Dynamic incorporation of multiple in silico functional annotations empowers rare variant association analysis of large whole-genome sequencing studies at scale. Nature Genetics, 52, 969-983. doi:10.1038/s41588-020-0676-4. Li, Z., Li, X., Zhou, H., et al. (2022). A framework for detecting noncoding rare-variant associations of large-scale whole-genome sequencing studies. Nature Methods, 19, 1599-1611. doi:10.1038/s41592-022-01640-x

Contact

Maintainer: Zheyang Wu (). Please file bugs and questions at https://github.com/ZWuLab/GLOWpipeline/issues.

Authors

Developed with AI assistance; see AI-USE.md.