Installation of the external GSL and GD libraries

In order to install VAT two external libraries must be installed first. The libBIOS library depends on GSL, whereas VAT makes use of the GD library. Please follow the instructions provided by each package. The GSL library can be installed on most systems using the following commands (for details, please refer to the specific instructions at the GNU Scientific Library website):

$ cd /path/to/gsl-1.14/
$ ./configure --prefix=`pwd`
$ make
$ make install

Similarly, the GD library can be installed on most systems with the following commands:

$ cd /path/to/gd-2.0.35/
$ ./configure --prefix=`pwd` --with-jpeg=/path/to/jpegLib/
$ make
$ make install

After they are installed, the first step to install VAT is the installation and configuration of libBIOS.

Installation and Configuration of libBIOS

Depending on where the three libraries (GSL, libBIOS, and GD) are installed, the following variables need to be set:

export CPPFLAGS="-I/path/to/gsl-1.14/include -I/path/to/libbios/include -I/path/to/gd-2.0.35/include"
export LDFLAGS="-L/path/to/gsl-1.14/lib -L/path/to/libbios/lib -L/path/to/gd-2.0.35/lib"

libBIOS can be installed on most systems with the following commands:

$ cd /path/to/libbios-x.x.x/
$ ./configure --prefix=`pwd` 
$ make
$ make install

Installation of libs3

The VAT I/O layer uses libs3 to store See the website of libs3 for the prerequisites of libs3. Without the prerequisites, libs3 will fail to build. Once the prerequisites are installed, libs3 can be installed as follows:

$ cd /path/to/libs3-x.x.x/
$ make
$ make install

Installation and Configuration of VAT

A few simple steps are required to install VAT:

$ cd /path/to/vat-x.x.x/
$ ./configure --prefix=`pwd` 
$ make
$ make install

VAT contains a configuration file that resides in one's home directory as .vatrc and in the web root as vat.conf, which contains a set of variables that are used by a number of different programs. The name/value pairs are space or tab-delimited. Empty lines are lines starting with '//' are ignored.

// =============================================================================
// REQUIRED
// =============================================================================

// Tabix directory (includes both tabix and bgzip)
TABIX_DIR /path/to/tabixdir

// Directory where VAT executables are
VAT_EXEC_DIR /path/to/vat_exe


// =============================================================================
// OPTIONAL (required only for CGIs)
// =============================================================================

// Path to processed data sets
WEB_DATA_DIR /path/to/data/sets

// URL to preprocessed files
WEB_DATA_URL https://webserver/data/sets

// Path to the web data directory where the preprocessed files are stored
WEB_DATA_REFERENCE_DIR /path/to/data/reference

WEB_DATA_WORKING_DIR /path/to/data/working

WEB_DATA_RAW_DIR /path/to/data/raw

// =============================================================================
// AWS/S3 Configuration values
// =============================================================================

// Option for turning on or off Amazon Simple Storage Support (S3) support. 
// Use true to activate S3, false to deactivate. Note that if S3 support is
// active, you will need to enter your AWS account infomation for the VAT web
// components in web/lib/aws/config.inc.php
AWS_USE_S3 false

// S3 access key ID
AWS_ACCESS_KEY_ID access_key_id

// S3 secret access key
AWS_SECRET_ACCESS_KEY secret_key

// S3 hostname
AWS_S3_HOSTNAME s3.amazonaws.com

// The name of the S3 bucket for processed data sets. If S3 support is enabled,  
// this bucket is used instead of WEB_DATA_DIR
AWS_S3_DATA_BUCKET data-bucket

// The name of the S3 bucket for raw VCF input files. If S3 support is enabled,
// this bucket is used instead of WEB_DATA_RAW_DIR 
AWS_S3_RAW_BUCKET raw-bucket

// =============================================================================
// Set only if setting up as master node in master/worker configuration
// =============================================================================

// Set to true if we are using the master/worker cluster configuration, false
// if we are running single-node only
CLUSTER false

// IP address of master node. Used by worker to access the master's API
MASTER_ADDRESS xxx.xx.xxx.xx
// ----------------------------------------------------------------------------
// Used by master only:
// ----------------------------------------------------------------------------

// MySQL configuration
MASTER_MYSQL_HOST localhost
MASTER_MYSQL_USER user
MASTER_MYSQL_PASS pass
MASTER_MYSQL_DB dbname

This file has to be configured properly by filling in the required information.

Running make install will copy the configuration file to your home directory as .vatrc and is used when manually running VAT programs on the command line. Subsequently, the environment variable VAT_CONFIG_FILE should be set. It is recommended that your shell start-up script sets this variable:

VAT_CONFIG_FILE=/pathTo/vat/.vatrc

A VAT configuration file also exists in the web root as vat.conf and is expected and loaded by the VAT web application.

This step is optional, but is very useful for visualizing the results of processed data sets.

Configuring PHP

Due to the large file sizes uploaded to VAT, PHP must be configured to allow larger upload sizes. In your php.ini file, set upload_max_filesize and post_max_size to at least 100M:

upload_max_filesize = 100M
post_max_size = 100M

It is also recommended to turn off output buffering so that flush() works properly:

output_buffering = Off

VAT Setup and Configuration

In the web directory under the VAT source tree, the VAT configuration file should have been copied into this directory during make. If it is not present, copy the VAT configuration file default.vatrc from the root of the source tree into the web directory and rename it vat.conf.

Copy the contents of the web directory to your Apache web root directory. This is usually /var/www/html or /var/www. Make the /data directory that contains directory tree used by the VAT I/O layer readable and writable:

$ sudo chmod -R 777 data

You will need to download the GENCODE annotation files used by VAT. The get_annotation_sets.sh script in the /scripts directory under the VAT source tree may be used to download all the necessary annotation files using wget:

$ cd /web/root/data/reference
$ sudo /path/to/vat-x.x.x/scripts/get_annotation_sets.sh

Edit the VAT configuration file in the web root according to your installation. If you wish to set up an Amazon S3-backed installation, create two web-accessible buckets, one for storing raw VCF files and one for storing processed data sets. In your VAT configuration file, enable S3-backed storage by setting the AWS_USE_S3 directive to true and setting your AWS credentials and bucket names:

AWS_USE_S3 true

AWS_ACCESS_KEY_ID access_key_id
AWS_SECRET_ACCESS_KEY secret_key

AWS_S3_DATA_BUCKET data-bucket
AWS_S3_RAW_BUCKET raw-bucket

The WEB_DATA_URL directive must be set to the URL where the processed data sets are stored. If S3-backed storage is enabled, it should be set to the S3 URL of your data bucket:

WEB_DATA_URL http://s3.amazonaws.com/data-bucket

If you are setting up VAT to store all files locally, set WEB_DATA_URL to the URL to the directory where processed data sets are stored, which is by default data/sets:

WEB_DATA_URL http://webserver/data/sets

Regardless of whether S3-backed storage is enabled, the WEB_DATA_WORKING_DIR directive must be set to the working directory that the I/O layer uses to give each VAT process a unique copy of files requested on demand. Also, the WEB_DATA_REFERENCE_DIR directive must be set to the directory containing the reference GENCODE annotation files. By default the directories are data/working and data/reference respectively:

WEB_DATA_WORKING_DIR /web/root/data/working
WEB_DATA_REFERENCE_DIR /web/root/data/reference

If S3-backed storage is disabled, instead of using two S3 buckets, raw VCF files and processed data sets are stored in local directories. The directives WEB_DATA_RAW_DIR and WEB_DATA_DIR must be set to point to the directives used to store raw VCF files and processed data sets, which are by default data/raw and data/sets respectively:

WEB_DATA_RAW_DIR /web/root/data/raw
WEB_DATA_DIR /web/root/data/sets