1;
# package Bio::EnsEMBL::Analysis::Config::GeneBuild::ExonerateSolexa
# 
# Cared for by EnsEMBL (ensembl-dev@ebi.ac.uk)
#
# Copyright GRL & EBI
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::EnsEMBL::Analysis::Config::GeneBuild::ExonerateSolexa

=head1 SYNOPSIS

    use Bio::EnsEMBL::Analysis::Config::GeneBuild::ExonerateSolexa

=head1 DESCRIPTION

This contains the specific configuraton for 
Bio::EnsEMBL::Analysis::RunnableDB::ExonerateSolexa and 
Bio::EnsEMBL::Analysis::RunnableDB::ExonerateSolexaTranscript

=head1 CONTACT

=cut


package Bio::EnsEMBL::Analysis::Config::GeneBuild::ExonerateSolexa;

use strict;
use vars qw( %Config );

%Config = (
  EXONERATE_SOLEXA_CONFIG_BY_LOGIC =>  {
            DEFAULT =>  {
             # The database connections used are defined in 
             # Bio::EnsEMBL::Analysis::Config::GeneBuild::Databases
             # Database to write the output features into
             OUT_DB   => '',

             # Compress identical dna align features
             COMPRESSION => '0',

             # Solexa reads are paired end reads
             PAIREDEND => '',
             
             # pair the features if they are paired end
             PAIR => '',
              
             # If we are pairing features what is the maximum sized gap between them
             PAIREDGAP => '200000',
	     
	     # dont allow more then X % missmatches ie a number of 6%  = 2 missmatches on a 35 bp read
	     # and 4 missmatches on a 75 bp read etc..
	     MISSMATCH => 6,
	                 
             # Specific config for ExonerateSolexaTranscript
             ##############################################
             # Project onto the genome ( generally this is kind of the point )
             PROJECT => '1',
             # Database to fetch the trancripts from
             TRANSDB => '',
             # Biotype of the transcripts to fetch ( if left blank all transcripts are fetched )
             BIOTYPE => 'protein_coding',
             # If set to 1 only reads supporting introns will be written to the database 
             INTRON_MODELS => '1',
	     # Reads must cross an intron bounday by at least this many bases
	     INTRON_OVERLAP => '9',
       	     },
     }
);

sub import {
  my ($callpack) = caller(0); # Name of the calling package
  my $pack = shift; # Need to move package off @_

  # Get list of variables supplied, or else everything
  my @vars = @_ ? @_ : keys( %Config );
  return unless @vars;
  
  # Predeclare global variables in calling package
  eval "package $callpack; use vars qw("
    . join(' ', map { '$'.$_ } @vars) . ")";
    die $@ if $@;


    foreach (@vars) {
	if ( defined $Config{$_} ) {
            no strict 'refs';
	    # Exporter does a similar job to the following
	    # statement, but for function names, not
	    # scalar variables:
	    *{"${callpack}::$_"} = \$Config{ $_ };
	} else {
	    die "Error: Config: $_ not known\n";
	}
    }
}

1;
