Difference between revisions of "Installing Chado on Ubuntu HOWTO"

From GMOD
Jump to: navigation, search
m (Notes: Changed categories)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{NeedsEditing}}
 +
 +
==Ubuntu version==
 +
This method has been tested on Ubuntu 8.4 with PostgreSQL 8.1 and on Ubuntu 11.10 and 12.04 with PostgreSQL 9.1.  Note also that starting with the 12.10 Ubuntu release (October, 2012) this became even easier since a Debian package for Chado (libchado-perl) was added to the official repository making installation a real snap.  That package is available for Debian installations as well.
 +
 
==Notes==
 
==Notes==
  
Line 7: Line 12:
 
*postgresql-contrib
 
*postgresql-contrib
 
*postgresql-plperl
 
*postgresql-plperl
 +
*libpq-dev
 
*libdbd-pg-perl
 
*libdbd-pg-perl
 
*libtemplate-perl -- Template toolkit
 
*libtemplate-perl -- Template toolkit
Line 13: Line 19:
 
*ant
 
*ant
 
*libparse-recdescent-perl  # needed by DBIx::DBStag
 
*libparse-recdescent-perl  # needed by DBIx::DBStag
 +
*xsltproc
 +
*bioperl
  
Created a db user for me:
+
<pre>
 +
sudo apt-get install postgresql postgresql-client postgresql-contrib postgresql-plperl libpq-dev libdbd-pg-perl libtemplate-perl libxml-simple-perl liblog-log4perl-perl ant libparse-recdescent-perl xsltproc bioperl
 +
</pre>
 +
 
 +
Create a db user for yourself - your Ubuntu username:
  
 
   $ sudo su - postgres
 
   $ sudo su - postgres
   $ createuser scott
+
   $ createuser <username>
 
   Shall the new role be a superuser? (y/n) y
 
   Shall the new role be a superuser? (y/n) y
 
   CREATE ROLE
 
   CREATE ROLE
   $ vi /etc/postgresql/8.2/main/pg_hba.conf
+
   $ vi /etc/postgresql/9.1/main/pg_hba.conf
 
   #changed "local all all" and "host all all" lines from ident sameuser to trust
 
   #changed "local all all" and "host all all" lines from ident sameuser to trust
 
   $ exit
 
   $ exit
   $ sudo /etc/init.d/postgresql-8.2 restart
+
   $ sudo /etc/init.d/postgresql 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 <username> with password '<password>';
 +
  $ exit #from psql
 +
  $ exit #from sudo
  
 
Installing prereqs with cpan shell:
 
Installing prereqs with cpan shell:
  
*install CMUNGALL/go-perl-0.07.tar.gz
+
*install Bio::Chado::Schema
 +
*install GO::Parser (go-perl)
 
*install DBIx::DBSchema  # needed by DBIx::DBStag
 
*install DBIx::DBSchema  # needed by DBIx::DBStag
 +
 +
  
 
Installed DBIx::DBStag 'by hand':
 
Installed DBIx::DBStag 'by hand':
  
   wget http://search.cpan.org/CPAN/authors/id/C/CM/CMUNGALL/DBIx-DBStag-0.09.tar.gz
+
(Note that if you have the cpan shell set up to do "sudo make" rather than running the whole shell as root (via "sudo cpan"), you can install DBIx::DBStag from the cpan shell.)
   tar zxvf DBIx-DBStag-0.09.tar.gz
+
 
   cd DBIx-DBStag-0.09
+
   wget http://search.cpan.org/CPAN/authors/id/C/CM/CMUNGALL/DBIx-DBStag-0.10.tar.gz
 +
   tar zxvf DBIx-DBStag-0.10.tar.gz
 +
   cd DBIx-DBStag-0.10
 
   createdb test  # needed for the make test step
 
   createdb test  # needed for the make test step
 +
  perl Makefile.PL
 
   make
 
   make
   make test  #some (but not most) tests failed, installing anyway
+
   make test  #all tests pass
 
   sudo make install
 
   sudo make install
  
Created the file ~/.gmod_profile, with the contents:
+
 
 +
Create the file ~/.gmod_profile, with the contents:
  
 
   export GMOD_ROOT=/usr/local/gmod
 
   export GMOD_ROOT=/usr/local/gmod
 
   export CHADO_DB_NAME=chado
 
   export CHADO_DB_NAME=chado
   export CHADO_DB_USER=scott
+
   export CHADO_DB_USER=<username>
   export CHADO_DB_PASS=
+
   export CHADO_DB_PASS=<password>
 
   export CHADO_DB_HOST=localhost
 
   export CHADO_DB_HOST=localhost
 
   export CHADO_DB_PORT=5432
 
   export CHADO_DB_PORT=5432
 
   export GO_ROOT=/usr/local/share/perl/5.8.8/GO
 
   export GO_ROOT=/usr/local/share/perl/5.8.8/GO
  
 
+
and add this line to the end of ~/.bash_profile:
and added this line to the end of ~/.bash_profile:
+
  
 
   . ~/.gmod_profile  #sources the gmod profile on login
 
   . ~/.gmod_profile  #sources the gmod profile on login
  
Then
+
If you haven't already, download gmod, either from
 +
 
 +
http://sourceforge.net/projects/gmod/files/gmod/
 +
 
 +
or via [[SVN]].
 +
 
 +
Then, in the gmod directory
  
 
   perl Makefile.PL
 
   perl Makefile.PL
Line 64: Line 95:
 
   make ontologies  #selected 1,2,3,4
 
   make ontologies  #selected 1,2,3,4
  
Installed bioperl-live from cvs:
+
Get and load yeast [[GFF3]] file:
  
  wget http://cvs.bioperl.org/cgi-bin/viewcvs/viewcvs.cgi/bioperl-live/bioperl-live.tar.gz?tarball=1&cvsroot=bioperl
+
  wget http://downloads.yeastgenome.org/sequence/S288C_reference/genome_releases/S288C_reference_genome_Current_Release.tgz
  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:
+
  gmod_bulk_load_gff3.pl --analysis --organism=yeast -g saccharomyces_cerevisiae.gff --noexon
  
  wget ftp://ftp.yeastgenome.org/yeast/chromosomal_feature/saccharomyces_cerevisiae.gff
+
*Note you may have to install the perl module "version::vxs" for some reason--it is not a prerequisite for any GMOD software, but must be an undeclared prereq for something that GMOD software depends on. Hopefully this will be fixed by the author soon.
  #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
+
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
 
[[Category:Chado]]
 
[[Category:Chado]]
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 16:37, 12 July 2013

This page or section needs to be edited. Please help by editing this page to add your revisions or additions.

Ubuntu version

This method has been tested on Ubuntu 8.4 with PostgreSQL 8.1 and on Ubuntu 11.10 and 12.04 with PostgreSQL 9.1. Note also that starting with the 12.10 Ubuntu release (October, 2012) this became even easier since a Debian package for Chado (libchado-perl) was added to the official repository making installation a real snap. That package is available for Debian installations as well.

Notes

Installing prereqs with Synaptic:

  • postgresql
  • postgresql-client
  • postgresql-contrib
  • postgresql-plperl
  • libpq-dev
  • libdbd-pg-perl
  • libtemplate-perl -- Template toolkit
  • libxml-simple-perl
  • liblog-log4perl-perl
  • ant
  • libparse-recdescent-perl # needed by DBIx::DBStag
  • xsltproc
  • bioperl
sudo apt-get install postgresql postgresql-client postgresql-contrib postgresql-plperl libpq-dev libdbd-pg-perl libtemplate-perl libxml-simple-perl liblog-log4perl-perl ant libparse-recdescent-perl xsltproc bioperl

Create a db user for yourself - your Ubuntu username:

 $ sudo su - postgres
 $ createuser <username>
 Shall the new role be a superuser? (y/n) y
 CREATE ROLE
 $ vi /etc/postgresql/9.1/main/pg_hba.conf
 #changed "local all all" and "host all all" lines from ident sameuser to trust
 $ exit
 $ sudo /etc/init.d/postgresql 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 <username> with password '<password>';
 $ exit #from psql
 $ exit #from sudo

Installing prereqs with cpan shell:

  • install Bio::Chado::Schema
  • install GO::Parser (go-perl)
  • install DBIx::DBSchema # needed by DBIx::DBStag


Installed DBIx::DBStag 'by hand':

(Note that if you have the cpan shell set up to do "sudo make" rather than running the whole shell as root (via "sudo cpan"), you can install DBIx::DBStag from the cpan shell.)

 wget http://search.cpan.org/CPAN/authors/id/C/CM/CMUNGALL/DBIx-DBStag-0.10.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


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

 export GMOD_ROOT=/usr/local/gmod
 export CHADO_DB_NAME=chado
 export CHADO_DB_USER=<username>
 export CHADO_DB_PASS=<password>
 export CHADO_DB_HOST=localhost
 export CHADO_DB_PORT=5432
 export GO_ROOT=/usr/local/share/perl/5.8.8/GO

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

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

If you haven't already, download gmod, either from

http://sourceforge.net/projects/gmod/files/gmod/

or via SVN.

Then, in the gmod directory

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

Get and load yeast GFF3 file:

  wget http://downloads.yeastgenome.org/sequence/S288C_reference/genome_releases/S288C_reference_genome_Current_Release.tgz
  gmod_bulk_load_gff3.pl --analysis --organism=yeast -g saccharomyces_cerevisiae.gff --noexon
  • Note you may have to install the perl module "version::vxs" for some reason--it is not a prerequisite for any GMOD software, but must be an undeclared prereq for something that GMOD software depends on. Hopefully this will be fixed by the author soon.