developer.properties
file: warehouse/utils/bin/warehouse-install.xml
(build targets are defined in build.xml
).warehouse/utils/bin
directory, copy the file developer.properties.template
to developer.properties
,
and edit the file for your values. You only need to define
values for the properties you intend to use, which includes the
database connection parameters and any of the loader properties for
loaders you want to run.osprompt: ant -f warehouse-install.xml -p
Buildfile: warehouse-install.xml Main targets: |
osprompt: ant -f warehouse-install.xml load-schema load-ncbi-taxonomy
osprompt: ant -f warehouse-install.xml load-go load-biocyc
osprompt: ant -f warehouse-install.xml build-all
Various Perl scripts are provided with the Warehouse. This document explains how to configure the environment for these scripts, and how to run a script that is particularly useful for testing the Warehouse and summarizing its contents.
Perl DBI must be installed first. It can be obtained from the site: http://www.cpan.org/modules/by-module/DBI/.
Oracle: Install Perl DBD for Oracle. It can obtained from: http://www.cpan.org/modules/by-module/DBD/ .
MySQL: Install Perl DBD for MySQL. It can obtained from: http://www.cpan.org/modules/by-module/DBD/.
The directory
utils/src/perl
contains a perl scriptdataSetStats.pl
. When run, it will output the current data sets in the database, and the number of entries in each. Usage is:Oracle:
sid defaults to the value of the environment variableosprompt: perl dataSetStats.pl oracle userid password [sid] [host]
ORACLE_SID
.
host defaults tolocalhost
.MySQL:
database defaults to the value of the environment variableosprompt: perl dataSetStats.pl mysql userid password [database] [host]
ORACLE_SID
(though this may not be what you wanted).
host defaults tolocalhost
.As an example, output like the following is printed for the Enzyme, Swissprot and Bio-Cyc loaders:
WID: 2
NAME: Swiss-Prot
VERSION: 40.0
LOADDATE: 02-OCT-02
RELEASEDATE: October 2001
HOMEURL: http://www.expasy.org/sprot/
QUERYURL:
Number of Entries: 859675
WID: 859677
NAME: Enzyme
VERSION: unknown
LOADDATE: 03-OCT-02
RELEASEDATE: October 27, 2001
HOMEURL: http://www.expasy.org/enzyme/
QUERYURL:
Number of Entries: 15705
WID: 875382
NAME: BsubCyc
VERSION: 6.0
LOADDATE: 03-OCT-02
RELEASEDATE: 2002-02-15 00:00:00
HOMEURL: http://ecocyc.org:1555/BSUB/organism-summary?object=BSUB
QUERYURL: http://ecocyc.org:1555//BSUB/NEW-IMAGE?object=%s
Number of Entries: 10523
warehouse/utils/src/java/build.xml
developer.properties
file with database connection parameters and a property called "wid" whose value is the WID of the object to be searched for.
osprompt: ant run-find-object
"summary.html"
.
Only tables with one or more rows are represented in the output.
This program should not be run on large database instances, as
the output file will be correspondingly large. warehouse/utils/src/java/build.xml
.properties
file with database connection parameters.osprompt: ant run-html-dump
"datasets.txt"
. warehouse/utils/src/java/build.xml
.properties
file with database connection parameters.osprompt: ant run-summarize-datasets
Hint: If the number of datasets is large, this text file may be
difficult to read as the lines will wrap. The output can be more
easily read if opened in Excel, using the comma as the field delimieter.
utils/bin/runDeleteDataSet.sh
warehouse/util/src/java
using the commandant build
Then use the script:
usage: runDeleteDataSet.sh
-x,--datasetwids <datasetwids> Comma-separated list of DataSet.WIDs of
datasets to be deleted
-d,--dbms
<dbms>
DBMS type (mysql or oracle)
-h,--help
Print usage instructions
-n,--name
<name>
Name or SID of database
-p,--properties
<file>
Name of properties file
-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
-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
Alternatively, the Ant script at warehouse/utils/src/java/build.xml may be used (with the above properties specified in developer.properties
):osprompt: ant run-delete-dataset
warehouse/schema/build.xml
.properties
file with database connection parameters.osprompt: ant drop-all
warehouse/util/bin/runSchemaDiffTool.sh
warehouse/util/src/java
using the commandant build
usage: runSchemaDiffTool.sh schema-file-1.xml schema-file-2.xml