The dbdoc_util.pl utility

BioQ uses a MySQL relational database to store documentation on its genomic relational database. The Perl program creates, configures and maintains this database. It will initialize the database, copy documentation from one database to another, update documentation from an XML file, dump the database, and will also generate process flow diagrams using GraphViz.

Contents

Usage

dbdoc_util.pl command [options]

Commands

inituser

Create the MySQL user and set permissions. See the configuration page.

dbdoc_util.pl inituser --options-file=init_user.opt

init_user.opt:

db-user=            bioq
db-host=            localhost
db-root-user=       root
db-password-file=   ./passwd

initdb

Create the database and initialize the schema using the dbdoc-init-script option.

Example

dbdoc_util.pl initdb --options-file=init_db.opt

init_db.opt:

dbdoc-db=           bioq_dbdoc_1
dbdoc-init-script=  db_doc_model.sql

copydb

Copy documentation from an existing database.

Example

dbdoc_util.pl copydb --options-file=copy_db.opt

copy_db.opt:

dbdoc-db=           bioq_dbdoc_new
dbdoc-init-script=  db_doc_model.sql
dbdoc-previous-db=  bioq_dbdoc_old

initdoc

Create default documentation entries using the names of database, tables and columns found in the genomic relational databases themselves. In MySQL, this information is taken from the information_schema database. This must be done before additional documentation can be entered using the updatedoc command.

Example

dbdoc_util.pl initdoc --options-file=init_doc.opt

init_doc.opt:

dbdoc-db=           bioq_dbdoc_1
dbdoc-target-db=    bioq_hapmap_pr28_dbsnp132

updatedoc

Read documentation from XML and update the documentation database.dbdoc_util.pl initdoc --options-file=init_doc.opt

dbdoc_util.pl updatedoc --options-file=update_doc.opt

update_doc.opt:

dbdoc-db=           bioq_dbdoc_1
dbdoc-target-db=    bioq_hapmap_pr28_dbsnp132
dbdoc-xml-file=     bioq_hapmap_pr28_dbsnp132_core.xml

traceresults

Determine if a table can be traced back to subjects and biologics.

makelegend

Create a legend for the diagrams that trace experimental process flow using the BERT relational model.

tracebacktable

Create a diagram that traces experimental process flow back from a table using the BERT relational model.

tracebackgroup

Create a diagram that traces experimental process flow back from a flow group using the BERT relational model.

tracebackprocess

Create a diagram that traces experimental process flow back from a process using the BERT relational model.

dump

Dump MySQL databases. This is not yet implemented.

Options

Option

Value

Default

Description

add-svn-rev-on-init

0/1

0

Add the Subversion revision number to the 'reference' table when initializing the documentation database.

db-delete-temp-tables

0/1

1

Delete temporary tables

db-dump-dir

text

 

Local directory used to store database dumps. Note that a subdirectory will be created for each database.

db-engine

text

MyISAM

Database engine to use when creating new tables. Example: MyISAM.

db-host

text

 

Address of database host

db-max-rows

integer

 

Maximum number of rows to load into database. See also max-snps.

db-no-mysql-password

0/1

0

Do not supply a password to MySQL. Assume this exists in ~/.my.cnf

db-password

text

 

Database password

db-password-file

text

 

File containing database password

db-root-user

text

root

Database root user or some user that has the GRANT OPTION privilege

db-user

text

 

Database username

dbdoc-db

text

 

Local documentation database

dbdoc-db-old

text

 

Previous dbDoc database - for copying into dbdoc-db

dbdoc-init-script

text

 

Path to the SQL script that defines the dbDoc schema

dbdoc-previous-db

text

 

The database from which to copy documentation into the current database (dbdoc-db)

dbdoc-target-db

text

 

Database to document

dbdoc-trace-db

text

 

The database in which to trace a table or process

dbdoc-trace-group

text

 

The group to trace

dbdoc-trace-image-name

text

trace

How to name the file. If option is 'trace_table' then it created trace_table.gif for GIF files.

dbdoc-trace-make-thumb

0/1

0

Whether to make a smaller thumbnail version

dbdoc-trace-process

text

 

The process to trace

dbdoc-trace-show-ref

0/1

0

Whether to show reference elements in the diagram

dbdoc-trace-table

text

 

The table to trace

dbdoc-trace-thumb-width

integer

600

Width of thumbnail image in pixels for diagram

dbdoc-xml-file

text

./doc.xml

The XML file with the documentation to be used

dbsnp-db

text

 

Local dbSNP database to use for mapping data if --plink-use-dbsnp-map is selected

delete-temp-files

0/1

1

Delete temporary files

dot-dpi

integer

96

Resolution for DOT image file

dot-flow-dir

text

LR

Flow direction in DOT diagram

dot-group-color

text

lightgrey

Group color in BERT DOT diagrams

dot-height

text

 

Height of DOT image file in inches

dot-image-type

text

gif

The type of image file created by the dot command for process flow diagrams.

dot-node-font-size

text

12

Size of font in points used for text in nodes

dot-node-height

decimal

0.3

Height of nodes in inches

dot-process-color

text

 

Process color in BERT DOT diagrams

dot-stylesheet-path

text

./svg_styles.css

Path to .css file with dot stylesheet. This is for use with SVG output.

dot-table-color

text

lightcyan

Table color in BERT DOT diagrams

dot-width

decimal

10.5

Width of DOT image file in inches

help

 

 

Display message and quit

max-snps

integer

 

Maximum number of SNPs to process

options-file

text

 

File containing option values

print-options

0/1

0

Whether to print the list of options and their values

process-dir

text

 

Local directory where files are processed.

verbose

0/1

0

Verbose output