Install coge: Difference between revisions

From CoGepedia
Jump to navigation Jump to search
Franka1 (talk | contribs)
Franka1 (talk | contribs)
No edit summary
Line 102: Line 102:
Configure apache  
Configure apache  


Note: contact us for help configuring Apache for CoGe
Note: contact us for help configuring Apache for CoGe  


Configure coge.conf file
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)


##This is a configuration file for CoGe. 
##Key Value pairs:
##<NAME>    <PATH>
   
   
  #database configuration
  ##This is a configuration file for CoGe.
  DBNAME   oryza_coge
#database configuration
  DBHOST   localhost
  DBNAME   coge
  DBPORT   3306
  DBHOST   localhost
  DBUSER   oryza_coge_web
  DBPORT   3307
  DBPASS   XXXXXXXXXXXX
  DBUSER   coge
   
  DBPASS   XXXXXXX
  #basedir for coge
 
  COGEDIR /opt/apache/Oryza_CoGe/
# CAS authentication for webservices
CAS_URL https://auth.iplantcollaborative.org/cas
#bin dir for coge's programs
 
  BINDIR /opt/apache/Oryza_CoGe/bin/  
#basic auth name and password
   
AUTHNAME XXXXXX
#data dir for coge's programs
AUTHPASS XXXXXX
  DATADIR /opt/apache/Oryza_CoGe/data/  
 
#web cookie name
#dir for pair-wise whole genome comparisons (e.g. SynMap)
  COOKIE_NAME cogec
  DIAGSDIR /opt/apache/Oryza_CoGe/diags/  
 
#support email address
#fasta dir
  SUPPORT_EMAIL XXXXXX
  FASTADIR /opt/apache/Oryza_CoGe/data/fasta/
 
   
#basedir for coge
  #TMPL dir for coge's web page templates
  COGEDIR     /opt/coge/web/
  TMPLDIR /opt/apache/Oryza_CoGe/tmpl/
 
#bin dir for coge's programs
#temp dir for coge
  BINDIR     /opt/coge/web/bin/
  TEMPDIR /opt/apache/Oryza_CoGe/tmp/
 
   
#scripts dir for coge's programs
  #Base URL for web-site
  SCRIPTDIR /opt/coge/scripts
  URL /Oryza_CoGe/
 
RESOURCESDIR /opt/coge/resources
#URL for temp directory
 
  TEMPURL /Oryza_CoGe/tmp/
#data dir for coge's programs
  DATADIR     /storage/coge/data/
#blast style scoring matrix dirs
 
  BLASTMATRIX /opt/apache/Oryza_CoGe/data/blast/matrix/
#cache dir
   
CACHEDIR /storage/coge/data/cache/
#blastable DB
 
  BLASTDB /opt/apache/Oryza_CoGe/data/blast/db/
#dir for pair-wise whole genome comparisons (e.g. SynMap)
   
  DIAGSDIR     /opt/coge/web/data/diags/
  #hostname where the job engine is running
 
  JOBSERVER localhost
#fasta dir
   
  FASTADIR     /opt/coge/web/data/fasta/
  #port the job engine is running on
 
#sequence dir
  SEQDIR     /storage/coge/data/genomic_sequence/
  #SEQDIR   /opt/tmp/data/
 
#experiment dir
EXPDIR  /storage/coge/data/experiments/
 
#TMPL dir for CoGe's web page templates
  TMPLDIR     /opt/coge/web/tmpl/
 
#temp dir for coge
  TEMPDIR   /opt/coge/web/tmp/
 
#secure temp dir
SECTEMPDIR /storage/coge/tmp/
 
# IRODS dir
  IRODSDIR        /iplant/home/<USER>/coge_data
  IRODSENV        /opt/coge/web/irodsEnv
 
#Base URL for web-server
  URL     /
 
#URL for temp directory
  TEMPURL     /tmp/
 
#blast style scoring matrix dirs
  #BLASTMATRIX   /opt/coge/web/data/blast/matrix/
  BLASTMATRIX    /storage/coge/data/blast/matrix/
 
#blastable DB
  #BLASTDB   /opt/coge/web/data/blast/db/
  BLASTDB    /storage/coge/data/blast/db/
 
#lastable DB
  #LASTDB    /home/franka1/coge/web/data/last/db/
  LASTDB    /storage/coge/data/last/db/
 
#directory for bed files
  BEDDIR   /opt/coge/web/data/bed/
 
#servername for links
  SERVER    http://XXXXXX/
 
# Job Engine Server
  JOBSERVER localhost
 
# Job Engine Port
  JOBPORT 5151
  JOBPORT 5151
 
#directory for bed files
#directory for caching genome browser images
  BEDDIR /opt/apache/Oryza_CoGe/data/bed/
  IMAGE_CACHE /opt/coge/web/data/image_cache/
   
 
  #servername for links
#maximum number of processor to use for multi-CPU systems
  SERVER http://coge.iplantcollaborative.org/Oryza_CoGe/
MAX_PROC 32
   
COGE_BLAST_MAX_PROC 8
  #directory for caching genome browser images
 
  IMAGE_CACHE /opt/apache/Oryza_CoGe/data/image_cache/
#True Type Font
FONT /usr/share/fonts/truetype/msttcorefonts/arial.ttf
 
# SynMap workflow tools
KSCALC /opt/coge/web/bin/SynMap/kscalc.pl
GEN_FASTA /opt/coge/web/bin/SynMap/generate_fasta.pl
RUN_ALIGNMENT /opt/coge/web/bin/SynMap/quota_align_merge.pl
RUN_COVERAGE /opt/coge/web/bin/SynMap/quota_align_coverage.pl
PROCESS_DUPS /opt/coge/web/bin/SynMap/process_dups.pl
GEVO_LINKS /opt/coge/web/bin/SynMap/gevo_links.pl
DOTPLOT_DOTS /opt/coge/web/bin/dotplot_dots.pl
 
#various programs
BL2SEQ /usr/local/bin/legacy_blast.pl bl2seq
BLASTZ /usr/local/bin/blastz
LASTZ /usr/local/bin/lastz
MULTI_LASTZ /opt/coge/web/bin/blastz_wrapper/blastz.py
LAST_PATH /opt/coge/web/bin/last_wrapper/
MULTI_LAST /opt/coge/web/bin/last_wrapper/last.py
#BLAST 2.2.23+
BLAST /usr/local/bin/legacy_blast.pl blastall
TBLASTN  /usr/local/bin/tblastn
BLASTN /usr/local/bin/blastn
BLASTP /usr/local/bin/blastp
TBLASTX /usr/local/bin/tblastx
FASTBIT_LOAD  /usr/local/bin/ardea
FASTBIT_QUERY /usr/local/bin/ibis
  SAMTOOLS /usr/bin/samtools
  RAZIP /usr/local/bin/razip
 
###Formatdb needs to be updated to makeblastdb
FORMATDB /usr/bin/formatdb
LAGAN /opt/coge/web/bin/lagan-64bit/lagan.pl
LAGANDIR /opt/coge/web/bin/lagan-64bit/
CHAOS /opt/coge/web/bin/lagan-64bit/chaos
GENOMETHREADER /opt/coge/web/bin/gth
DIALIGN       /opt/coge/web/bin/dialign2_dir/dialign2-2_coge
DIALIGN2       /opt/coge/web/bin/dialign2_dir/dialign2-2_coge
DIALIGN2_DIR       /opt/coge/web/bin/dialign2_dir/
HISTOGRAM       /opt/coge/web/bin/histogram.pl
KS_HISTOGRAM       /opt/coge/web/bin/ks_histogram.pl
PYTHON       /usr/bin/python
PYTHON26   /usr/bin/python
DAG_TOOL       /opt/coge/web/bin/SynMap/dag_tools.py
BLAST2BED       /opt/coge/web/bin/SynMap/blast2bed.pl
TANDEM_FINDER       /opt/coge/web/bin/dagchainer/tandems.py
DAGCHAINER       /opt/coge/web/bin/dagchainer_bp/dag_chainer.py
EVALUE_ADJUST       /opt/coge/web/bin/dagchainer_bp/dagtools/evalue_adjust.py
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/local/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
#from graphviz
DOT
NEATO
 
 
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 19:22, 10 July 2014

Server with existing CoGe Installation

Initial Dependencies

Run the following command:

sudo apt-get -y install {program}


where {program} is each of the following:

git
mysql-server
samtools
ubuntu-dev-tools
build-essential checkinstall
gcc-multilib
expat libexpat1-dev
libgd2-xpm-dev build-essential
njplot
imagemagick
graphviz
apache2
lamp-server^
phpmyadmin
swig
ttf-mscorefonts-installer

Then, use:

sudo cpan App::cpanminus
sudo cpanm {module}

where {module} is each of the following:

AuthCas
DBIx::Class
DBIx::Class::Schema
DBD::SQLite
Data::UUID
Data::GUID
XML::SAX::Expat
XML::Parser
XML::Simple
IPC::System::Simple
CGI::Application::Dispatch
CGI::Log
GD::Graph::bars
Moose
ZMQ::LibZMQ3
File::Slurp
DateTime
URI::Split
JSON
JSON::XS

Create new mysql database

Dump CoGe Database schema

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

Note: be sure to disable apparmour for MySQL.

Create new CoGe Database

create database coge

Initialize new coge database

mysql -u root -pXXXXXXXX coge < cogetable.sql

Populate a few entries in the feature_type table

mysql -u root -pXXXXXXXXX coge < feature_type.sql

Create new user for new CoGe database

  • Want a web-user with limited write privileges and a power user to load new data
create user 'coge'@'localhost' IDENTIFIED BY 'XXXXXX';
grant all privileges on coge.* to coge;
create user 'coge_web'@'localhost' IDENTIFIED BY 'XXXXXX';
grant select on coge.* to coge_web;
flush privileges;

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

Deploy new CoGe Web-site

Download CoGe repository from GitHub

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

Make directories where files go and give write persmission

cd coge/web
./setup.sh

Configure apache

Note: contact us for help configuring Apache for CoGe

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)


##This is a configuration file for CoGe.
  1. database configuration
DBNAME	  coge
DBHOST	  localhost
DBPORT	  3307
DBUSER	  coge
DBPASS	  XXXXXXX
  1. CAS authentication for webservices
CAS_URL https://auth.iplantcollaborative.org/cas
  1. basic auth name and password
AUTHNAME XXXXXX
AUTHPASS XXXXXX
  1. web cookie name
COOKIE_NAME cogec
  1. support email address
SUPPORT_EMAIL XXXXXX
  1. basedir for coge
COGEDIR	    /opt/coge/web/
  1. bin dir for coge's programs
BINDIR	    /opt/coge/web/bin/
  1. scripts dir for coge's programs
SCRIPTDIR	/opt/coge/scripts

RESOURCESDIR /opt/coge/resources

  1. data dir for coge's programs
DATADIR	    /storage/coge/data/
  1. cache dir
CACHEDIR /storage/coge/data/cache/
  1. dir for pair-wise whole genome comparisons (e.g. SynMap)
DIAGSDIR	    /opt/coge/web/data/diags/
  1. fasta dir
FASTADIR	    /opt/coge/web/data/fasta/
  1. sequence dir
SEQDIR	    /storage/coge/data/genomic_sequence/
#SEQDIR	   /opt/tmp/data/
  1. experiment dir
EXPDIR  /storage/coge/data/experiments/
  1. TMPL dir for CoGe's web page templates
TMPLDIR	    /opt/coge/web/tmpl/
  1. temp dir for coge
TEMPDIR	  /opt/coge/web/tmp/
  1. secure temp dir
SECTEMPDIR /storage/coge/tmp/
  1. IRODS dir
IRODSDIR        /iplant/home/<USER>/coge_data
IRODSENV        /opt/coge/web/irodsEnv
  1. Base URL for web-server
URL	    /
  1. URL for temp directory
TEMPURL	    /tmp/
  1. blast style scoring matrix dirs
#BLASTMATRIX    /opt/coge/web/data/blast/matrix/
BLASTMATRIX    /storage/coge/data/blast/matrix/
  1. blastable DB
#BLASTDB    /opt/coge/web/data/blast/db/
BLASTDB    /storage/coge/data/blast/db/
  1. lastable DB
#LASTDB    /home/franka1/coge/web/data/last/db/
LASTDB    /storage/coge/data/last/db/
  1. directory for bed files
BEDDIR	   /opt/coge/web/data/bed/
  1. servername for links
SERVER     http://XXXXXX/
  1. Job Engine Server
JOBSERVER localhost
  1. Job Engine Port
JOBPORT 5151
  1. directory for caching genome browser images
IMAGE_CACHE /opt/coge/web/data/image_cache/
  1. maximum number of processor to use for multi-CPU systems
MAX_PROC 32
COGE_BLAST_MAX_PROC 8
  1. True Type Font
FONT	/usr/share/fonts/truetype/msttcorefonts/arial.ttf
  1. SynMap workflow tools
KSCALC /opt/coge/web/bin/SynMap/kscalc.pl
GEN_FASTA /opt/coge/web/bin/SynMap/generate_fasta.pl
RUN_ALIGNMENT /opt/coge/web/bin/SynMap/quota_align_merge.pl
RUN_COVERAGE /opt/coge/web/bin/SynMap/quota_align_coverage.pl
PROCESS_DUPS /opt/coge/web/bin/SynMap/process_dups.pl
GEVO_LINKS /opt/coge/web/bin/SynMap/gevo_links.pl
DOTPLOT_DOTS /opt/coge/web/bin/dotplot_dots.pl
  1. various programs
BL2SEQ	 /usr/local/bin/legacy_blast.pl bl2seq
BLASTZ	 /usr/local/bin/blastz
LASTZ	 /usr/local/bin/lastz
MULTI_LASTZ	/opt/coge/web/bin/blastz_wrapper/blastz.py
LAST_PATH	/opt/coge/web/bin/last_wrapper/
MULTI_LAST	/opt/coge/web/bin/last_wrapper/last.py
#BLAST 2.2.23+
BLAST	 /usr/local/bin/legacy_blast.pl blastall
TBLASTN  /usr/local/bin/tblastn
BLASTN	 /usr/local/bin/blastn
BLASTP	 /usr/local/bin/blastp
TBLASTX	 /usr/local/bin/tblastx
FASTBIT_LOAD  /usr/local/bin/ardea
FASTBIT_QUERY /usr/local/bin/ibis
SAMTOOLS /usr/bin/samtools
RAZIP /usr/local/bin/razip
      1. Formatdb needs to be updated to makeblastdb
FORMATDB /usr/bin/formatdb
LAGAN	 /opt/coge/web/bin/lagan-64bit/lagan.pl
LAGANDIR /opt/coge/web/bin/lagan-64bit/
CHAOS	 /opt/coge/web/bin/lagan-64bit/chaos
GENOMETHREADER /opt/coge/web/bin/gth
DIALIGN	       /opt/coge/web/bin/dialign2_dir/dialign2-2_coge
DIALIGN2	       /opt/coge/web/bin/dialign2_dir/dialign2-2_coge
DIALIGN2_DIR	       /opt/coge/web/bin/dialign2_dir/
HISTOGRAM	       /opt/coge/web/bin/histogram.pl
KS_HISTOGRAM	       /opt/coge/web/bin/ks_histogram.pl
PYTHON		       /usr/bin/python
PYTHON26		   /usr/bin/python
DAG_TOOL	       /opt/coge/web/bin/SynMap/dag_tools.py
BLAST2BED	       /opt/coge/web/bin/SynMap/blast2bed.pl
TANDEM_FINDER	       /opt/coge/web/bin/dagchainer/tandems.py
DAGCHAINER	       /opt/coge/web/bin/dagchainer_bp/dag_chainer.py
EVALUE_ADJUST	       /opt/coge/web/bin/dagchainer_bp/dagtools/evalue_adjust.py
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/local/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
  1. MotifView
MOTIF_FILE /opt/coge/web/bin/MotifView/motif_hash_dump
  1. 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
#from graphviz
DOT
NEATO


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
  1. 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 CoGe modules /modules directory of CoGe install path
perl Makefile.PL lib=/usr/local/lib/perl; make install
  • Install non-standard Perl modules
AuthCAS 
DBIx::Class
DBIx::Class::Schema 
DBD::SQLite
Data::UUID 
Data::GUID
XML::SAX::Expat (requires: sudo apt-get install expat libexpat1-dev)
XML::Parser 
XML::Simple 
IPC::System::Simple 
CGI::Application::Dispatch
CGI::Log
GD::Graph::bars
Moose
ZMQ::LibZMQ3
File::Slurp
DateTime
URI::Split

Install JBrowse

Download and install the JBrowse package from http://jbrowse.org/install/

cd js
unzip JBrowse-1.9.7.zip
mv JBrowse-1.9.7 jbrowse

Populate with test data

scripts/replicate_genome_between_coge_installations.pl -dsgid 11022 -u1 coge -p1 XXXXXXX -db1 coge -u2 oryza_coge -p2 XXXXXXX -db2 oryza_coge -sd /opt/apache/oryz_coge/data/genomic_sequence

Troubleshooting

Visualization in GEvo does not work

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

  • Apache configuration for gobe
  • Check to see if paths hard-coded into gobe/flash/service.wsgi need to be updated
    • NOTE: Not sure if this is required