SAIGE

From Alliance Doc
Jump to navigation Jump to search
This site replaces the former Compute Canada documentation site, and is now being managed by the Digital Research Alliance of Canada.

Ce site remplace l'ancien site de documentation de Calcul Canada et est maintenant géré par l'Alliance de recherche numérique du Canada.

Other languages:

SAIGE is an R package developed with Rcpp for genome-wide association tests in large-scale data sets and biobanks.

The method

  • accounts for sample relatedness based on the generalized mixed models;
  • allows for model fitting with either full or sparse genetic relationship matrix (GRM);
  • works for quantitative and binary traits;
  • handles case-control imbalance of binary traits;
  • computationally efficient for large data sets;
  • performs single-variant association tests;
  • provides effect size estimation through Firth’s Bias-Reduced Logistic Regression;
  • performs conditional association analysis.

This page discusses how to install SAIGE package 1.0.0.

Installing SAIGE

1. Load the appropriate modules.

Question.png
[name@server ~]$ module load gcc r/4.2.2 savvy superlu flexiblas

2. Create the installation directory.

[name@server ~]$ mkdir -p ~/.local/R/$EBVERSIONR/
[name@server ~]$ export R_LIBS=~/.local/R/$EBVERSIONR/

3. Install the R dependencies.

Question.png
[name@server ~]$ R -e 'install.packages(c("Rcpp", "RcppParallel", "data.table", "RcppArmadillo", "SPAtest", "RcppEigen", "BH", "optparse", "SKAT", "MetaSKAT", "qlcMatrix", "RhpcBLASctl", "RSQLite", "dplyr"), repos="https://cloud.r-project.org/")'

4. Download SAIGE version 1.0.0.

[name@server ~]$ git clone --recursive https://github.com/saigegit/SAIGE.git -b 1.0.0
[name@server ~]$ cd SAIGE/

5. Patch the installation.

[name@server ~]$ rm configure
[name@server ~]$ sed -i 's/llapack/lflexiblas/' src/Makevars

First, remove the configure file to avoid installing already available dependencies. Then, change the library name to correctly link to the Makevars file to make sure that the linking options will use FlexiBLAS. Doing so will prevent the i>unable to find -llapack error message displayed at installation. Read more information on FlexiBLAS, BLAS and LAPACK.

6. Compile and install.

Question.png
[name@server ~]$ R CMD INSTALL .

7. Test that it is available.

Question.png
[name@server ~]$ R -e 'library(SAIGE)'