Bio::Tools
AlignFactory
Toolbar
Summary
Bio::Tools::AlignFactory - Base object for alignment factories
Package variables
No package variables defined.
Included modules
Inherit
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
Methods description
Title : kbyte() Usage : set/gets the amount of memory able to be used Function : : $factory->kbyte(200); : Returns : Argument : memory in kilobytes |
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 |
Title : set_memory_and_report Usage : Only used by subclasses. Function: Example : Returns : Args : |
Methods code
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); } |
sub kbyte
{ my ($self,$value) = @_;
if( defined $value ) {
$self->{'kbyte'} = $value;
}
return $self->{'kbyte'}; } |
sub new
{ my($class,@args) = @_;
my $self = $class->SUPER::new(@args);
$self->_initialize(@args);
$self->{'kbyte'} = 20000;
$self->{'report'} = 0;
return $self; } |
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'}; } |
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
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _