CMR Loader

(C) 2006 SRI International. All Rights Reserved.  See BioWarehouse Overview for license details.


This document describes how to build and run the Comprehensive Microbial Resource (CMR) Loader. The CMR loader is located in the cmr-loader/ subdirectory of the warehouse distribution. For more information regarding the CMR loader, see the CMR Manual.

Building the CMR Loader
Running the CMR Loader
Testing the CMR Loader
Documentation

[top]  Building the CMR Loader

Before building the loader, make sure the environment is configured according to the Environment Setup. Also make sure the schema is loaded into the database as specified in the Schema document.

To build the loader, bring up a shell and navigate to the cmr-loader/src/ directory. Then:

MySQL:
osprompt: make clean
osprompt: make db=mysql
Creates the file mysql-cmr-loader

Oracle:
osprompt: make clean
osprompt: make db=oracle
If file wh_oracle_util.c is reported missing, re-run the above make command:
osprompt: make db=oracle
Creates the file oracle-cmr-loader

Also, a symbolic link named "cmr-loader" is created, which points to the newly created executable. This can be used as a synonym for the most recently created DBMS-specific loader if desired.

If the build fails and gives errors about header files which are not found, read the section on configuring the appropriate client in Environment Setup. Posible problems are: improper installation of ProC (Oracle) or library/header files installed in an incorrect place.

[top]  Running the CMR loader

The CMR loader can be run from the same machine where the Warehouse database is installed, or it can be run remotely. To run the Oracle loader remotely, consult the Oracle documentation for instructions. To run the MySQL loader remotely, simply provide the correct host parameter for the location of the MySQL server.

Obtaining the CMR databases

The CMR Manual contains information regarding the CMR data set. See the CMR Homepage for general information about CMR.  Make sure any compressed files are uncompressed before running the loader.

Running the CMR loader

The cmr-loader/src/ directory contains scripts to run the MySQL and Oracle loaders.

MySQL:

To load CMR into MySQL, invoke the following script:
    ./run-mysql host database user password datadir version releasedate variant 
host - The machine address where the MySQL server/database resides. database - Name of the MySQL database to be loaded. user - MySQL userid. password - MySQL password for userid. datadir - Directory which contains the CMR data files to be loaded. version - Database version, which is stored in DataSet.Version. releasedate - Database release date, which is stored in DataSet.ReleaseDate. variant - Which ORFs to load - ALL or ORIGINAL or PRIMARY or TIGR (default ALL).
For example:
    ./run-mysql 123.45.67.8 warehouse me mypwd /space/bio/databases/CMR/released 20.0 2008-04-01 original
This command loads CMR data into the MySQL database named warehouse. The data files are located in the directory /space/bio/databases/CMR/released and the user name and password used to access MySQL are me and mypwd.

Oracle:

To load CMR into Oracle, invoke the following script:
    ./run-oracle "user/passwd@tnsname" datadir version releasedate variant 
user/passwd@tnsname - User name and password, and optional TNS name of database. Ex: "dan/mypwd", "dan/mypwd@mydb" datadir - Directory which contains the CMR data files. version - Database version, which is stored in DataSet.Version. releasedate - Database release date, which is stored in DataSet.ReleaseDate. variant - Which ORFs to load - ALL or ORIGINAL or PRIMARY or TIGR (default ALL).
For example:
    ./run-oracle "me/mypwd@mydb" /space/bio/databases/CMR/released 20.0 2008-04-01 original
This command loads CMR data into the Oracle database with the TNS name mydb. The data files are located in the directory /space/bio/databases/CMR/released and the user name and password used to access Oracle is "me/mypwd".

[top]  Testing the CMR Loader

The loader may report parse errors; this is expected. Sample output for MySQL can be found in the file load-mysql-primary.log. Sample output when for Oracle can be found in the file load-oracle-primary.log.

After running the loader, you may run a query to determine how many warehouse objects were loaded. See the document on Running the Perl Utiltity scripts for how to do so. This query should report over one million entries loaded; the exact correct number depends on the exact version of the database that was loaded.

[top]  Developer Documentation

The following documents are located in the doc directory: