2 # BioPerl module for Bio::Matrix::Mlagan
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Sendu Bala <bix@sendu.me.uk>
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Matrix::Mlagan - A generic matrix with mlagan fields
20 # See L<Bio::Matrix::Generic> for most methods.
21 # These are relevant for mlagan IO:
22 $matrix->gap_open(-400);
23 $matrix->gap_continue(-25);
27 This is based on Bio::Matrix::Generic, differing by storing gap_open and
28 gap_continue data members to allow mlagan IO (see Bio::Matrix::IO::mlagan).
29 (Those values are 'outside' the matrix.)
31 It also limits the structure to a 6x6 matrix with row & column names 'A', 'C',
32 'G', 'T', '.' and 'N'.
38 User feedback is an integral part of the evolution of this and other
39 Bioperl modules. Send your comments and suggestions preferably to
40 the Bioperl mailing list. Your participation is much appreciated.
42 bioperl-l@bioperl.org - General discussion
43 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
47 Please direct usage questions or support issues to the mailing list:
49 I<bioperl-l@bioperl.org>
51 rather than to the module maintainer directly. Many experienced and
52 reponsive experts will be able look at the problem and quickly
53 address it. Please include a thorough description of the problem
54 with code and data examples if at all possible.
58 Report bugs to the Bioperl bug tracking system to help us keep track
59 of the bugs and their resolution. Bug reports can be submitted via the
62 https://github.com/bioperl/bioperl-live/issues
64 =head1 AUTHOR - Sendu Bala
70 The rest of the documentation details each of the object methods.
71 Internal methods are usually preceded with a _
75 package Bio
::Matrix
::Mlagan
;
79 use base
qw(Bio::Matrix::Generic);
85 Usage : my $obj = Bio::Matrix::Generic->new();
86 Function: Builds a new Bio::Matrix::Generic object
87 Returns : an instance of Bio::Matrix::Generic
88 Args : -values => arrayref of arrayrefs of data initialization
89 -matrix_id => id of the matrix
90 -matrix_name => name of the matrix
91 -matrix_init_value => default value to initialize empty cells
92 -gap_open => gap open penalty (int)
93 -gap_continue => gap continue penalty (int)
95 NB: -rownames and -colnames should not be given here, since they are
96 always being set to 'A', 'C', 'G', 'T', '.' and 'N'.
101 my($class, @args) = @_;
102 my %args = (@args, -rownames
=> [qw(A C G T . N)],
103 -colnames
=> [qw(A C G T . N)]);
104 my $self = $class->SUPER::new
(%args);
106 $self->_set_from_args(\
@args, -methods
=> [qw(gap_open gap_continue)]);
114 Usage : $obj->gap_open(-400);
115 Function: Get/set the gap open amount.
117 Args : none to get, OR int to set
123 if (@_) { $self->{gap_open
} = shift }
124 return $self->{gap_open
} || return;
130 Usage : $obj->gap_continue(-25);
131 Function: Get/set the gap continue amount.
133 Args : none to get, OR int to set
139 if (@_) { $self->{gap_continue
} = shift }
140 return $self->{gap_continue
} || return;
147 Function: This generic method is not suitable for mlagan, where the number of
155 shift->warn("Mlagan matricies are fixed at 6x6");
162 Function: This generic method is not suitable for mlagan, where the number of
170 shift->warn("Mlagan matricies are fixed at 6x6");
177 Function: This generic method is not suitable for mlagan, where the number of
185 shift->warn("Mlagan matricies are fixed at 6x6");
190 Title : remove_column
192 Function: This generic method is not suitable for mlagan, where the number of
200 shift->warn("Mlagan matricies are fixed at 6x6");