GRAB is an R package that provides a comprehensive suite of GWAS methods for biobank-scale data. For detailed instructions, see the GRAB manual page.
Version 0.1.2 (the last version before v0.2.0 and prior to June 2025) is archived in branch release/v0.1.2.
GRAB is an R package, with part of its code written in C++ for improved performance. GRAB can be installed on Linux, Windows, or macOS via CRAN, Conda, or from source code.
Install GRAB from CRAN in your R console:
install.packages("GRAB")
Install GRAB in a new Conda environment named grab_env
from the conda-forge
channel:
conda create -n grab_env -c conda-forge r-grab
Here is a quick tutorial for GWAS of a time-to-event trait using SPAmix.
library(GRAB)
<- system.file("extdata", "simuPHENO.txt", package = "GRAB")
PhenoFile <- data.table::fread(PhenoFile, header = TRUE)
PhenoData
<- GRAB.NullModel(
obj.SPAmix ::Surv(SurvTime, SurvEvent) ~ AGE + GENDER + PC1 + PC2,
survivaldata = PhenoData,
subjData = IID,
method = "SPAmix",
traitType = "time-to-event",
control = list(PC_columns = "PC1,PC2")
)
<- system.file("extdata", "simuPLINK.bed", package = "GRAB")
GenoFile <- file.path(tempdir(), "Results_SPAmix.txt")
OutputFile
GRAB.Marker(obj.SPAmix, GenoFile = GenoFile, OutputFile = OutputFile)
::fread(OutputFile) data.table