Difference between revisions of "Installing Chado on Ubuntu HOWTO"

From GMOD
Jump to: navigation, search
(adding a package dependency)
 
(7 intermediate revisions by one other user 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 14: Line 19:
 
*ant
 
*ant
 
*libparse-recdescent-perl  # needed by DBIx::DBStag
 
*libparse-recdescent-perl  # needed by DBIx::DBStag
 +
*xsltproc
 +
*bioperl
  
If you are using postgres 8.3 (which is the default on Ubuntu Hardy July 31 2008),
 
 
<pre>
 
<pre>
sudo apt-get install postgresql postgresql-client postgresql-contrib postgresql-plperl-8.3 libpq-dev libdbd-pg-perl libtemplate-perl libxml-simple-perl liblog-log4perl-perl ant libparse-recdescent-perl
+
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>
 
</pre>
Otherwise change the postgresql-plperl-8.3 to suit.
 
  
Created a db user for me:
+
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.3/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.3 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.
 
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
 
   $ sudo su - postgres
 
   $ psql -d template1
 
   $ psql -d template1
   $ alter USER scott with password 'mypassword';
+
   $ alter USER <username> with password '<password>';
 
   $ exit #from psql
 
   $ exit #from psql
 
   $ exit #from sudo
 
   $ exit #from sudo
Line 41: Line 46:
 
Installing prereqs with cpan shell:
 
Installing prereqs with cpan shell:
  
*install CMUNGALL/go-perl-0.09.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
*install Module::Build # needed by GMOD Makefile.PL
+
 
*install DBD::Pg #required by GMOD make ontologies
+
  
  
 
Installed DBIx::DBStag 'by hand':
 
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
 
   wget http://search.cpan.org/CPAN/authors/id/C/CM/CMUNGALL/DBIx-DBStag-0.10.tar.gz
Line 58: Line 65:
 
   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=mypassword
+
   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 added this line to the end of ~/.bash_profile:
+
and add 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, back in the gmod directory
+
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 81: 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.