| 

Download

To download and try out the BioMAJ software, click here !

Current Visitors

We have 1 guest online

 

                                  

Use case : Populate a database PDF Print E-mail

A new bank is made available as SQL dumps in a remote server. You want to retrieve the related files to populate you own database. Here is a way of doing it.

This example is based on the Gene_Ontology database that requires a MySQL database.

The basic steps are :

  1. Retrieve the files from the server (usually sql dumps)
  2. protocol=ftp
    server=ftp.geneontology.org

    remote.dir=/godatabase/archive/full/latest
    remote.files=go_.*\\.gz$
    remote.excluded.files=.*\\.tar\\.gz$


  3. Write the post-process that will populate the database
  4. POST1=GOdatabase
    GOdatabase.name=GOdatabase
    GOdatabase.exe=GOdatabase.sh
    GOdatabase.args=hostname username password
    GOdatabase.desc=Populates the gene ontology database
    GOdatabase.type=

    And the script itself (that has to be located in the process directory) : 

    cd $datadir/$dirversion/future_release/flat
    DBNAME="Gene_Ontology"
    SQLFILE=`find go_[[:digit:]]*-assocdb-data`
    echo "CREATE DATABASE IF NOT EXISTS $DBNAME" | mysql --user=$2 --password=$3 --host=$1
    cat $datadir/$dirversion/future_release/flat/$SQLFILE | mysql --user=$2 --password=$3 --host=$1 $DBNAME

  5.  Launch BioMAJ.

Attached files :

 
RocketTheme Joomla Templates