Install coge: Difference between revisions

From CoGepedia
Jump to navigation Jump to search
Line 164: Line 164:
Replacing XXX's with your own information. (Change paths as necessary; this template is configured for having the Coge directory in the path: /opt/coge)<br>  
Replacing XXX's with your own information. (Change paths as necessary; this template is configured for having the Coge directory in the path: /opt/coge)<br>  


##This is a configuration file for CoGe.
#
# CoGe Configuration File
#database configuration
#
DB           mysql
 
DBNAME coge
#database configuration
DBHOST   localhost
DB     mysql
DBPORT   3307
DBNAME coge
DBUSER   coge
DBHOST localhost
DBPASS   XXXXXXX
DBPORT 3307
DBUSER coge
#CAS authentication for webservices
DBPASS 321coge123
CAS_URL https://auth.iplantcollaborative.org/cas
 
USER_API_URL https://agave.iplantc.org:443/profiles/v2
#basic auth name and password
AUTHNAME 6mv9x9lyts8oje8uj3t6yo
#basic auth name and password
AUTHPASS f59ba33ee35d363ffefd8b27b375e587b0e5c7a1
AUTHNAME XXXXXX
 
AUTHPASS XXXXXX
# DE public key for JWT in resources/
DE_PUBLIC_KEY DE_rsa.pub
#web cookie name
 
COOKIE_NAME cogec
#web cookie name
COOKIE_NAME cogec
#support email address
 
SUPPORT_EMAIL XXXXXX
#support email address
SUPPORT_EMAIL coge.genome@gmail.com
#basedir for coge
 
COGEDIR /opt/coge/web/
#data dir for coge's programs
DATADIR /storage/coge/data/
#bin dir for coge's programs
 
BINDIR /opt/coge/web/bin/
#cache dir
CACHEDIR /scratch/coge/cache
#scripts dir for coge's programs
 
SCRIPTDIR /opt/coge/scripts
#dir for pair-wise whole genome comparisons (e.g. SynMap)
DIAGSDIR /opt/apache2/coge/web/data/diags/
#resources dir for static files
 
RESOURCESDIR /opt/coge/resources
#dir for popgen analysis results
POPGENDIR /storage/coge/data/popgen/
#data dir for coge's programs
 
DATADIR /storage/coge/data/
#fasta dir
FASTADIR /opt/apache2/coge/web/data/fasta/
#cache dir
 
CACHEDIR /storage/coge/data/cache/
#sequence dir
SEQDIR /storage/coge/data/genomic_sequence/
#dir for pair-wise whole genome comparisons (e.g. SynMap)
 
DIAGSDIR /opt/coge/web/data/diags/
#experiment dir
EXPDIR /storage/coge/data/experiments/
#fasta dir
 
FASTADIR /opt/coge/web/data/fasta/
#temp dir for coge
TEMPDIR /opt/apache2/coge/web/tmp/
#sequence dir
 
SEQDIR /storage/coge/data/genomic_sequence/
#secure temp dir
SECTEMPDIR /scratch/coge/tmp/
#experiment dir
 
EXPDIR /storage/coge/data/experiments/
# IRODS dir
IRODSDIR /iplant/home/<USER>/coge_data
#TMPL dir for CoGe's web page templates
IRODSSHARED /iplant/home/shared
TMPLDIR /opt/coge/web/tmpl/
IRODSENV /opt/apache/coge/irodsEnv
 
#temp dir for coge
#Base URL for web-site
TEMPDIR /opt/coge/web/tmp/
URL /coge/
API_URL /api/v1/
#secure temp dir
 
SECTEMPDIR /storage/coge/tmp/
#URL for temp directory
TEMPURL /coge/tmp/
#IRODS dir
 
IRODSDIR /iplant/home/&lt;USER&gt;/coge_data
#blast style scoring matrix dirs
IRODSSHARED /iplant/home/shared
BLASTMATRIX /storage/coge/data/blast/matrix/
IRODSENV /opt/coge/web/irodsEnv
 
#blastable DB
#Base URL for web-server
BLASTDB /scratch/coge/cache/blast/db/
URL /coge/
 
#lastable DB
#URL for temp directory
LASTDB /scratch/coge/cache/last/db/
TEMPURL /coge/tmp/
 
#directory for bed files
#blast style scoring matrix dirs
BEDDIR /opt/apache2/coge/web/data/bed/
BLASTMATRIX /storage/coge/data/blast/matrix/
 
#WIKI URL
#blastable DB
WIKI_URL https://genomevolution.org/wiki/index.php
BLASTDB /storage/coge/data/blast/db/
 
#servername for links
#lastable DB
#SERVER https://genomevolution.org/coge/
LASTDB /storage/coge/data/last/db/
SERVER http://10.140.65.127/coge/
 
#directory for bed files
#CAS URL
BEDDIR /opt/coge/web/data/bed/
CAS_URL https://auth.iplantcollaborative.org/cas4
USER_API_URL https://agave.iplantc.org:443/profiles/v2
#servername for links
MOJOLICIOUS_PORT 3303
SERVER http://XXXXXX/
 
# Job Engine Server
#Job Engine Server
JOBSERVER localhost
JOBSERVER localhost
 
# Job Engine Port
#Job Engine Port
JOBPORT 5151
JOBPORT 5151
 
#directory for caching genome browser images
#directory for caching genome browser images
IMAGE_CACHE /opt/apache2/coge/web/data/image_cache/
IMAGE_CACHE /opt/coge/web/data/image_cache/
 
#maximum number of processor to use for multi-CPU systems
#maximum number of processor to use for multi-CPU systems
MAX_PROC 44
MAX_PROC 32
COGE_BLAST_MAX_PROC 8
COGE_BLAST_MAX_PROC 8
 
#True Type Font
#True Type Font
FONT /usr/local/fonts/arial.ttf
FONT /usr/share/fonts/truetype/msttcorefonts/arial.ttf
 
#various programs
#SynMap workflow tools
BL2SEQ                 /usr/local/bin/legacy_blast.pl bl2seq
KSCALC /opt/coge/web/bin/SynMap/kscalc.pl
BLAST                  /usr/local/bin/legacy_blast.pl blastall
GEN_FASTA /opt/coge/web/bin/SynMap/generate_fasta.pl
MULTI_LASTZ           /opt/apache2/coge/bin/blastz_wrapper/blastz.py
RUN_ALIGNMENT /opt/coge/web/bin/SynMap/quota_align_merge.pl
LAST_PATH             /opt/apache2/coge/bin/last_wrapper/
RUN_COVERAGE /opt/coge/web/bin/SynMap/quota_align_coverage.pl
MULTI_LAST             /opt/apache2/coge/bin/last_wrapper/last.py
PROCESS_DUPS /opt/coge/web/bin/SynMap/process_dups.pl
LAGAN                 /opt/apache2/coge/bin/lagan-64bit/lagan.pl
GEVO_LINKS /opt/coge/web/bin/SynMap/gevo_links.pl
LAGANDIR               /opt/apache2/coge/bin/lagan-64bit/
DOTPLOT_DOTS /opt/coge/web/bin/dotplot_dots.pl
CHAOS                 /opt/apache2/coge/bin/lagan-64bit/chaos
GENOMETHREADER         /opt/apache2/coge/bin/gth
#various programs
DIALIGN               /opt/apache2/coge/bin/dialign2_dir/dialign2-2_coge
BL2SEQ /usr/local/bin/legacy_blast.pl bl2seq
DIALIGN2       /opt/apache2/coge/bin/dialign2_dir/dialign2-2_coge
BLASTZ /usr/local/bin/blastz
DIALIGN2_DIR       /opt/apache2/coge/bin/dialign2_dir/
LASTZ /usr/local/bin/lastz
HISTOGRAM       /opt/apache2/coge/bin/histogram.pl
MULTI_LASTZ /opt/coge/web/bin/blastz_wrapper/blastz.py
KS_HISTOGRAM       /opt/apache2/coge/bin/ks_histogram.pl
LAST_PATH /opt/coge/web/bin/last_wrapper/
TANDEM_FINDER       /opt/apache2/coge/bin/dagchainer/tandems.py
MULTI_LAST /opt/coge/web/bin/last_wrapper/last.py
DAGCHAINER       /opt/apache2/coge/bin/dagchainer_bp/dag_chainer.py
#BLAST 2.2.23+
EVALUE_ADJUST       /opt/apache2/coge/bin/dagchainer_bp/dagtools/evalue_adjust.py
BLAST /usr/local/bin/legacy_blast.pl blastall
FIND_NEARBY       /opt/apache2/coge/bin/dagchainer_bp/dagtools/find_nearby.py
TBLASTN /usr/local/bin/tblastn
QUOTA_ALIGN       /opt/apache2/coge/bin/quota-alignment/quota_align.py
BLASTN /usr/local/bin/blastn
CLUSTER_UTILS       /opt/apache2/coge/bin/quota-alignment/cluster_utils.py
BLASTP /usr/local/bin/blastp
BLAST2RAW       /opt/apache2/coge/bin/quota-alignment/scripts/blast_to_raw.py
TBLASTX /usr/local/bin/tblastx
SYNTENY_SCORE       /opt/apache2/coge/bin/quota-alignment/scripts/synteny_score.py
FASTBIT_LOAD /usr/local/bin/ardea
CODEML               /opt/apache2/coge/bin/codeml/codeml-coge
FASTBIT_QUERY /usr/local/bin/ibis
CODEMLCTL             /opt/apache2/coge/bin/codeml/codeml.ctl
SAMTOOLS /usr/bin/samtools
CONVERT_BLAST         /opt/apache2/coge/bin/convert_long_blast_to_short_blast_names.pl
RAZIP /usr/local/bin/razip
DATASETGROUP2BED       /opt/apache2/coge/bin/dataset_group_2_bed.pl
 
###Formatdb needs to be updated to makeblastdb
#stuff for Mauve and whole genome alignments
FORMATDB /usr/bin/formatdb
MAUVE       /opt/apache2/coge/bin/GenomeAlign/progressiveMauve-muscleMatrix
LAGAN /opt/coge/web/bin/lagan-64bit/lagan.pl
COGE_MAUVE   /opt/apache2/coge/bin/GenomeAlign/mauve_alignment.pl
LAGANDIR /opt/coge/web/bin/lagan-64bit/
MAUVE_MATRIX /opt/apache2/coge/web/data/blast/matrix/nt/Mauve-Matrix-GenomeAlign
CHAOS /opt/coge/web/bin/lagan-64bit/chaos
 
GENOMETHREADER /opt/coge/web/bin/gth
# RNA-seq pipelines
DIALIGN /opt/coge/web/bin/dialign2_dir/dialign2-2_coge
PARSE_CUFFLINKS /opt/apache2/coge/scripts/parse_cufflinks.py
DIALIGN2 /opt/coge/web/bin/dialign2_dir/dialign2-2_coge
 
DIALIGN2_DIR /opt/coge/web/bin/dialign2_dir/
# SNP pipelines
HISTOGRAM /opt/coge/web/bin/histogram.pl
PLATYPUS /opt/apache2/coge/bin/Platypus_0.8.1/Platypus.py
KS_HISTOGRAM /opt/coge/web/bin/ks_histogram.pl
GATK    /opt/apache2/coge/bin/GenomeAnalysisTK.jar
PYTHON /usr/bin/python
PICARD  /opt/apache2/coge/bin/picard-tools-2.4.1/picard.jar
PYTHON26 /usr/bin/python
 
DAG_TOOL /opt/coge/web/bin/SynMap/dag_tools.py
# ChIP-seq pipeline
BLAST2BED /opt/coge/web/bin/SynMap/blast2bed.pl
HOMER_DIR /opt/apache2/coge/bin/Homer
TANDEM_FINDER /opt/coge/web/bin/dagchainer/tandems.py
 
DAGCHAINER /opt/coge/web/bin/dagchainer_bp/dag_chainer.py
#THIRD PARTY URLS
EVALUE_ADJUST /opt/coge/web/bin/dagchainer_bp/dagtools/evalue_adjust.py
GENFAMURL http://dev.gohelle.cirad.fr/genfam/?q=content/upload
FIND_NEARBY /opt/coge/web/bin/dagchainer_bp/dagtools/find_nearby.py
QUOTA_ALIGN /opt/coge/web/bin/quota-alignment/quota_align.py
CLUSTER_UTILS /opt/coge/web/bin/quota-alignment/cluster_utils.py
BLAST2RAW /opt/coge/web/bin/quota-alignment/scripts/blast_to_raw.py
SYNTENY_SCORE /opt/coge/web/bin/quota-alignment/scripts/synteny_score.py
DOTPLOT /opt/coge/web/bin/dotplot.pl
SVG_DOTPLOT /opt/coge/web/bin/SynMap/dotplot.py
NWALIGN /usr/bin/nwalign
CODEML /opt/coge/web/bin/codeml/codeml-coge
CODEMLCTL /opt/coge/web/bin/codeml/codeml.ctl
CONVERT_BLAST /opt/coge/web/bin/convert_long_blast_to_short_blast_names.pl
DATASETGROUP2BED /opt/coge/web/bin/dataset_group_2_bed.pl
ARAGORN /usr/local/bin/aragorn
CLUSTALW /usr/local/bin/clustalw2
GZIP /bin/gzip
GUNZIP /bin/gunzip
TAR /bin/tar
#MotifView
MOTIF_FILE /opt/coge/web/bin/MotifView/motif_hash_dump
#stuff for Mauve and whole genome alignments
MAUVE /opt/coge/web/bin/GenomeAlign/progressiveMauve-muscleMatrix
COGE_MAUVE /opt/coge/web/bin/GenomeAlign/mauve_alignment.pl
MAUVE_MATRIX /opt/coge/web/data/blast/matrix/nt/Mauve-Matrix-GenomeAlign
#newicktops is part of njplot package
NEWICKTOPS /usr/bin/newicktops
#convert is from ImageMagick
CONVERT /usr/bin/convert
CUTADAPT /usr/local/bin/cutadapt
GSNAP /usr/local/bin/gsnap
CUFFLINKS /usr/local/bin/cufflinks
PARSE_CUFFLINKS /opt/coge/scripts/parse_cufflinks.py
GMAP_BUILD /usr/local/bin/gmap_build
BOWTIE_BUILD /usr/local/bin/bowtie2-build
TOPHAT /usr/local/bin/tophat
#THIRD PARTY URLS
GENFAMURL http://dev.gohelle.cirad.fr/genfam/?q=content/upload
GRIMMURL http://grimm.ucsd.edu/cgi-bin/grimm.cgi#report
QTELLER_URL http://geco.iplantc.org/qTeller


=== Install Perl Modules  ===
=== Install Perl Modules  ===

Revision as of 17:53, 10 June 2016

Installing CoGe on Ubuntu

Note: these instructions were last updated and verified on June 3rd, 2016.

Initial Dependencies

Run the following command:

sudo apt-get -y install {package}

where {package} is each of the following:

apache2
aragorn
blast2
build-essential
checkinstall
expat
gcc-multilib
git
graphviz
imagemagick
libdb-dev
libgd2-xpm-dev
libperl-dev
libgd-gd2-perl
libconfig-yaml-perl
libssl-dev
libzmq3-dev
mysql-server
ncbi-blast+
ncbi-blast+-legacy
njplot
phpmyadmin
python-dev
python-numpy
python-software-properties
samtools
swig
sqlite3
ttf-mscorefonts-installer
ubuntu-dev-tools
libapache-asp-perl
libapache2-mod-perl2
libapache2-mod-wsgi
python-pip
nodejs
npm
libboost-all-dev  (for TopHat)

Create MySQL database

Dump CoGe database schema (if using existing CoGe installation, otherwise see schema file below).

mysqldump -d -h localhost -u root -pXXXXXXX coge | sed 's/AUTO_INCREMENT=[0-9]*\b//' > coge_mysql_schema.sql

Create new CoGe Database

create database coge

Initialize new coge database

mysql -u root -pXXXXXXXX coge < coge_mysql_schema.sql

Populate a few entries in the feature_type table

mysql -u root -pXXXXXXXXX coge < coge_feature_types.sql

Create new MySQL user for the CoGe database

use mysql;
create user 'coge'@'localhost' IDENTIFIED BY 'XXXXXX';
grant all privileges on coge.* to coge;
flush privileges;

Note: The CoGe web-user needs edit/insert permission on some tables. Here is a snapshot of what these are:

Deploy the Web Site

Generate a public key and add to your GitHub account

See https://help.github.com/articles/generating-an-ssh-key/

Download the CoGe repository

git clone https://github.com/LyonsLab/coge.git

Run setup script to make required subdirectories

cd coge/web
./setup.sh

Configure apache

The /etc/apache2/sites-available/default.conf should look like this:

<VirtualHost *>
	ServerAdmin webmasterl@localhost
	DocumentRoot /opt/coge/web

	<Files *.pl>
    		SetHandler perl-script
    		PerlResponseHandler ModPerl::Registry
    		Options +ExecCGI
    		PerlSendHeader On
	</Files>

	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>

	Alias /gobe/ /opt/coge/web/gobe/
	<Directory /opt/coge/web/gobe/>
		Options +FollowSymLinks +ExecCGI
		AddHandler wsgi-script .py
	</Directory>

	<Directory /opt/coge>
		Options Includes ExecCGI FollowSymLinks
    		AllowOverride All
    		SetEnv COGE_HOME "/opt/coge/"
    		Order allow,deny
    		Allow from all
	</Directory>

	<Directory /opt/coge/web/services/>
        	Options +FollowSymLinks +ExecCGI
        	AddHandler wsgi-script .py
 	</Directory>

 	<Directory /opt/coge/web/services/JBrowse/JBrowse_TrackContent_WS/>
        	Options +FollowSymLinks +ExecCGI
        	AddHandler wsgi-script .py
  	</Directory>
	ScriptAliasMatch (?i)^/coge/jex(.*) /opt/coge/web/services/jex.py/$1
        AliasMatch (?i)^/coge(.*) /opt/coge/web/$1
        ProxyPass /coge/api/v1/ http://localhost:3303/
        ProxyPassReverse /coge/api/v1/ http://localhost:3303/

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
	ServerSignature On
</VirtualHost>

Enable Required Apache Modules

sudo a2enmod rewrite headers proxy proxy_http expires perl ssl

and reset Apache

Configure coge.conf file

Replacing XXX's with your own information. (Change paths as necessary; this template is configured for having the Coge directory in the path: /opt/coge)

  1. CoGe Configuration File
  1. database configuration

DB mysql DBNAME coge DBHOST localhost DBPORT 3307 DBUSER coge DBPASS 321coge123

  1. basic auth name and password

AUTHNAME 6mv9x9lyts8oje8uj3t6yo AUTHPASS f59ba33ee35d363ffefd8b27b375e587b0e5c7a1

  1. DE public key for JWT in resources/

DE_PUBLIC_KEY DE_rsa.pub

  1. web cookie name

COOKIE_NAME cogec

  1. support email address

SUPPORT_EMAIL coge.genome@gmail.com

  1. data dir for coge's programs

DATADIR /storage/coge/data/

  1. cache dir

CACHEDIR /scratch/coge/cache

  1. dir for pair-wise whole genome comparisons (e.g. SynMap)

DIAGSDIR /opt/apache2/coge/web/data/diags/

  1. dir for popgen analysis results

POPGENDIR /storage/coge/data/popgen/

  1. fasta dir

FASTADIR /opt/apache2/coge/web/data/fasta/

  1. sequence dir

SEQDIR /storage/coge/data/genomic_sequence/

  1. experiment dir

EXPDIR /storage/coge/data/experiments/

  1. temp dir for coge

TEMPDIR /opt/apache2/coge/web/tmp/

  1. secure temp dir

SECTEMPDIR /scratch/coge/tmp/

  1. IRODS dir

IRODSDIR /iplant/home/<USER>/coge_data IRODSSHARED /iplant/home/shared IRODSENV /opt/apache/coge/irodsEnv

  1. Base URL for web-site

URL /coge/ API_URL /api/v1/

  1. URL for temp directory

TEMPURL /coge/tmp/

  1. blast style scoring matrix dirs

BLASTMATRIX /storage/coge/data/blast/matrix/

  1. blastable DB

BLASTDB /scratch/coge/cache/blast/db/

  1. lastable DB

LASTDB /scratch/coge/cache/last/db/

  1. directory for bed files

BEDDIR /opt/apache2/coge/web/data/bed/

  1. WIKI URL

WIKI_URL https://genomevolution.org/wiki/index.php

  1. servername for links
  2. SERVER https://genomevolution.org/coge/

SERVER http://10.140.65.127/coge/

  1. CAS URL

CAS_URL https://auth.iplantcollaborative.org/cas4 USER_API_URL https://agave.iplantc.org:443/profiles/v2 MOJOLICIOUS_PORT 3303

  1. Job Engine Server

JOBSERVER localhost

  1. Job Engine Port

JOBPORT 5151

  1. directory for caching genome browser images

IMAGE_CACHE /opt/apache2/coge/web/data/image_cache/

  1. maximum number of processor to use for multi-CPU systems

MAX_PROC 44 COGE_BLAST_MAX_PROC 8

  1. True Type Font

FONT /usr/local/fonts/arial.ttf

  1. various programs

BL2SEQ /usr/local/bin/legacy_blast.pl bl2seq BLAST /usr/local/bin/legacy_blast.pl blastall MULTI_LASTZ /opt/apache2/coge/bin/blastz_wrapper/blastz.py LAST_PATH /opt/apache2/coge/bin/last_wrapper/ MULTI_LAST /opt/apache2/coge/bin/last_wrapper/last.py LAGAN /opt/apache2/coge/bin/lagan-64bit/lagan.pl LAGANDIR /opt/apache2/coge/bin/lagan-64bit/ CHAOS /opt/apache2/coge/bin/lagan-64bit/chaos GENOMETHREADER /opt/apache2/coge/bin/gth DIALIGN /opt/apache2/coge/bin/dialign2_dir/dialign2-2_coge DIALIGN2 /opt/apache2/coge/bin/dialign2_dir/dialign2-2_coge DIALIGN2_DIR /opt/apache2/coge/bin/dialign2_dir/ HISTOGRAM /opt/apache2/coge/bin/histogram.pl KS_HISTOGRAM /opt/apache2/coge/bin/ks_histogram.pl TANDEM_FINDER /opt/apache2/coge/bin/dagchainer/tandems.py DAGCHAINER /opt/apache2/coge/bin/dagchainer_bp/dag_chainer.py EVALUE_ADJUST /opt/apache2/coge/bin/dagchainer_bp/dagtools/evalue_adjust.py FIND_NEARBY /opt/apache2/coge/bin/dagchainer_bp/dagtools/find_nearby.py QUOTA_ALIGN /opt/apache2/coge/bin/quota-alignment/quota_align.py CLUSTER_UTILS /opt/apache2/coge/bin/quota-alignment/cluster_utils.py BLAST2RAW /opt/apache2/coge/bin/quota-alignment/scripts/blast_to_raw.py SYNTENY_SCORE /opt/apache2/coge/bin/quota-alignment/scripts/synteny_score.py CODEML /opt/apache2/coge/bin/codeml/codeml-coge CODEMLCTL /opt/apache2/coge/bin/codeml/codeml.ctl CONVERT_BLAST /opt/apache2/coge/bin/convert_long_blast_to_short_blast_names.pl DATASETGROUP2BED /opt/apache2/coge/bin/dataset_group_2_bed.pl

  1. stuff for Mauve and whole genome alignments

MAUVE /opt/apache2/coge/bin/GenomeAlign/progressiveMauve-muscleMatrix COGE_MAUVE /opt/apache2/coge/bin/GenomeAlign/mauve_alignment.pl MAUVE_MATRIX /opt/apache2/coge/web/data/blast/matrix/nt/Mauve-Matrix-GenomeAlign

  1. RNA-seq pipelines

PARSE_CUFFLINKS /opt/apache2/coge/scripts/parse_cufflinks.py

  1. SNP pipelines

PLATYPUS /opt/apache2/coge/bin/Platypus_0.8.1/Platypus.py GATK /opt/apache2/coge/bin/GenomeAnalysisTK.jar PICARD /opt/apache2/coge/bin/picard-tools-2.4.1/picard.jar

  1. ChIP-seq pipeline

HOMER_DIR /opt/apache2/coge/bin/Homer

  1. THIRD PARTY URLS

GENFAMURL http://dev.gohelle.cirad.fr/genfam/?q=content/upload

Install Perl Modules

  • Install cpanminus
sudo cpan install App::cpanminus
  • Install third-party modules required by CoGe
cat modules.txt | xargs sudo cpanm
  • Install CoGe-specific modules
./make_perl.sh
  • After installing modules, reset the Apache webserver
sudo service apache2 restart

Install Python Modules

sudo pip install pyzmq

Install Javascript dependencies

  • Install javascript dependencies
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g bower
bower install

Install Third-Party Bioinformatics Tools

Download the programs listed below and follow the installation instructions on their respective websites.

Most programs can be installed with the following commands (but check the documentation for each program):

./configure --prefix=/usr/local/
make
sudo make install

Install Third-Party Fonts

Download from here: https://www.microsoft.com/typography/fonts/font.aspx?FMID=1705

And copy to /usr/local/fonts/arial.ttf (or whatever path you set in the coge.conf config file under FONT)

Install blast matrices

cd /storage/coge/data/blast
git clone https://github.com/LyonsLab/blast-matrix.git
mv blast-matrix matrix

Install JBrowse

Copy from existing CoGe installation if one exists. Otherwise, download and install the JBrowse package from http://jbrowse.org/install/

unzip JBrowse-1.11.4-dev.zip
mv JBrowse-1.11.4 /coge/web/js/jbrowse

Install CCTools

  • Extract the file (this example is using version 4.3 which may differ from the version downloaded)
tar xzvf cctools-4.3.0-source.tar.gz
  • Compile and install
cd cctools-4.3.0-source
./configure --prefix /usr/local
make
sudo make install
  • Add the following upstart scripts for the work_queue_pool and catalog_server to /etc/init

By default the pool directory for work_queue will be in /storage/work_queue adjust the directory as needed.

# /etc/init/.conf

description "The cctools work queue pool"
author "Evan Briones"

start on (local-filesystems and net-device-up IFACE=eth0)

stop on shutdown

respawn limit 30 60

pre-start script
    POOL_DIR=/storage/work_queue
    LOG_FILE=$POOL_DIR/logs/work_queue_pool.log

    # Add the pool directory and set ownership
    if ! [ -d "$WORK_DIR" ]; then
        mkdir -p $POOL_DIR/workers
        mkdir -p $POOL_DIR/logs
        chown -R www-data:www-data $POOL_DIR
    fi

    # Remove the pidfile if it exists
    rm -f $POOL_DIR/work_queue_pool.pid

    # Archive old log and timestamp the value
    if [ -f "$LOG_FILE" ]; then
        TIMESTAMP=$(date  +"%Y-%m-%d.%H.%m.%S")
        mv -f $LOG_FILE "$LOGFILE.$TIMESTAMP"
    fi
end script

script
    POOL_DIR=/storage/work_queue
    LOG_FILE=$POOL_DIR/logs/work_queue_pool.log
    #CONFIG=/etc/yerba/work_queue_pool.conf
    #WORK_QUEUE_POOL=$(which work_queue_pool)
    WORK_QUEUE_FACTORY=$(which work_queue_factory)

    export CATALOG_HOST=localhost
    export CATALOG_PORT=1024

    exec start-stop-daemon -c www-data -g www-data -d $POOL_DIR --start \
        -p $POOL_DIR/work_queue_pool.pid --exec $WORK_QUEUE_FACTORY \
        -- -T local -M coge-main -d all -o $LOG_FILE -w 10 \
        -S $POOL_DIR -E "--workdir=$POOL_DIR/workers"
end script
# /etc/init/.conf

description "The cctools catalog server"
author "Evan Briones"

start on (local-filesystems and net-device-up IFACE=eth0)

stop on shutdown

respawn limit 30 60

script
    exec catalog_server -p 1024 -l 100 -T 3
end script
  • Start the catalog server and work_queue_pool
sudo start work_queue_pool
sudo start catalog_server

Install the Job Engine (Yerba)

Download and install the latest Yerba package from https://github.com/LyonsLab/Yerba/archive/v0.3.4.tar.gz

For more specific details on Yerba visit https://github.com/LyonsLab/Yerba/

The default installation path for Yerba will be in /opt/Yerba. If another path is chosen update the configuration files to match.

  • Copy and the configuration file to /etc/yerba/yerba.cfg
[DEFAULT]
debug = True
access-log = /opt/Yerba/log/access.log
yerba-log = /opt/Yerba/log/yerbad.log

[yerba-log]
logging = /etc/yerba/logging.conf

[access-log]
logging = /etc/yerba/access.conf

[yerba]
port = 5151
level = DEBUG

[workqueue]
catalog_server = localhost
catalog_port = 1024
project = coge-main
log = /var/log/workqueue.log
port = -1
password = /etc/yerba/workqueue_pass
debug = True

[db]
path = /opt/Yerba/workflows.db
start_index = 100
  • Copy the upstart file to /etc/upstart/yerba.conf
# /etc/init/yerba.conf

description "Yerba server daemon"
author "Evan Briones"

start on (local-filesystems and net-device-up IFACE=eth0)

stop on shutdown

respawn

pre-start script
    LOG_DIR=/opt/Yerba/log
    LOG_FILE=$LOG_DIR/debug.log
    [ -d "$LOG_DIR" ] || mkdir -m777 -p $LOG_DIR
#    [ -f "$LOG_FILE" ] || rm -f $LOG_FILE
end script

script
    export YERBA_ROOT=/opt/Yerba
    export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$YERBA_ROOT"
    exec start-stop-daemon -c www-data -g www-data --start \
        --iosched real-time --nicelevel -19 \
        --exec $YERBA_ROOT/bin/yerbad -- >> $YERBA_ROOT/log/debug.log 2>&1
end script

post-start script
    echo Restart on: `hostname -A` | mail -s "UPSTART: Yerba was started" coge.genome@gmail.com
end script
  • Initialize and start the job engine
/opt/Yerba/bin/yerbad --setup
sudo chown www-data:www-data /opt/Yerba/workflows.db
sudo start yerba

Troubleshooting

Visualization in GEvo does not work

This relies on a system known as Gobe. Check the following things:

  • Apache configuration for gobe
  • Make sure the Python Web module is installed: sudo aptitude install python-webpy
  • Check to see if paths hard-coded into gobe/flash/service.wsgi need to be updated
    • NOTE: Not sure if this is required

Working on an Atmosphere Virtual Machine

Click here for instructions on dealing with issues that occur specifically with Atmosphere Virtual machines.