2 # BioPerl module for Bio::Map::RelativeI
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::RelativeI - Interface for describing what a Position's coordiantes are
21 # do not use this module directly
22 # See Bio::Map::Relative for an example of
27 A Relative object is used to describe what the co-ordinates (numerical(),
28 start(), end()) of a Position are relative to. By default they are
29 implicitly assumed to be relative to the start of the map the Position is on.
30 But setting the relative() of a Position to one of these objects lets us
37 User feedback is an integral part of the evolution of this and other
38 Bioperl modules. Send your comments and suggestions preferably to
39 the Bioperl mailing list. Your participation is much appreciated.
41 bioperl-l@bioperl.org - General discussion
42 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
46 Please direct usage questions or support issues to the mailing list:
48 I<bioperl-l@bioperl.org>
50 rather than to the module maintainer directly. Many experienced and
51 reponsive experts will be able look at the problem and quickly
52 address it. Please include a thorough description of the problem
53 with code and data examples if at all possible.
57 Report bugs to the Bioperl bug tracking system to help us keep track
58 of the bugs and their resolution. Bug reports can be submitted via the
61 https://github.com/bioperl/bioperl-live/issues
63 =head1 AUTHOR - Sendu Bala
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
74 # Let the code begin...
76 package Bio
::Map
::RelativeI
;
79 use base
qw(Bio::Root::RootI);
81 =head2 absolute_conversion
83 Title : absolute_conversion
84 Usage : my $absolute_coord = $relative->absolute_conversion($pos);
85 Function: Convert the start co-ordinate of the supplied position into a number
86 relative to the start of its map.
87 Returns : scalar number
88 Args : Bio::Map::PositionI object
92 sub absolute_conversion
{
94 $self->throw_not_implemented();
100 Usage : my $type = $relative->type();
101 Function: Get the type of thing we are relative to. The types correspond
102 to a method name, so the value of what we are relative to can
103 subsequently be found by $value = $relative->$type;
105 Note that type is set by the last method that was set, or during
108 Returns : the string 'map', 'element' or 'position', or undef
115 $self->throw_not_implemented();
121 Usage : my $int = $relative->map();
122 $relative->map($int);
123 Function: Get/set the distance from the start of the map that the Position's
124 co-ordiantes are relative to.
126 Args : none to get, OR
127 int to set; a value of 0 means relative to the start of the map.
133 $self->throw_not_implemented();
139 Usage : my $element = $relative->element();
140 $relative->element($element);
141 Function: Get/set the map element (Mappable) the Position is relative to. If
142 the Mappable has more than one Position on the Position's map, we
143 will be relative to the Mappable's first Position on the map.
144 Returns : Bio::Map::MappableI
145 Args : none got get, OR
146 Bio::Map::MappableI to set
152 $self->throw_not_implemented();
158 Usage : my $position = $relative->position();
159 $relative->position($position);
160 Function: Get/set the Position your Position is relative to. Your Position
161 will be made relative to the start of this supplied Position. It
162 makes no difference what maps the Positions are on.
163 Returns : Bio::Map::PositionI
164 Args : none got get, OR
165 Bio::Map::PositionI to set
171 $self->throw_not_implemented();
177 Usage : my $description = $relative->description();
178 $relative->description($description);
179 Function: Get/set a textual description of what this relative describes.
181 Args : none to get, OR
188 $self->throw_not_implemented();