Bio::Tools AlignFactory
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvs
Summary
Bio::Tools::AlignFactory - Base object for alignment factories
Package variables
No package variables defined.
Inherit
Bio::Root::Root
Synopsis
You wont be using this as an object, but using a dervied class
like Bio::Tools::pSW
Description
Holds common Alignment Factory attributes in place
Methods
BEGIN Code
new
No description
Code
kbyteDescriptionCode
reportDescriptionCode
set_memory_and_reportDescriptionCode
Methods description
kbytecode    nextTop
 Title     : kbyte()
Usage : set/gets the amount of memory able to be used
Function :
: $factory->kbyte(200);
:
Returns :
Argument : memory in kilobytes
reportcodeprevnextTop
 Title     : report()
Usage : set/gets the report boolean to issue reports or not
Function :
: $factory->report(1); # reporting goes on
:
Returns : n/a
Argument : 1 or 0
set_memory_and_reportcodeprevnextTop
 Title   : set_memory_and_report
Usage : Only used by subclasses.
Function:
Example :
Returns :
Args :
Methods code
BEGINTop
BEGIN {
    eval {
	require Bio::Ext::Align;
    };
    if ( $@ ) {
	print STDERR ("\nThe C-compiled engine for Smith Waterman alignments (Bio::Ext::Align) has not been installed.\n Please install the bioperl-ext package\n\n");
	exit(1);
}
newdescriptionprevnextTop
sub new {
  my($class,@args) = @_;
  my $self = $class->SUPER::new(@args);
  $self->_initialize(@args);
  # set up defaults
$self->{'kbyte'} = 20000; $self->{'report'} = 0; return $self;
}
kbytedescriptionprevnextTop
sub kbyte {
    my ($self,$value) = @_;
    
    if( defined $value ) {
	$self->{'kbyte'} = $value;
    } 
    return $self->{'kbyte'};
}
reportdescriptionprevnextTop
sub report {
    my ($self,$value) = @_;
    

    if( defined $value ) {
	if( $value != 1 && $value != 0 ) {
	    $self->throw("Attempting to modify AlignFactory Report with no boolean value!");
	}
	$self->{'report'} = $value;
    } 

    return $self->{'report'};
}
set_memory_and_reportdescriptionprevnextTop
sub set_memory_and_report {
   my ($self) = @_;

   if( $self->{'kbyte'} < 5 ) {
       $self->throw("You can suggest aligning things with less than 5kb");
   }

   &Bio::Ext::Align::change_max_BaseMatrix_kbytes($self->{'kbyte'});

   if( $self->{'report'} == 0 ) {
       &Bio::Ext::Align::error_off(16);
   } else {
       &Bio::Ext::Align::error_on(16);
   }
}

1;
}
General documentation
CONTACTTop
http://bio.perl.org/ or birney@sanger.ac.uk
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _