Bio::Matrix
Mlagan
Toolbar
Summary
Bio::Matrix::Mlagan - A generic matrix with mlagan fields
Package variables
No package variables defined.
Inherit
Synopsis
# See Bio::Matrix::Generic for most methods.
# These are relevant for mlagan IO:
$matrix->gap_open(-400);
$matrix->gap_continue(-25);
Description
This is based on Bio::Matrix::Generic, differing by storing gap_open and
gap_continue data members to allow mlagan IO (see Bio::Matrix::IO::mlagan).
(Those values are 'outside' the matrix.)
It also limits the structure to a 6x6 matrix with row & column names 'A', 'C',
'G', 'T', '.' and 'N'.
Methods
Methods description
Title : new Usage : my $obj = Bio::Matrix::Generic->new(); Function: Builds a new Bio::Matrix::Generic object Returns : an instance of Bio::Matrix::Generic Args : -values => arrayref of arrayrefs of data initialization -matrix_id => id of the matrix -matrix_name => name of the matrix -matrix_init_value => default value to initialize empty cells -gap_open => gap open penalty (int) -gap_continue => gap continue penalty (int)
NB: -rownames and -colnames should not be given here, since they are
always being set to 'A', 'C', 'G', 'T', '.' and 'N'. |
Title : gap_open Usage : $obj->gap_open(-400); Function: Get/set the gap open amount. Returns : int Args : none to get, OR int to set |
Title : gap_continue Usage : $obj->gap_continue(-25); Function: Get/set the gap continue amount. Returns : int Args : none to get, OR int to set |
Title : add_row Usage : Do not use Function: This generic method is not suitable for mlagan, where the number of rows is fixed. Returns : Warning Args : none |
Title : remove_row Usage : Do not use Function: This generic method is not suitable for mlagan, where the number of rows is fixed. Returns : Warning Args : none |
Title : add_column Usage : Do not use Function: This generic method is not suitable for mlagan, where the number of columns is fixed. Returns : Warning Args : none |
Title : remove_column Usage : Do not use Function: This generic method is not suitable for mlagan, where the number of columns is fixed. Returns : Warning Args : none |
Methods code
sub new
{ my($class, @args) = @_;
my %args = (@args, -rownames => [qw(A C G T . N)],
-colnames => [qw(A C G T . N)]);
my $self = $class->SUPER::new(%args);
$self->_set_from_args(\@args, -methods => [qw(gap_open gap_continue)]);
return $self;} |
sub gap_open
{ my $self = shift;
if (@_) { $self->{gap_open} = shift }
return $self->{gap_open} || return;} |
sub gap_continue
{ my $self = shift;
if (@_) { $self->{gap_continue} = shift }
return $self->{gap_continue} || return;} |
sub add_row
{ shift->warn("Mlagan matricies are fixed at 6x6");} |
sub remove_row
{ shift->warn("Mlagan matricies are fixed at 6x6");} |
sub add_column
{ shift->warn("Mlagan matricies are fixed at 6x6");} |
sub remove_column
{ shift->warn("Mlagan matricies are fixed at 6x6");
}
1;} |
General documentation
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via the
web:
https://redmine.open-bio.org/projects/bioperl/
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _