Install coge

From CoGepedia
Revision as of 18:41, 10 July 2014 by Franka1 (talk | contribs)
Jump to navigation Jump to search

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

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

##This is a configuration file for CoGe.  
##Key Value pairs:
##<NAME>    <PATH>

#database configuration
DBNAME    oryza_coge
DBHOST    localhost
DBPORT    3306
DBUSER    oryza_coge_web
DBPASS    XXXXXXXXXXXX

#basedir for coge
COGEDIR /opt/apache/Oryza_CoGe/

#bin dir for coge's programs
BINDIR /opt/apache/Oryza_CoGe/bin/ 

#data dir for coge's programs
DATADIR /opt/apache/Oryza_CoGe/data/ 

#dir for pair-wise whole genome comparisons (e.g. SynMap)
DIAGSDIR /opt/apache/Oryza_CoGe/diags/ 

#fasta dir
FASTADIR /opt/apache/Oryza_CoGe/data/fasta/

#TMPL dir for coge's web page templates
TMPLDIR /opt/apache/Oryza_CoGe/tmpl/

#temp dir for coge
TEMPDIR /opt/apache/Oryza_CoGe/tmp/

#Base URL for web-site
URL /Oryza_CoGe/

#URL for temp directory
TEMPURL /Oryza_CoGe/tmp/

#blast style scoring matrix dirs
BLASTMATRIX /opt/apache/Oryza_CoGe/data/blast/matrix/

#blastable DB
BLASTDB /opt/apache/Oryza_CoGe/data/blast/db/

#hostname where the job engine is running
JOBSERVER  localhost

#port the job engine is running on
JOBPORT 5151

#directory for bed files
BEDDIR /opt/apache/Oryza_CoGe/data/bed/

#servername for links
SERVER http://coge.iplantcollaborative.org/Oryza_CoGe/

#directory for caching genome browser images
IMAGE_CACHE /opt/apache/Oryza_CoGe/data/image_cache/

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