comparison variant_effect_predictor/Bio/Map/MarkerI.pm @ 0:1f6dce3d34e0

Uploaded
author mahtabm
date Thu, 11 Apr 2013 02:01:53 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1f6dce3d34e0
1 # $Id: MarkerI.pm,v 1.9 2002/10/22 07:45:15 lapp Exp $
2 #
3 # BioPerl module for Bio::Map::MarkerI
4 #
5 # Cared for by Jason Stajich <jason@bioperl.org>
6 #
7 # Copyright Jason Stajich
8 #
9 # You may distribute this module under the same terms as perl itself
10
11 # POD documentation - main docs before the code
12
13 =head1 NAME
14
15 Bio::Map::MarkerI - Interface for basic marker functionality
16
17 =head1 SYNOPSIS
18
19 Give standard usage here
20
21 =head1 DESCRIPTION
22
23 Describe the interface here
24
25 =head1 FEEDBACK
26
27 =head2 Mailing Lists
28
29 User feedback is an integral part of the evolution of this and other
30 Bioperl modules. Send your comments and suggestions preferably to
31 the Bioperl mailing list. Your participation is much appreciated.
32
33 bioperl-l@bioperl.org - General discussion
34 http://bioperl.org/MailList.shtml - About the mailing lists
35
36 =head2 Reporting Bugs
37
38 Report bugs to the Bioperl bug tracking system to help us keep track
39 of the bugs and their resolution. Bug reports can be submitted via
40 email or the web:
41
42 bioperl-bugs@bioperl.org
43 http://bugzilla.bioperl.org/
44
45 =head1 AUTHOR - Jason Stajich
46
47 Email jason@bioperl.org
48
49 Describe contact details here
50
51 =head1 CONTRIBUTORS
52
53 Heikki Lehvaslaiho heikki@ebi.ac.uk
54 Lincoln Stein lstein@cshl.org
55 Jason Stajich jason@bioperl.org
56 Chad Matsalla bioinformatics1@dieselwurks.com
57
58 =head1 APPENDIX
59
60 The rest of the documentation details each of the object methods.
61 Internal methods are usually preceded with a _
62
63 =cut
64
65
66 # Let the code begin...
67
68
69 package Bio::Map::MarkerI;
70 use vars qw(@ISA);
71 use strict;
72 use Bio::Map::MappableI;
73
74 @ISA = qw(Bio::Map::MappableI);
75
76 =head2 name($new_name)
77
78 Title : name($new_name)
79 Usage : my $name = $o_usat->name($new_name) _or_
80 my $name = $o_usat->name()
81 Function: Get/Set the name for this Marker
82 Returns : A scalar representing the current name of this Marker
83 Args : If provided, the current name of this Marker
84 will be set to $new_name.
85
86 =cut
87
88 sub name {
89 my ($self) = @_;
90 $self->throw_not_implemented();
91 }
92
93 =head2 add_position
94
95 Title : add_position
96 Usage : $position->add_position($map,'100')
97 Function: Add a numeric or string position to the PositionI container
98 Returns : none
99 Args : Map - Reference to Bio::Map::MapI
100 String or Numeric coding for a position on a map
101
102 =cut
103
104 sub add_position{
105 my ($self,$map,$value) = @_;
106 $self->throw_not_implemented();
107 }
108
109
110 =head2 each_position
111
112 Title : positions
113 Usage : my @positions = $position->each_position_value('mapname');
114 Function: Retrieve a list of positions coded as strings or ints
115 Returns : Array of position values
116 Args : none
117
118 =cut
119
120 sub each_position {
121 my ($self,$mapname) = @_;
122 $self->throw_not_implemented();
123 }
124
125 =head2 purge_positions
126
127 Title : purge_positions
128 Usage : $position->purge_positions
129 Function: Remove all the position values stored for a Marker
130 Returns : none
131 Args : [optional] only purge values for a given map
132
133 =cut
134
135 sub purge_position_values{
136 my ($self, $map) = @_;
137 $self->throw_not_implemented();
138 }
139
140 =head2 known_maps
141
142 Title : known_maps
143 Usage : my @maps = $marker->known_maps
144 Function: Returns the list of maps that this position has values for
145 Returns : list of Bio::Map::MapI unique ids
146 Args : none
147
148 =cut
149
150 sub known_maps{
151 my ($self) = @_;
152 $self->throw_not_implemented();
153 }
154
155 =head2 in_map
156
157 Title : in_map
158 Usage : if ( $position->in_map($map) ) {}
159 Function: Tests if a position has values in a specific map
160 Returns : boolean
161 Args : a map unique id OR Bio::Map::MapI
162
163
164 =cut
165
166 sub in_map{
167 my ($self,@args) = @_;
168 $self->throw_not_implemented();
169 }
170
171 =head2 get_position_object
172
173 Title : get_position_class
174 Usage : my $pos = $marker->get_position_object();
175 Function: To get an object of the default Position class
176 for this Marker. Subclasses should redefine this method.
177 The Position needs to be L<Bio::Map::PositionI>.
178 Returns : L<Bio::Map::PositionI>
179 Args : none
180
181 =cut
182
183 sub get_position_object {
184 my ($self) = @_;
185 $self->throw_not_implemented();
186 }
187
188
189 =head2 tuple
190
191 Title : tuple
192 Usage : ($me, $you) = $self->_tuple($compare)
193 Function: Utility method to extract numbers and test for missing values.
194 Makes writing subsequent tests easier.
195 Returns : a tuple of values or ranges
196 Args : Bio::Map::MappableI or Bio::Map::PositionI
197
198 =cut
199
200 sub tuple {
201 my ($self,@args) = @_;
202 $self->throw_not_implemented();
203 }
204
205
206 =head2 Bio::Map::MappableI methods
207
208 =cut
209
210
211 =head2 position
212
213 Title : position
214 Usage : my position_string = $position->position('mapname');
215 Function: Get/Set method for single value positions.
216 Gives a simplified interface when only one map and
217 one position per marker is used.
218 Returns : a position value
219 Args : optional:
220 Map - Reference to Bio::Map::MapI
221 String or Numeric coding for a position on a map
222
223 =cut
224
225 sub position{
226 my ($self,$map, $value) = @_;
227 $self->throw_not_implemented();
228 }
229
230 =head2 equals
231
232 Title : equals
233 Usage : if( $mappable->equals($mapable2)) ...
234 Function: Test if a position is equal to another position
235 Returns : boolean
236 Args : Bio::Map::MappableI
237
238 =head2 less_than
239
240 Title : less_than
241 Usage : if( $mappable->less_than($m2) ) ...
242 Function: Tests if a position is less than another position
243 Returns : boolean
244 Args : Bio::Map::MappableI
245
246 =head2 greater_than
247
248 Title : greater_than
249 Usage : if( $mappable->greater_than($m2) ) ...
250 Function: Tests if position is greater than another position
251 Returns : boolean
252 Args : Bio::Map::MappableI
253
254 =cut
255
256 1;