Software Projects

Instructions for converting a GFF3-based GBrowse installation to run using a MySQL backend to speed up data retrieval

Posted in Uncategorized by rmt on March 9, 2011

(Assumes Bioperl/GBrowse/Mysql/Apache are already installed on Ubuntu, and the GBrowse installation currently has its data stored in GFF3 flat files)

1. Create a new Mysql database

% mysql -u root -p -e 'create database new_database_name'

 

2. Run Bioperl conversion script (substitute your new database name, Mysql root user password, GFF data directory name, and all GFF/Fasta filenames)

% mkdir /home/$USER/tmp-load
% cd /var/www/gbrowse/databases/my_current_GFF_data_directory
% sudo bp_seqfeature_load -d new_database_name --user root --password my_password \
--create --T /home/$USER/tmp-load --verbose \
seq.gff \
pfam.gff \
blastp.gff \
genemark2.4.gff \
glimmer.gff \
tmhmm.gff \
readcoverage.gff

% rm -rf /home/$USER/tmp-load

 

3. Add privileges to the database (substitute your db root password, new database name, and your login username)

% mysql -u root -p root_password -e 'grant all privileges on new_database_name.* to my_username@localhost;
% mysql -u root -p root_password -e 'grant file on *.* to my_username@localhost;
% mysql -u root -p root_password -e 'grant select on new_database_name.* to 'www-data'@localhost;

 

4. Create a new GBrowse configuration file by copying your existing file (substitute your existing file and new database name)

% cd /etc/apache2/gbrowse.conf
% cp existing.conf new_database_name.conf

 

5. Edit the new GBrowse configuration file (substitute your new database name)–

Use the right database adapter by putting the following lines at the beginning of the file:

db_adaptor = Bio::DB::SeqFeature::Store
db_args = -adaptor DBI::mysql
-dsn dbi:mysql:database=new_database_name

 

6. Restart Apache

% sudo apache2ctl restart

 

7. Browse to the new site, and check the checkboxes or click the “Configure Tracks” button to do your initial layers/view setup

http://localhost/cgi-bin/gbrowse/new_database_name/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s