In this post, I'll record how I setup BioSQL on a Postgresql database on Ubuntu Jaunty (9.04)
There is a very good step-by-step instruction on how to install PostgreSQL on Ubuntu. Here is the link:
Even though it doesn't cover Ubuntu version after 8.04, and it says it's for PostgreSQL 8.1, I can still follow all the steps to install PostgreSQL 8.3 on Jaunty.
The BioSQL website has detailed installation instructions. But it is also very verbose, and the page has instructions for MySQL, PostgreSQL, and Oracle, even steps on how to install the databases. I wish there were separate pages for each database, though. Anyway, creating a BioSQL database on PostgreSQL is very straight forward. Here is what you all need to do:
> createdb biosql
> psql biosql < biosqldb-pg.sql
To add the PhyloDB extension, first follow the instruction to check it out from SVN. Then do
> psql biosql < biosql-phylodb-pg.sql
Import NCBI Taxonomy into BioSQL
BioSQL has several scripts to import data into the database. Here I am just explaining how to import the NCBI taxonomy into the database.
First bioperl and bioperl-db need to be installed. Again, these steps are included in the BioSQL installation page. However, it's much easier to do it the Ubuntu way.
> sudo apt-get install bioperl
That'll install bioperl 1.5.2, with bioperl-db.
Then simply run (suppose you have already setup the PostgreSQL and you can run it with your username.
> load_ncbi_taxonomy.pl --diver Pg --download yes<br /><br />Update: 7/23/2009<br />Hilmar has pointed out that the bioperl in my post is only 1.5.2, and it seems in Karmic (9.10), ubuntu will have BioPERL 1.6.0 available in universe.<br /> <br /><br /><br />