build deploy - UNR-CFB/lahontan GitHub Wiki

Building lahontan

The following instructions assume you are in the lahontan project root after cloning the repository with:

git clone --recursive https://github.com/UNR-CFB/lahontan.git

and changing into the project root with:

cd lahontan

From Source

Execute the install script provided with lahontan:

./lib/autoSetup.sh

Then if there are no errors, source the new user environment.

source ~/.bashrc

Installing from source may require installing additional dependencies with your linux package manager. For example, in Ubuntu 16.04 the following command will install each package required for a complete installation:

apt-get update && apt-get install git cmake gcc g++ libncurses-dev libhdf5-cpp-11 libhdf5-dev python3-docopt vim unzip openjdk-8-jdk-headless wget gfortran libbz2-dev liblzma-dev libpcre++-dev libcurl4-openssl-dev libssl-dev pandoc texlive-latex-extra libxml2-dev libmariadb-client-lgpl-dev libreadline6-dev libreadline6 libtbb-dev

To additionally install R with the pipeline, run the install script with the -r option:

./lib/autoSetup.sh -r

Running the install script with the -r option will pull the R source into the project src/ directory, where it will then compile R, link the resulting binaries into the project bin/ directory, and install each required R library.

If you already have R installed on your computer, then the following R command installs each R library required for a complete installation:

R -e 'source("https://bioconductor.org/biocLite.R");biocLite(ask=FALSE);biocLite(c("devtools","DESeq2","edgeR","ReportingTools","regionReport","pachterlab/sleuth","ballgown","DT","pheatmap"));devtools::install_github(c("docopt/docopt.R","alyssafrazee/RSkittleBrewer"))'

Additionally, it may be useful to link your R executable to the project bin/ directory in order to avoid any confusion as to what version of R is being used:

ln -s /usr/local/bin/Rscript $RNASEQDIR/Rscript
ln -s /usr/local/bin/R $RNASEQDIR/R

Note: The environment variable $RNASEQDIR points to the bin/ directory inside of the lahontan project root.

From Singularity Image

Make sure Singularity is installed on your machine and that you have sudo privileges.

Build the image by running:

sudo singularity build lahontan.simg Singularity

After building the lahontan image, you no longer need escalated privileges and can use the image on virtually any machine that has singularity installed!