3 # BioPerl module for Bio::Matrix::MatrixI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Jason Stajich <jason-at-bioperl.org>
9 # Copyright Jason Stajich
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
17 Bio::Matrix::MatrixI - An interface for describing a Matrix
25 This is an interface describing how one should be able to interact
26 with a matrix. One can have a lot of information I suppose and this
27 outline won't really work for PWM or PSSMs. We will have to derive a
28 particular interface for those.
34 User feedback is an integral part of the evolution of this and other
35 Bioperl modules. Send your comments and suggestions preferably to
36 the Bioperl mailing list. Your participation is much appreciated.
38 bioperl-l@bioperl.org - General discussion
39 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
43 Please direct usage questions or support issues to the mailing list:
45 I<bioperl-l@bioperl.org>
47 rather than to the module maintainer directly. Many experienced and
48 reponsive experts will be able look at the problem and quickly
49 address it. Please include a thorough description of the problem
50 with code and data examples if at all possible.
54 Report bugs to the Bioperl bug tracking system to help us keep track
55 of the bugs and their resolution. Bug reports can be submitted via
58 https://github.com/bioperl/bioperl-live/issues
60 =head1 AUTHOR - Jason Stajich
62 Email jason-at-bioperl.org
66 The rest of the documentation details each of the object methods.
67 Internal methods are usually preceded with a _
72 # Let the code begin...
75 package Bio
::Matrix
::MatrixI
;
80 use base
qw(Bio::Root::RootI);
86 Usage : my $id = $matrix->matrix_id
87 Function: Get the matrix ID
88 Returns : string value
96 $self->throw_not_implemented();
102 Usage : my $name = $matrix->matrix_name();
103 Function: Get the matrix name
104 Returns : string value
113 $self->throw_not_implemented();
119 Usage : my $entry = $matrix->get_entry($rowname,$columname)
120 Function: Get the entry for a given row,column pair
131 $self->throw_not_implemented();
138 Usage : my @row = $matrix->get_column('ALPHA');
139 Function: Get a particular column
140 Returns : Array (in array context) or arrayref (in scalar context)
142 Args : name of the column
149 $self->throw_not_implemented();
155 Usage : my @row = $matrix->get_row('ALPHA');
156 Function: Get a particular row
157 Returns : Array (in array context) or arrayref (in scalar context)
159 Args : name of the row
165 $self->throw_not_implemented();
172 Usage : my @diagonal = $matrix->get_diagonal;
173 Function: Get the diagonal of the matrix
174 Returns : Array (in array context) or arrayref (in scalar context)
182 $self->throw_not_implemented();
185 =head2 column_num_for_name
187 Title : column_num_for_name
188 Usage : my $num = $matrix->column_num_for_name($name)
189 Function: Gets the column number for a particular column name
196 sub column_num_for_name
{
199 $self->throw_not_implemented();
202 =head2 row_num_for_name
204 Title : row_num_for_name
205 Usage : my $num = $matrix->row_num_for_name($name)
206 Function: Gets the row number for a particular row name
213 sub row_num_for_name
{
215 $self->throw_not_implemented();
221 Usage : my $rowcount = $matrix->num_rows;
222 Function: Get the number of rows
231 $self->throw_not_implemented();
238 Usage : my $colcount = $matrix->num_columns
239 Function: Get the number of columns
248 $self->throw_not_implemented();
256 Usage : my $matrix = $matrix->reverse
257 Function: Get the reverse of a matrix
266 $self->throw_not_implemented();
272 Usage : my @rows = $matrix->row_names
273 Function: The names of all the rows
274 Returns : array in array context, arrayref in scalar context
282 $self->throw_not_implemented();
289 Usage : my @columns = $matrix->column_names
290 Function: The names of all the columns
291 Returns : array in array context, arrayref in scalar context
299 $self->throw_not_implemented();