CL-GODB Installation

Installing the CL-GODB Library



Requirements

-A local copy of the GoDB
-MySQL
-Lispworks
-Common SQL

Installation Steps

If you don't have mySQL installed, go to the MySQL Downloads page and follow their instructions. (Note: you probably want the "MySQL database server & standard clients")

Get the GoDB. The latest version of the GoDB can be downloaded from the Gene Ontology Database Downloads page. You will need the assocdb-table files. Continue below with the section appropriate for your system.

Install GODB For Windows:

Download the assocdb-table files to your lispworks working directory.
(Note: you may be able to unzip the files with winzip, but we haven't had success with it.) Open ssh, connect to your machine, and cd to where the files you downloaded are.

Using the appropriate dates for your go database distribution, type the following:

tar zvxf go_YEARMO-assocdb-tables.tar.gz

Now, open the mysql command line interface. Enter the root password that was created during mysql installation. Replace the uppercase "DATABASE" with the name of your choice, after entering the comand you will see output similar to that shown below.

mysql>create database DATABASE;
Query OK, 1 row affected (0.00 sec)

You may close the mysql command line interface now. Open a windows command prompt and cd to the directory containing the folder where the assocdb-table files were unzipped.

For each sql/txt file pair in assodb-tables, issue the following two commands, replacing the year and month with that of your files, and tablename with that of each sql/txt file. Use the username and password for either the root or a user with full privileges. The DATABASE is the one you created earlier, use that name. In PATH, insert the full path between C and the assocdb-tables folder. Note that "type" is part of the command and should be typed as such.

C:>type go_YEARMO-assocdb-tables\tablename.sql | mysql -uUSERNAME -pPASSWORD -DDATABASE

C:>mysqlimport -L -uUSERNAME -pPASSWORD DATABASE C:\PATH\go_YEARMO-assocdb-tables\tablename.txt

You may close the command prompt now. Open Microsoft ODBC Administrator (may be called "Data Sources (ODBC)" in shorcuts). Click add and then create a new data source using the MySQL ODBC driver. Choose a name for your Data Source (note: you will be using this name later when you connect from the cl-godb), then input the User/Password you will be using to connect to the database. If the database is on your computer, you you can type in "localhost" or leave the server field blank. Now you should be able to select the database you created earlier in the drop down menu.

Install GODB For Unix:

After downloading and untarring the GODB assocb-table files, open the MySQl Command Line Client. Create a mysql database and import the tables into it. (Note: see section titled "MYSQL USERS" for more detailed instructions)

Install GODB For Mac:

Coming soon!

Load and Compile CL-GODB

Get the CL-GODB tarball from the downloads page and unpack it into a directory where Lispworks will be able to see it.

You can either use mk:defsystem or compile and load the files in the following order: godb-package, godb, association, gene-product, graph, and relationship. If you intend to use the gui, go into gui/impl-dependent/lwcapi and then compile and load the go-tree-viewer and the tree-with-panes files.

Using MK:DEFSYSTEM

If you don't already have it, you can download it from the CLOCC Sourceforge page You can load it as below at the lisp prompt, or you can add that line to your Lisp startup file.

cl-prompt: (load "path/to/defsystem.lisp")
; Loading text file Z:\lisp\defsystem-3.x\defsystem.lisp
#P"Z:/lisp/defsystem-3.x/defsystem.lisp"

If you're not working in the directory where you put the CL-GODB library, you will need to add that path to your registry. Otherwise, you should be able to start from "find-system"

cl-prompt: (mk:add-registry-location "/path/to/cl-cl-godb/")
cl-prompt: (mk:find-system :cl-godb)
System CL-GODB not loaded. Shall I try loading it? y

; Loading text file Z:\cl-godb\cl-godb.system
#<DEFSYSTEM: CL-GODB>

Now just compile and load the system.

cl-prompt: (mk:compile-system :cl-godb)

cl-prompt: (mk:load-system :cl-godb)


Getting Started

In the Lispworks Listener, start by creating a handle.

cl-prompt: (godb:make-godb-handle)
Now connect to your database.
cl-prompt: (godb:connect godb::*current-godb-handle* "DataSourceName/username/password")
From here you can call any function in the library, or you can load the GUI with the following command.

cl-prompt: (godb:view-cl-godb)


Future Releases

In the future the CL-GODB will be ported to clsql




Questions? Queries? Suggestions? Comments? Please direct them at me.