1# $Id $
2#
3# BioPerl module for Bio::Matrix::MatrixI
4#
5# Please direct questions and support issues to <bioperl-l@bioperl.org>
6#
7# Cared for by Jason Stajich <jason-at-bioperl.org>
8#
9# Copyright Jason Stajich
10#
11# You may distribute this module under the same terms as perl itself
12
13# POD documentation - main docs before the code
14
15=head1 NAME
16
17Bio::Matrix::MatrixI - An interface for describing a Matrix
18
19=head1 SYNOPSIS
20
21  # Get a Matrix object
22
23=head1 DESCRIPTION
24
25This is an interface describing how one should be able to interact
26with a matrix.  One can have a lot of information I suppose and this
27outline won't really work for PWM or PSSMs.  We will have to derive a
28particular interface for those.
29
30=head1 FEEDBACK
31
32=head2 Mailing Lists
33
34User feedback is an integral part of the evolution of this and other
35Bioperl modules. Send your comments and suggestions preferably to
36the Bioperl mailing list.  Your participation is much appreciated.
37
38  bioperl-l@bioperl.org                  - General discussion
39  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
40
41=head2 Support
42
43Please direct usage questions or support issues to the mailing list:
44
45I<bioperl-l@bioperl.org>
46
47rather than to the module maintainer directly. Many experienced and
48reponsive experts will be able look at the problem and quickly
49address it. Please include a thorough description of the problem
50with code and data examples if at all possible.
51
52=head2 Reporting Bugs
53
54Report bugs to the Bioperl bug tracking system to help us keep track
55of the bugs and their resolution. Bug reports can be submitted via
56email or the web:
57
58  https://github.com/bioperl/bioperl-live/issues
59
60=head1 AUTHOR - Jason Stajich
61
62Email jason-at-bioperl.org
63
64=head1 APPENDIX
65
66The rest of the documentation details each of the object methods.
67Internal methods are usually preceded with a _
68
69=cut
70
71
72# Let the code begin...
73
74
75package Bio::Matrix::MatrixI;
76$Bio::Matrix::MatrixI::VERSION = '1.7.7';
77use strict;
78
79
80use base qw(Bio::Root::RootI);
81
82
83=head2 matrix_id
84
85 Title   : matrix_id
86 Usage   : my $id = $matrix->matrix_id
87 Function: Get the matrix ID
88 Returns : string value
89 Args    :
90
91
92=cut
93
94sub matrix_id{
95   my ($self) = @_;
96   $self->throw_not_implemented();
97}
98
99=head2 matrix_name
100
101 Title   : matrix_name
102 Usage   : my $name = $matrix->matrix_name();
103 Function: Get the matrix name
104 Returns : string value
105 Args    :
106
107
108=cut
109
110sub matrix_name{
111   my ($self) = @_;
112
113   $self->throw_not_implemented();
114}
115
116=head2 get_entry
117
118 Title   : get_entry
119 Usage   : my $entry = $matrix->get_entry($rowname,$columname)
120 Function: Get the entry for a given row,column pair
121 Returns : scalar
122 Args    : $row name
123           $column name
124
125
126=cut
127
128sub get_entry{
129   my ($self) = @_;
130
131    $self->throw_not_implemented();
132}
133
134
135=head2 get_column
136
137 Title   : get_column
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)
141           of values
142 Args    : name of the column
143
144
145=cut
146
147sub get_column{
148   my ($self) = @_;
149   $self->throw_not_implemented();
150}
151
152=head2 get_row
153
154 Title   : get_row
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)
158           of values
159 Args    : name of the row
160
161=cut
162
163sub get_row{
164   my ($self) = @_;
165   $self->throw_not_implemented();
166}
167
168
169=head2 get_diagonal
170
171 Title   : get_diagonal
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)
175 Args    : none
176
177
178=cut
179
180sub get_diagonal{
181   my ($self) = @_;
182   $self->throw_not_implemented();
183}
184
185=head2 column_num_for_name
186
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
190 Returns : integer
191 Args    : string
192
193
194=cut
195
196sub column_num_for_name{
197   my ($self) = @_;
198
199    $self->throw_not_implemented();
200}
201
202=head2 row_num_for_name
203
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
207 Returns : integer
208 Args    : string
209
210
211=cut
212
213sub row_num_for_name{
214   my ($self) = @_;
215   $self->throw_not_implemented();
216}
217
218=head2 num_rows
219
220 Title   : num_rows
221 Usage   : my $rowcount = $matrix->num_rows;
222 Function: Get the number of rows
223 Returns : integer
224 Args    : none
225
226
227=cut
228
229sub num_rows{
230   my ($self) = @_;
231   $self->throw_not_implemented();
232}
233
234
235=head2 num_columns
236
237 Title   : num_columns
238 Usage   : my $colcount = $matrix->num_columns
239 Function: Get the number of columns
240 Returns : integer
241 Args    : none
242
243
244=cut
245
246sub num_columns{
247   my ($self) = @_;
248   $self->throw_not_implemented();
249}
250
251
252# inverse?
253=head2 reverse
254
255 Title   : reverse
256 Usage   : my $matrix = $matrix->reverse
257 Function: Get the reverse of a matrix
258 Returns :
259 Args    :
260
261
262=cut
263
264sub reverse{
265    my ($self) = @_;
266    $self->throw_not_implemented();
267}
268
269=head2 row_names
270
271 Title   : row_names
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
275 Args    : none
276
277
278=cut
279
280sub row_names{
281   my ($self) = @_;
282   $self->throw_not_implemented();
283}
284
285
286=head2 column_names
287
288 Title   : column_names
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
292 Args    : none
293
294
295=cut
296
297sub column_names{
298   my ($self) = @_;
299   $self->throw_not_implemented();
300}
301
3021;
303