add some significant milestones
[bioperl-live.git] / Bio / Matrix / MatrixI.pm
blob8b248b0e0644864d2f25b5338e8984d7d243dad7
1 # $Id $
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
15 =head1 NAME
17 Bio::Matrix::MatrixI - An interface for describing a Matrix
19 =head1 SYNOPSIS
21 # Get a Matrix object
23 =head1 DESCRIPTION
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.
30 =head1 FEEDBACK
32 =head2 Mailing Lists
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
41 =head2 Support
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.
52 =head2 Reporting Bugs
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
56 email or the web:
58 http://bugzilla.open-bio.org/
60 =head1 AUTHOR - Jason Stajich
62 Email jason-at-bioperl.org
64 =head1 APPENDIX
66 The rest of the documentation details each of the object methods.
67 Internal methods are usually preceded with a _
69 =cut
72 # Let the code begin...
75 package Bio::Matrix::MatrixI;
76 use strict;
79 use base qw(Bio::Root::RootI);
82 =head2 matrix_id
84 Title : matrix_id
85 Usage : my $id = $matrix->matrix_id
86 Function: Get the matrix ID
87 Returns : string value
88 Args :
91 =cut
93 sub matrix_id{
94 my ($self) = @_;
95 $self->throw_not_implemented();
98 =head2 matrix_name
100 Title : matrix_name
101 Usage : my $name = $matrix->matrix_name();
102 Function: Get the matrix name
103 Returns : string value
104 Args :
107 =cut
109 sub matrix_name{
110 my ($self) = @_;
112 $self->throw_not_implemented();
115 =head2 get_entry
117 Title : get_entry
118 Usage : my $entry = $matrix->get_entry($rowname,$columname)
119 Function: Get the entry for a given row,column pair
120 Returns : scalar
121 Args : $row name
122 $column name
125 =cut
127 sub get_entry{
128 my ($self) = @_;
130 $self->throw_not_implemented();
134 =head2 get_column
136 Title : get_column
137 Usage : my @row = $matrix->get_column('ALPHA');
138 Function: Get a particular column
139 Returns : Array (in array context) or arrayref (in scalar context)
140 of values
141 Args : name of the column
144 =cut
146 sub get_column{
147 my ($self) = @_;
148 $self->throw_not_implemented();
151 =head2 get_row
153 Title : get_row
154 Usage : my @row = $matrix->get_row('ALPHA');
155 Function: Get a particular row
156 Returns : Array (in array context) or arrayref (in scalar context)
157 of values
158 Args : name of the row
160 =cut
162 sub get_row{
163 my ($self) = @_;
164 $self->throw_not_implemented();
168 =head2 get_diagonal
170 Title : get_diagonal
171 Usage : my @diagonal = $matrix->get_diagonal;
172 Function: Get the diagonal of the matrix
173 Returns : Array (in array context) or arrayref (in scalar context)
174 Args : none
177 =cut
179 sub get_diagonal{
180 my ($self) = @_;
181 $self->throw_not_implemented();
184 =head2 column_num_for_name
186 Title : column_num_for_name
187 Usage : my $num = $matrix->column_num_for_name($name)
188 Function: Gets the column number for a particular column name
189 Returns : integer
190 Args : string
193 =cut
195 sub column_num_for_name{
196 my ($self) = @_;
198 $self->throw_not_implemented();
201 =head2 row_num_for_name
203 Title : row_num_for_name
204 Usage : my $num = $matrix->row_num_for_name($name)
205 Function: Gets the row number for a particular row name
206 Returns : integer
207 Args : string
210 =cut
212 sub row_num_for_name{
213 my ($self) = @_;
214 $self->throw_not_implemented();
217 =head2 num_rows
219 Title : num_rows
220 Usage : my $rowcount = $matrix->num_rows;
221 Function: Get the number of rows
222 Returns : integer
223 Args : none
226 =cut
228 sub num_rows{
229 my ($self) = @_;
230 $self->throw_not_implemented();
234 =head2 num_columns
236 Title : num_columns
237 Usage : my $colcount = $matrix->num_columns
238 Function: Get the number of columns
239 Returns : integer
240 Args : none
243 =cut
245 sub num_columns{
246 my ($self) = @_;
247 $self->throw_not_implemented();
251 # inverse?
252 =head2 reverse
254 Title : reverse
255 Usage : my $matrix = $matrix->reverse
256 Function: Get the reverse of a matrix
257 Returns :
258 Args :
261 =cut
263 sub reverse{
264 my ($self) = @_;
265 $self->throw_not_implemented();
268 =head2 row_names
270 Title : row_names
271 Usage : my @rows = $matrix->row_names
272 Function: The names of all the rows
273 Returns : array in array context, arrayref in scalar context
274 Args : none
277 =cut
279 sub row_names{
280 my ($self) = @_;
281 $self->throw_not_implemented();
285 =head2 column_names
287 Title : column_names
288 Usage : my @columns = $matrix->column_names
289 Function: The names of all the columns
290 Returns : array in array context, arrayref in scalar context
291 Args : none
294 =cut
296 sub column_names{
297 my ($self) = @_;
298 $self->throw_not_implemented();