danielecook
2/15/2017 - 3:48 AM

Andersen Lab Quest Cluster Configuration

Andersen Lab Quest Cluster Configuration

# Install linuxbrew
module load ruby/2.0.0
module load java/jdk1.8.0_25
module load gcc/5.1.0
git clone https://github.com/Linuxbrew/brew.git ~/.linuxbrew
brew install glibc --ignore-dependencies gpatch
brew install gpatch
brew tap homebrew/science
PATH="$HOME/.linuxbrew/bin:$PATH"
echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >>~/.bash_profile

# Install frequently used items
brew install bwa samtools

# Setup R
module load R/3.3.1

R --vanilla -e 'install.packages("tidyverse")'
mkdir -p ~/R/zone_info
cd ~/R/zone_info
wget https://github.com/danielecook/danielecook.github.io/raw/master/downloads/zone_info.zip
echo "export TZDIR=~/R/zone_info" >> ~/.bash_profile
# Use this script to setup your local computer to use the same command-line tools as the cluster.

# https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

brew install coreutils
brew install binutils
brew install homebrew/dupes/diffutils
brew install findutils --with-default-names
brew install gawk
brew install gnu-indent --with-default-names
brew install gnu-sed --with-default-names
brew install gnu-tar --with-default-names
brew install gnu-which --with-default-names
brew install gnutls
brew install homebrew/dupes/grep --with-default-names
brew install homebrew/dupes/gzip
brew install watch
brew install wdiff --with-gettext
brew install wget
brew install autojump
# Save this as  ~/.nextflow/config

process {
    module='R/3.3.1'
    executor = 'pbs'
    queue = 'genomics'
    clusterOptions = '-A b1042 -l walltime=24:00:00 -e errlog.txt'
}

workDir = "/projects/b1042/AndersenLab/work"
# Check our quest space
module load utilities
projectdu b1059
# Bash profile on quest
module load R/3.3.1

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs
hn=`hostname`
un=`whoami`
export PS1="[${hn}@${un}]\w [\D{%T}] 😱  "

PATH=$PATH:$HOME/local_install/bin

export GOOGLE_APPLICATION_CREDENTIALS="$HOME/.datastore.json"

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
export PYENV_ROOT=/home/dec211/.linuxbrew/var/pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
LD_LIBRARY_PATH=$HOME/programs/htslib:$LD_LIBRARY_PATH
[ -f /home/dec211/.linuxbrew/etc/profile.d/autojump.sh ] && . /home/dec211/.linuxbrew/etc/profile.d/autojump.sh

extract () {
   if [ -f $1 ] ; then
       case $1 in
        *.tar.bz2)      tar xvjf $1 ;;
        *.tar.gz)       tar xvzf $1 ;;
        *.tar.xz)       tar Jxvf $1 ;;
        *.bz2)          bunzip2 $1 ;;
        *.rar)          unrar x $1 ;;
        *.gz)           gunzip $1 ;;
        *.tar)          tar xvf $1 ;;
        *.tbz2)         tar xvjf $1 ;;
        *.tgz)          tar xvzf $1 ;;
        *.zip)          unzip $1 ;;
        *.Z)            uncompress $1 ;;
        *.7z)           7z x $1 ;;
        *)              echo "don't know how to extract '$1'..." ;;
       esac
   else
       echo "'$1' is not a valid file!"
   fi
}
eval "$(pyenv virtualenv-init -)"