Sleipnir
Data2Sql

Data2Sql converts a collection of DAT/DAB files into relational tables appropriate for insertion into a SQL database.

Usage

Basic Usage

 Data2Sql -i <genes.txt> -t <table> <data.dab>*

Output (to standard output) SQL commands to construct a table named table containing the pairwise data in the DAT/DAB files data.dab, with gene names mapped to numerical IDs using genes.txt (tab-delimited file with two columns, one-based integer indices and gene names).

 Data2Sql -i <genes.txt> -d <data.dab>*

Output (to standard output) a table containing a numerical index for each input dataset data.dab.

Detailed Usage

package "Data2Sql"
version "1.0"
purpose "Convert multiple DAT/DAB files to a single SQL table"

section "Main"
option  "input"     i   "Input gene mapping"
                        string  typestr="filename"
option  "table"     t   "Database table name"
                        string  default="datapairs"

section "Miscellaneous"
option  "datasets"  d   "Output datasets table"
                        flag    off
option  "block"     b   "Block size for SQL chunking"
                        int default="1000"

section "Optional"
option  "memmap"    m   "Memory map input/output"
                        flag    off
option  "verbosity" v   "Message verbosity"
                        int default="5"
Flag Default Type Description
None None DAT/DAB files Input DAT/DAB files from which data is drawn to be converted into the output SQL file.
-i stdin Text file Tab-delimited text file containing two columns, numerical gene IDs (one-based) and unique gene names (matching those in the input DAT/DAB files).
-t datapairs String Database table name.
-d off Flag If on, output a table listing dataset ID/name relations; if off, output a table listing individual gene pair values from the input datasets.
-b 1000 Integer Initiate a new INSERT command after each block of this many data values.
-m off Flag If given, memory map the input files when possible. DAT and PCL inputs cannot be memmapped.