3 # BioPerl module for Bio::Map::RelativeI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Sendu Bala <bix@sendu.me.uk>
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
17 Bio::Map::RelativeI - Interface for describing what a Position's coordiantes are
22 # do not use this module directly
23 # See Bio::Map::Relative for an example of
28 A Relative object is used to describe what the co-ordinates (numerical(),
29 start(), end()) of a Position are relative to. By default they are
30 implicitly assumed to be relative to the start of the map the Position is on.
31 But setting the relative() of a Position to one of these objects lets us
38 User feedback is an integral part of the evolution of this and other
39 Bioperl modules. Send your comments and suggestions preferably to
40 the Bioperl mailing list. Your participation is much appreciated.
42 bioperl-l@bioperl.org - General discussion
43 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
47 Please direct usage questions or support issues to the mailing list:
49 I<bioperl-l@bioperl.org>
51 rather than to the module maintainer directly. Many experienced and
52 reponsive experts will be able look at the problem and quickly
53 address it. Please include a thorough description of the problem
54 with code and data examples if at all possible.
58 Report bugs to the Bioperl bug tracking system to help us keep track
59 of the bugs and their resolution. Bug reports can be submitted via the
62 http://bugzilla.open-bio.org/
64 =head1 AUTHOR - Sendu Bala
70 The rest of the documentation details each of the object methods.
71 Internal methods are usually preceded with a _
75 # Let the code begin...
77 package Bio
::Map
::RelativeI
;
80 use base
qw(Bio::Root::RootI);
82 =head2 absolute_conversion
84 Title : absolute_conversion
85 Usage : my $absolute_coord = $relative->absolute_conversion($pos);
86 Function: Convert the start co-ordinate of the supplied position into a number
87 relative to the start of its map.
88 Returns : scalar number
89 Args : Bio::Map::PositionI object
93 sub absolute_conversion
{
95 $self->throw_not_implemented();
101 Usage : my $type = $relative->type();
102 Function: Get the type of thing we are relative to. The types correspond
103 to a method name, so the value of what we are relative to can
104 subsequently be found by $value = $relative->$type;
106 Note that type is set by the last method that was set, or during
109 Returns : the string 'map', 'element' or 'position', or undef
116 $self->throw_not_implemented();
122 Usage : my $int = $relative->map();
123 $relative->map($int);
124 Function: Get/set the distance from the start of the map that the Position's
125 co-ordiantes are relative to.
127 Args : none to get, OR
128 int to set; a value of 0 means relative to the start of the map.
134 $self->throw_not_implemented();
140 Usage : my $element = $relative->element();
141 $relative->element($element);
142 Function: Get/set the map element (Mappable) the Position is relative to. If
143 the Mappable has more than one Position on the Position's map, we
144 will be relative to the Mappable's first Position on the map.
145 Returns : Bio::Map::MappableI
146 Args : none got get, OR
147 Bio::Map::MappableI to set
153 $self->throw_not_implemented();
159 Usage : my $position = $relative->position();
160 $relative->position($position);
161 Function: Get/set the Position your Position is relative to. Your Position
162 will be made relative to the start of this supplied Position. It
163 makes no difference what maps the Positions are on.
164 Returns : Bio::Map::PositionI
165 Args : none got get, OR
166 Bio::Map::PositionI to set
172 $self->throw_not_implemented();
178 Usage : my $description = $relative->description();
179 $relative->description($description);
180 Function: Get/set a textual description of what this relative describes.
182 Args : none to get, OR
189 $self->throw_not_implemented();