Setting up BioSQL 1.0.1 on Postgresql 8.3, ubuntu 9.04

| Tuesday, July 21, 2009

BioSQL is a relational model that covers many kinds of data models in biology. The core schema has models for sequences, features, annotations, taxonomy (focused on NCBI taxonomy), and ontologies. It also has a PhyloDB extension module.
In this post, I'll record how I setup BioSQL on a Postgresql database on Ubuntu Jaunty (9.04)
Install PostgreSQL
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.
Install BioSQL
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.
> --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 />


evolvingbits said...

Hi Dazhi - do you know whether there are other BioPerl packages available through apt-get? The current stable release is 1.6.0. Version 1.5.2 is significantly older, and also isn't a stable release in the strict sense of the word.

It probably won't matter much for you though, but keep in mind that if you encounter issues with BioPerl you may just need to upgrade.

djiao said...

No, I didn't find any other BioPerl debian packages. I notice the 1.5.2 is a quite old version. But that is also what is used according to the BioSQL instructions. So maybe BioSQL instructions also needs to be updated.

For now, I'm simply use bioperl to load data, so I hope I'll be fine. I actually tried to install BioPerl 1.6 in the CPAN way. I was able to install BioPerl, but no luck with BioPerl-db. There were many testing errors, and it was out of the reach of my PERL skills :(