Installing Chado on Ubuntu HOWTO

From GMOD
Revision as of 22:55, 30 December 2008 by Clements (Talk | contribs)

Jump to: navigation, search

Notes

Installing prereqs with Synaptic:

  • postgresql
  • postgresql-client
  • postgresql-contrib
  • postgresql-plperl
  • libdbd-pg-perl
  • libtemplate-perl -- Template toolkit
  • libxml-simple-perl
  • liblog-log4perl-perl
  • ant
  • libparse-recdescent-perl # needed by DBIx::DBStag

If you are using postgres 8.3 (which is the default on Ubuntu Hardy July 31 2008),

sudo apt-get install postgresql postgresql-client postgresql-contrib postgresql-plperl-8.3 libdbd-pg-perl libtemplate-perl libxml-simple-perl liblog-log4perl-perl ant libparse-recdescent-perl

Otherwise change the postgresql-plperl-8.3 to suit.

Created a db user for me:

 $ sudo su - postgres
 $ createuser scott
 Shall the new role be a superuser? (y/n) y
 CREATE ROLE
 $ vi /etc/postgresql/8.3/main/pg_hba.conf
 #changed "local all all" and "host all all" lines from ident sameuser to trust
 $ exit
 $ sudo /etc/init.d/postgresql-8.3 restart

It is useful to actually have a password, even using trust, otherwise problems with DBD::Pg pop up telling you that no password was supplied.

 $ sudo su - postgres
 $ psql -d template1
 $ alter USER scott with password 'mypassword';
 $ exit #from psql
 $ exit #from sudo

Installing prereqs with cpan shell:

  • install CMUNGALL/go-perl-0.09.tar.gz
  • install DBIx::DBSchema # needed by DBIx::DBStag
  • install Module::Build # needed by GMOD Makefile.PL
  • install DBD::Pg #required by GMOD make ontologies


Installed DBIx::DBStag 'by hand':

 wget http://search.cpan.org/CPAN/authors/id/C/CM/CMUNGALL/DBIx-DBStag-0.09.tar.gz
 tar zxvf DBIx-DBStag-0.10.tar.gz
 cd DBIx-DBStag-0.10
 createdb test   # needed for the make test step
 perl Makefile.PL
 make
 make test  #all tests pass
 sudo make install

Created the file ~/.gmod_profile, with the contents:

 export GMOD_ROOT=/usr/local/gmod
 export CHADO_DB_NAME=chado
 export CHADO_DB_USER=scott
 export CHADO_DB_PASS=mypassword
 export CHADO_DB_HOST=localhost
 export CHADO_DB_PORT=5432
 export GO_ROOT=/usr/local/share/perl/5.8.8/GO

and added this line to the end of ~/.bash_profile:

 . ~/.gmod_profile   #sources the gmod profile on login

Then, back in the gmod directory

 perl Makefile.PL
 make
 sudo make install
 make load_schema
 make prepdb
 make ontologies  #selected 1,2,3,4

Installed bioperl-live from cvs:

 wget http://cvs.bioperl.org/cgi-bin/viewcvs/viewcvs.cgi/bioperl-live/bioperl-live.tar.gz?tarball=1&cvsroot=bioperl
 tar zxvf bioperl-live.tar.gz
 cd bioperl-live
 perl Build.PL
 ./Build
 ./Build test   #a few tests fail, but that's ok
 sudo ./Build install

Get and load yeast GFF3 file:

  wget ftp://ftp.yeastgenome.org/yeast/chromosomal_feature/saccharomyces_cerevisiae.gff
  #fix the obsolete SO term in the GFF file:
   perl -pi -e 's/\trepeat_family\t/\trepeat_region\t/' saccharomyces_cerevisiae.gff
  gmod_bulk_load_gff3.pl -g saccharomyces_cerevisiae.gff