3 # BioPerl module for Bio::Map::RelativeI
5 # Cared for by Sendu Bala <bix@sendu.me.uk>
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::Map::RelativeI - Interface for describing what a Position's coordiantes are
20 # do not use this module directly
21 # See Bio::Map::Relative for an example of
26 A Relative object is used to describe what the co-ordinates (numerical(),
27 start(), end()) of a Position are relative to. By default they are
28 implicitly assumed to be relative to the start of the map the Position is on.
29 But setting the relative() of a Position to one of these objects lets us
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 Report bugs to the Bioperl bug tracking system to help us keep track
46 of the bugs and their resolution. Bug reports can be submitted via the
49 http://bugzilla.open-bio.org/
51 =head1 AUTHOR - Sendu Bala
57 The rest of the documentation details each of the object methods.
58 Internal methods are usually preceded with a _
62 # Let the code begin...
64 package Bio
::Map
::RelativeI
;
67 use base
qw(Bio::Root::RootI);
69 =head2 absolute_conversion
71 Title : absolute_conversion
72 Usage : my $absolute_coord = $relative->absolute_conversion($pos);
73 Function: Convert the start co-ordinate of the supplied position into a number
74 relative to the start of its map.
75 Returns : scalar number
76 Args : Bio::Map::PositionI object
80 sub absolute_conversion
{
82 $self->throw_not_implemented();
88 Usage : my $type = $relative->type();
89 Function: Get the type of thing we are relative to. The types correspond
90 to a method name, so the value of what we are relative to can
91 subsequently be found by $value = $relative->$type;
93 Note that type is set by the last method that was set, or during
96 Returns : the string 'map', 'element' or 'position', or undef
103 $self->throw_not_implemented();
109 Usage : my $int = $relative->map();
110 $relative->map($int);
111 Function: Get/set the distance from the start of the map that the Position's
112 co-ordiantes are relative to.
114 Args : none to get, OR
115 int to set; a value of 0 means relative to the start of the map.
121 $self->throw_not_implemented();
127 Usage : my $element = $relative->element();
128 $relative->element($element);
129 Function: Get/set the map element (Mappable) the Position is relative to. If
130 the Mappable has more than one Position on the Position's map, we
131 will be relative to the Mappable's first Position on the map.
132 Returns : Bio::Map::MappableI
133 Args : none got get, OR
134 Bio::Map::MappableI to set
140 $self->throw_not_implemented();
146 Usage : my $position = $relative->position();
147 $relative->position($position);
148 Function: Get/set the Position your Position is relative to. Your Position
149 will be made relative to the start of this supplied Position. It
150 makes no difference what maps the Positions are on.
151 Returns : Bio::Map::PositionI
152 Args : none got get, OR
153 Bio::Map::PositionI to set
159 $self->throw_not_implemented();
165 Usage : my $description = $relative->description();
166 $relative->description($description);
167 Function: Get/set a textual description of what this relative describes.
169 Args : none to get, OR
176 $self->throw_not_implemented();