How to create a Fasta file database for local Blast and to import XML results successfully into Blast2GO

(This is now obsolete. The use of the Blast2GO Command Line is recommended for this task.)

This page describes how to create a local installation of the B2G MySQL database and is intended for users with knowledge in MySQL databases and general server administration tasks. If you are not able to follow the steps given here, we recommend you to ask for some help from your system administrator.

After this installation you will end up with a working DB to run Blast2GO with a DB name “b2gdb”, user “blast2go” and a default password “blast4it” being able to run Blast2GO nearly independent from our server. This does NOT include the graph layout generation, GO-Slim reduction and other web-services which are hosted at the Blast2GO or third party server sides which you will still need to access remotely.

B2G users should keep in mind that the B2G-DB schema can be subject of changes as consequence of the continuous efforts for improving the performance and quality of this annotation framework. We will promptly inform users about any major change, especially concerning the database, through the B2G mail list (http://groups.google.com/group/blast2go) and web site. In general, all datasets needed to create a local instance of the Blast2GO database are freely available at different public locations. Since the used resources are not maintained by us, third party changes can affect these instructions. We will try to keep this as up to date as possible and are happy for receiving any feedback and bug-reports. Thank you.

Step-by-Step Description

Note: For the whole installation you will need about 120 GB of free disk space and approx. 12 hours to import the different datasets depending on your hardware and network connection speed!

  1. Download this zip file and unzip it: local_b2g_db.zip
  2. Install a MySQL Database Server: Download and install a MySQL Database Server for example from http://dev.mysql.com/downloads or use e.g. apt-get in Linux/Ubuntu:
    sudo apt-get install mysql-server
  3. Download and unzip these files:

 

  1. Execute the file b2g_db.sql to create a database and additional tables.
    mysql -h dbhost -u dbuser -p dbpass < b2gdb.sql

 

  1. Create the database user “blast2go” for local access:
    mysql -h dbhost -u dbuser -p dbpass -e "GRANT ALL ON b2gdb.* TO 'blast2go'@'localhost' IDENTIFIED BY 'blast4it';"
    mysql -h dbhost -u dbuser -p dbpass -e "FLUSH PRIVILEGES;"

 

  1. Import the latest mysql database dump (first file downloaded in step 1) to the created database. Since the GO-DB-Dump is quite big, you should have the file local on the database server and import it directly, this speeds up the import.
    You unzipped the file in step 3.
    Execute:

    mysql -s -h dbhost -u dbuser -p dbpass b2gdb < go_YYYYMM-assocdb-data

    Note 1: Use the “silent mode” (-s) to produce less output and to speed up the import. (On a Windows system use also (-b) to suppress the beep when errors occur.)
    Note 2: You can alternatively also first open a mysql shell and than use the command “source” to import the data.

 

  1. Import the next two files (yet unzipped) you downloaded from NCBI with:
    gene2accession

    mysql -h dbhost -u dbuser -p dbpass b2gdb -e "LOAD DATA LOCAL INFILE '/your/path/to/gene2accession' INTO TABLE gene2accession FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';"
    mysql -h dbhost -u dbuser -p dbpass b2gdb -e "LOAD DATA LOCAL INFILE '/your/path/to/gene_info' INTO TABLE gene_info FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';"

    Note: On a Windows system the ‘\t’ has to be replaced by a “\t”.

 

  1. To import the mapping file obtained from PIR we will use the following command:
    java -cp .:mysql-connector-java-5.0.8-bin.jar: ImportIdMapping /your/path/to/idmapping.tb localhost b2gdb blast2go blast4it

    Note: On a Windows system, replace the java classpath separator “:” with “;”.
    This step can take several hours, please be patient.

Congratulations, you are done. To test your installation, check again the new database settings in Blast2GO and click on the green little arrows in the main application window. If the green GO graphs pop up you database is working correctly.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>