bug 2549; fixed small bug in Bio::Taxon which doesn't catch -common_name
[bioperl-live.git] / Bio / Map / MarkerI.pm
blob5fdbe0c46d03eb4434c5d87f22c23746addc21d3
1 # $Id$
3 # BioPerl module for Bio::Map::MarkerI
5 # Cared for by Sendu Bala <bix@sendu.me.uk>
7 # Copyright Jason Stajich
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::Map::MarkerI - Interface for basic marker functionality
17 =head1 SYNOPSIS
19 # do not use this module directly
20 # See Bio::Map::Marker for an example of
21 # implementation.
23 =head1 DESCRIPTION
25 A Marker is a Bio::Map::Mappable with some properties particular to markers.
26 It also offers a number of convienience methods to make dealing with map
27 elements easier.
29 =head1 FEEDBACK
31 =head2 Mailing Lists
33 User feedback is an integral part of the evolution of this and other
34 Bioperl modules. Send your comments and suggestions preferably to
35 the Bioperl mailing list. Your participation is much appreciated.
37 bioperl-l@bioperl.org - General discussion
38 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
40 =head2 Reporting Bugs
42 Report bugs to the Bioperl bug tracking system to help us keep track
43 of the bugs and their resolution. Bug reports can be submitted via the
44 web:
46 http://bugzilla.open-bio.org/
48 =head1 AUTHOR - Jason Stajich
50 Email jason@bioperl.org
52 =head1 CONTRIBUTORS
54 Heikki Lehvaslaiho heikki-at-bioperl-dot-org
55 Lincoln Stein lstein@cshl.org
56 Jason Stajich jason@bioperl.org
57 Chad Matsalla bioinformatics1@dieselwurks.com
58 Sendu Bala bix@sendu.me.uk
60 =head1 APPENDIX
62 The rest of the documentation details each of the object methods.
63 Internal methods are usually preceded with a _
65 =cut
67 package Bio::Map::MarkerI;
68 use strict;
70 use base qw(Bio::Map::MappableI);
72 =head2 get_position_object
74 Title : get_position_class
75 Usage : my $position = $marker->get_position_object();
76 Function: To get an object of the default Position class
77 for this Marker. Subclasses should redefine this method.
78 The Position returned needs to be a L<Bio::Map::PositionI> with
79 -element set to self.
80 Returns : L<Bio::Map::PositionI>
81 Args : none for an 'empty' PositionI object, optionally
82 Bio::Map::MapI and value string to set the Position's -map and -value
83 attributes.
85 =cut
87 sub get_position_object {
88 my $self = shift;
89 $self->throw_not_implemented();
92 =head2 position
94 Title : position
95 Usage : my $position = $mappable->position();
96 $mappable->position($position);
97 Function: Get/Set the Position of this Marker (where it is on which map),
98 purging all other positions before setting.
99 Returns : L<Bio::Map::PositionI>
100 Args : Bio::Map::PositionI
102 Bio::Map::MapI AND
103 scalar
105 scalar, but only if the marker has a default map
107 =cut
109 sub position {
110 my $self = shift;
111 $self->throw_not_implemented();
114 =head2 positions
116 Title : positions
117 Usage : $marker->positions([$pos1, $pos2, $pos3]);
118 Function: Add multiple Bio::Map::PositionI to this marker
119 Returns : n/a
120 Args : array ref of $map/value tuples or array ref of Bio::Map::PositionI
122 =cut
124 sub positions {
125 my $self = shift;
126 $self->throw_not_implemented();
129 =head2 default_map
131 Title : default_map
132 Usage : my $map = $marker->default_map();
133 Function: Get/Set the default map for the marker.
134 Returns : L<Bio::Map::MapI>
135 Args : [optional] new L<Bio::Map::MapI>
137 =cut
139 sub default_map {
140 my $self = shift;
141 $self->throw_not_implemented();
144 =head2 in_map
146 Title : in_map
147 Usage : if ( $marker->in_map($map) ) {}
148 Function: Tests if this marker is found on a specific map
149 Returns : boolean
150 Args : a map unique id OR Bio::Map::MapI
152 =cut