BLASTScanner README

BLASTScanner is a console application to translate NCBI-BLAST-files (http://www.ncbi.nlm.nih.gov/BLAST/) into SQL-code suitable to load the code directly into a database. Supported databases are SQLite (http://www.sqlite.org), PostgreSQL (http://www.postgresql.org/) and MySQL (http://www.mysql.com).

General usage

Installation

Just copy and execute. BLASTScanner is provided both in source code and in binary format for different platforms. Currently the binaries for the following platforms are part of the download: Win32, Linux-32 and 64-bit, Solaris-sparc, OSF1-alpha and Mac-OSX-universal. If a binary for your platform is not available or the provided binary does not work due to some C-library incompatibilities you can compile the application easily yourself using the GCC-compiler. As the source code BLASTScanner.c does not depend on any external library it should compile easily using the command "gcc BLASTScanner.c -o BLASTScanner". The resulting binaries might be copied somewhere in your PATH and be used directly without any further installation.

Usage

The BLASTScanner applications needs two arguments for converting your BLAST-data into database data. At first the name of the BLAST-file which should be scanned and secondly the name of a table prefix which should preceed all tablenames with this prefix. This allows to store results of different BLAST-runs in the same database. A sample inovaction might be the following:

$ BLASTScanner-Windows-x86.exe  --infile sample.blastp --prefix sample > sample.sql

Please be aware, that the use of the `--infile=filename' syntax is not supported any more because it does not allow wildcards. The code in sample.sql can be used to fill the database. If you don't need a prefix use `--prefix none'. You can also use wildcards for the filenames in the following way:

$ BLASTScanner-Windows-x86.exe --infile *.blastp --prefix blastp > sample.sql

will translate all blastp-files in the current directory into database code, suitable to fill any sql-compliant database.

Usage with SQLite

BLAST-results can be directly piped into the SQLite console application like here:

$  BLASTScanner-Linux-x86 --infile sample.blastp --prefix sample | sqlite3 sample.sqlite3

Usage with MySQL

The MySQL command line client can be used to import the data into a certain database. It is recommended to do the following steps in the mysql-shell:

mysql> connect sampledb;
mysql> set autocommit=0;
mysql> source /path/to/sample.sql;

this will import your data into the database you are currently connected.

Usage with PostgreSQL

The psql command line application can be used to import the data into the database you invoke psql for importing the data into sampledb like so:

$ psql sampledb -U youruserid -f /path/to/sample.sql

License

BLASTScanner is provided under a BSD-like license (see License.txt). In short this means that you can do anything you want with the source code as long as you retain our copyright-notice.

Contact

BLASTScanner is part of the Bioscanners project at Sourceforge: http://bioscanners.sf.net. For reporting bugs and suggestions the project maintainer can be reached by email using dgroth(at)gmx(dot)de.