Installation

Linux Windows macOS

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 via CRAN

CRAN Status CRAN Downloads

Install GRAB from CRAN in your R console:

install.packages("GRAB")

Install via Conda

Conda-Forge Anaconda-Server Badge

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

Install from source code

GitHub main License: GPL v2+

First, create an environment for GRAB using Conda:

conda create --name grab_env --channel conda-forge \
  zlib r-bh r-rcpp r-rcpparmadillo r-rcppparallel r-data.table r-dplyr r-lme4 r-mvtnorm \
  r-ordinal r-survival r-rsqlite r-skat r-remotes r-dbplyr r-igraph r-optparse r-r.utils

Then, activate the environment and install GRAB:

conda activate grab_env
R -e "remotes::install_github('GeneticAnalysisinBiobanks/GRAB', upgrade='never')"

To verify that GRAB was installed successfully, check its version with:

R -e "packageVersion('GRAB')"

Install GRAB with Docker

Build a Docker image for GRAB named grab_img using the following command:

docker build -t grab_img - <<EOF
FROM condaforge/miniforge3
RUN conda install r-grab
EOF

Then, verify that GRAB can be loaded properly in a container:

docker run grab_img R -e "library(GRAB); message('GRAB loaded successfully')"

For instructions on using GRAB with Docker on the UK Biobank Research Analysis Platform (RAP), please see the section UK Biobank RAP.