2 # BioPerl module for Bio::Map::PositionHandlerI
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::Map::PositionHandlerI - A Position Handler Interface
20 # do not use this module directly
21 # See Bio::Map::PositionHandler for an example of
26 This interface describes the basic methods required for Position Handlers. A
27 Position Handler copes with the coordination of different Bio::Map::EntityI
28 objects, adding and removing them from each other and knowning who belongs to
29 who. These relationships between objects are based around shared Positions,
30 hence PositionHandler.
36 User feedback is an integral part of the evolution of this and other
37 Bioperl modules. Send your comments and suggestions preferably to
38 the Bioperl mailing list. Your participation is much appreciated.
40 bioperl-l@bioperl.org - General discussion
41 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
45 Please direct usage questions or support issues to the mailing list:
47 I<bioperl-l@bioperl.org>
49 rather than to the module maintainer directly. Many experienced and
50 reponsive experts will be able look at the problem and quickly
51 address it. Please include a thorough description of the problem
52 with code and data examples if at all possible.
56 Report bugs to the Bioperl bug tracking system to help us keep track
57 of the bugs and their resolution. Bug reports can be submitted via the
60 https://github.com/bioperl/bioperl-live/issues
62 =head1 AUTHOR - Sendu Bala
68 The rest of the documentation details each of the object methods.
69 Internal methods are usually preceded with a _
73 # Let the code begin...
75 package Bio
::Map
::PositionHandlerI
;
78 use base
qw(Bio::Root::RootI);
80 =head2 General methods
87 Usage : $position_handler->register();
88 Function: Ask this Position Handler to look after your entity relationships.
96 $self->throw_not_implemented();
102 Usage : my $index = $position_handler->index();
103 Function: Get the unique registry index for yourself, generated during the
104 resistration process.
112 $self->throw_not_implemented();
118 Usage : my $entity = $position_handler->get_entity($index);
119 Function: Get the entity that corresponds to the supplied registry index.
120 Returns : Bio::Map::EntityI object
127 $self->throw_not_implemented();
130 =head2 Methods for Bio::Map::PositionI objects
137 Usage : my $map = $position_handler->map();
138 $position_handler->map($map);
139 Function: Get/Set the map you are on. You must be a Position.
140 Returns : L<Bio::Map::MapI>
141 Args : none to get, OR
142 new L<Bio::Map::MapI> to set
148 $self->throw_not_implemented();
154 Usage : my $element = $position_handler->element();
155 $position_handler->element($element);
156 Function: Get/Set the map element you are for. You must be a Position.
157 Returns : L<Bio::Map::MappableI>
158 Args : none to get, OR
159 new L<Bio::Map::MappableI> to set
165 $self->throw_not_implemented();
168 =head2 Methods for all other Bio::Map::EntityI objects
174 Title : add_positions
175 Usage : $position_handler->add_positions($pos1, $pos2, ...);
176 Function: Add some positions to yourself. You can't be a position.
178 Args : Array of Bio::Map::PositionI objects
184 $self->throw_not_implemented();
189 Title : get_positions
190 Usage : my @positions = $position_handler->get_positions();
191 Function: Get all your positions. You can't be a Position.
192 Returns : Array of Bio::Map::PositionI objects
193 Args : none for all, OR
194 Bio::Map::EntityI object to limit the Positions to those that
195 are shared by you and this other entity.
201 $self->throw_not_implemented();
204 =head2 purge_positions
206 Title : purge_positions
207 Usage : $position_handler->purge_positions();
208 Function: Remove all positions from yourself. You can't be a Position.
210 Args : none to remove all, OR
211 Bio::Map::PositionI object to remove only that entity, OR
212 Bio::Map::EntityI object to limit the removal to those Positions that
213 are shared by you and this other entity.
217 sub purge_positions
{
219 $self->throw_not_implemented();
222 =head2 get_other_entities
224 Title : get_other_entities
225 Usage : my @entities = $position_handler->get_other_entities();
226 Function: Get all the entities that share your Positions. You can't be a
228 Returns : Array of Bio::Map::EntityI objects
233 sub get_other_entities
{
235 $self->throw_not_implemented();