#!/usr/bin/env perl

=head1 LICENSE

Copyright (c) 2007-2009 Illumina, Inc.

This software is covered by the "Illumina Genome Analyzer Software
License Agreement" and the "Illumina Source Code License Agreement",
and certain third party copyright/licenses, and any user of this
source file is bound by the terms therein (see accompanying files
Illumina_Genome_Analyzer_Software_License_Agreement.pdf and
Illumina_Source_Code_License_Agreement.pdf and third party
copyright/license notices).

This file is part of the Consensus Assessment of Sequence And VAriation
(CASAVA) software package.

=head1 NAME

configureRnaBuild.pl - wrapper with RNA defaults for configureBuild.pl

=head1 DIAGNOSTICS

=head2 Exit status

0: successful completion
1: abnormal completion
2: fatal error

=head2 Errors

All error messages are prefixed with "ERROR: ".

=head2 Warnings

All warning messages generated by CASAVA are prefixed with "WARNING: ".

=head1 CONFIGURATION AND ENVIRONMENT

=back

=head1 BUGS AND LIMITATIONS

There are no known bugs in this module.

All documented features are fully implemented.

Please report problems to Illumina Technical Support (support@illumina.com)

Patches are welcome.

=head1 AUTHOR

Richard Carter, Lukasz Szajkowski

=cut


use warnings FATAL => 'all';
use strict;
use POSIX qw(strftime);
use File::Spec;

my $help      = 0;
my $isVersion = 0;

my @configureBuildParams = @ARGV;

my %RNASpecificOptions = (
	'--applicationType'     => 'RNA',
	'--variantsNoCovCutoff' => undef
);

my $runPl = File::Spec->catfile('/home/psgendb/local/pkg/CASAVA_v1.8.2-build/bin', 'configureBuild.pl');

foreach my $option (sort keys %RNASpecificOptions){
	push @configureBuildParams, $option;
	push @configureBuildParams, $RNASpecificOptions{$option} if defined $RNASpecificOptions{$option};
}

unshift @configureBuildParams, $runPl;

exec @configureBuildParams;
