MAGE Loader

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

This document describes how to build and run the MAGE Loader. The MAGE loader is located in the mage-loader/ subdirectory of the warehouse distribution. For more information regarding the MAGE loader, see the MAGE Loader Manual.

Obtaining the Input Files
Building the MAGE Loader
Running the MAGE Loader
Documentation

Obtaining the Input Files

The MAGE loader loads data in the MAGE-ML format.  The loader can accept both 1.0 and 1.1 versions of MAGE-ML, (see instructions below).  MAGE-ML is available from a variety of sources, including for example ArrayExpress from the European Bioinformatics Institute (http://www.ebi.ac.uk/arrayexpress/).  Unfortunately, the MAGE-ML standard does not include any attributes to indicate which version of MAGE-ML any given document is.  According to the MGED Society (Microarray Gene Expression Data Society, the group who defined the MAGE standard), the version of MAGE-ML that a given data file uses is, by convention, specified in the <DOCTYPE> declaration at the beginning of the XML file.  For example, this declaration indicates that the file is version 1.1:
<!DOCTYPE MAGE-ML PUBLIC "-//OMG//DTD MAGE-ML 1.1//EN" "1.1/MAGE-ML.dtd">
Alternatively, if it is not clear from the <DOCTYPE> declaration, the data file may be inspected to see which version of MAGE-ML it likely is.  Version 1.0 of MAGE-ML allows only one ExperimentDesign to be associated with an Experiment.  The data file will contain the <ExperimentDesign_assn> element.  In version 1.1 of  MAGE-ML, multiple ExperimentDesigns may be associated with an Experiment. The data file will contain the  <ExperimentDesigns_assnlist> element isntead.

Building the MAGE 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 mage-loader directory. Then:

osprompt: ant clean
osprompt: ant build

For a list of all project targets, execute:

    osprompt: ant -projecthelp

The expected build output is here.

Running the MAGE Loader

Dependencies: none.

The MAGE loader is run from the mage-loader/dist directory.  Please use the script appropriate to the version of MAGE-ML you are loading (runMAGE-1.0-Loader.sh or runMAGE-1.1-Loader.sh).

usage: runMAGE-1.1-Loader.sh
 -d,--dbms <dbms>                DBMS type (mysql or oracle)
 -f,--file <file>                Name of input data file
 -h,--help                       Print usage instructions
 -n,--name <name>                Name or SID of database
 -p,--properties <file>          Name of properties file
 -r,--release <release date>     Release date of the input dataset
 -s,--host <host>                Name or IP address of database server
                                 host
 -t,--port <port>                Port database server is listening at
 -u,--username <username>        Username for connection to the database
 -v,--version <version number>   Version number of the input dataset
 -w,--password <password>        Password for connection to the database

Properties may be set on the command line or in the properties file.
Values on the command line take precedence over those in a properties
file. Properties in a property file are specified in name-value pairs. For
example: port=1234

A template properties file can be found in the dist directory (mage.properties).

Example of specifying parameters on the command line:

./runMAGE-1.1-Loader.sh -d oracle -f input.xml -n biospice -s chive.ai.sri.com -t 1234 -u myusername -w mypassword -v 123 -r "November 24, 2004"

Example:  Running the loader using a properties file:

Edit mage.properties to have the required values:

dbms=oracle
file=input.xml
name=biospice
host=localhost
port=1521
username=myname
password=mypassword
version=123
release=November 24, 2004

Then run the script by passing in the name of the properties file:

./runMAGE-1.1-Loader.sh -p mage.properties

A log file is generated during the run.  The log file is located at mage-loader/dist/MAGELoader.log.

Documentation

The following documents are located in the doc directory:
  1. MAGE Loader Manual
  2. MAGE-to-BioWarehouse mapping documentation