sync w/ main trunk
[bioperl-live.git] / Bio / Map / MarkerI.pm
blob4c86a494eb6c229fc61163a5c82e3a373b284223
1 # $Id$
3 # BioPerl module for Bio::Map::MarkerI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Sendu Bala <bix@sendu.me.uk>
9 # Copyright Jason Stajich
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::Map::MarkerI - Interface for basic marker functionality
19 =head1 SYNOPSIS
21 # do not use this module directly
22 # See Bio::Map::Marker for an example of
23 # implementation.
25 =head1 DESCRIPTION
27 A Marker is a Bio::Map::Mappable with some properties particular to markers.
28 It also offers a number of convienience methods to make dealing with map
29 elements easier.
31 =head1 FEEDBACK
33 =head2 Mailing Lists
35 User feedback is an integral part of the evolution of this and other
36 Bioperl modules. Send your comments and suggestions preferably to
37 the Bioperl mailing list. Your participation is much appreciated.
39 bioperl-l@bioperl.org - General discussion
40 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
42 =head2 Support
44 Please direct usage questions or support issues to the mailing list:
46 L<bioperl-l@bioperl.org>
48 rather than to the module maintainer directly. Many experienced and
49 reponsive experts will be able look at the problem and quickly
50 address it. Please include a thorough description of the problem
51 with code and data examples if at all possible.
53 =head2 Reporting Bugs
55 Report bugs to the Bioperl bug tracking system to help us keep track
56 of the bugs and their resolution. Bug reports can be submitted via the
57 web:
59 http://bugzilla.open-bio.org/
61 =head1 AUTHOR - Jason Stajich
63 Email jason@bioperl.org
65 =head1 CONTRIBUTORS
67 Heikki Lehvaslaiho heikki-at-bioperl-dot-org
68 Lincoln Stein lstein@cshl.org
69 Jason Stajich jason@bioperl.org
70 Chad Matsalla bioinformatics1@dieselwurks.com
71 Sendu Bala bix@sendu.me.uk
73 =head1 APPENDIX
75 The rest of the documentation details each of the object methods.
76 Internal methods are usually preceded with a _
78 =cut
80 package Bio::Map::MarkerI;
81 use strict;
83 use base qw(Bio::Map::MappableI);
85 =head2 get_position_object
87 Title : get_position_class
88 Usage : my $position = $marker->get_position_object();
89 Function: To get an object of the default Position class
90 for this Marker. Subclasses should redefine this method.
91 The Position returned needs to be a L<Bio::Map::PositionI> with
92 -element set to self.
93 Returns : L<Bio::Map::PositionI>
94 Args : none for an 'empty' PositionI object, optionally
95 Bio::Map::MapI and value string to set the Position's -map and -value
96 attributes.
98 =cut
100 sub get_position_object {
101 my $self = shift;
102 $self->throw_not_implemented();
105 =head2 position
107 Title : position
108 Usage : my $position = $mappable->position();
109 $mappable->position($position);
110 Function: Get/Set the Position of this Marker (where it is on which map),
111 purging all other positions before setting.
112 Returns : L<Bio::Map::PositionI>
113 Args : Bio::Map::PositionI
115 Bio::Map::MapI AND
116 scalar
118 scalar, but only if the marker has a default map
120 =cut
122 sub position {
123 my $self = shift;
124 $self->throw_not_implemented();
127 =head2 positions
129 Title : positions
130 Usage : $marker->positions([$pos1, $pos2, $pos3]);
131 Function: Add multiple Bio::Map::PositionI to this marker
132 Returns : n/a
133 Args : array ref of $map/value tuples or array ref of Bio::Map::PositionI
135 =cut
137 sub positions {
138 my $self = shift;
139 $self->throw_not_implemented();
142 =head2 default_map
144 Title : default_map
145 Usage : my $map = $marker->default_map();
146 Function: Get/Set the default map for the marker.
147 Returns : L<Bio::Map::MapI>
148 Args : [optional] new L<Bio::Map::MapI>
150 =cut
152 sub default_map {
153 my $self = shift;
154 $self->throw_not_implemented();
157 =head2 in_map
159 Title : in_map
160 Usage : if ( $marker->in_map($map) ) {}
161 Function: Tests if this marker is found on a specific map
162 Returns : boolean
163 Args : a map unique id OR Bio::Map::MapI
165 =cut