tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / PopGen / MarkerI.pm
blob986215488efaca2cfa86114193273588a39acf6e
1 # $Id $
3 # BioPerl module for Bio::PopGen::MarkerI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Jason Stajich <jason@bioperl.org>
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::PopGen::MarkerI - A Population Genetic conceptual marker
19 =head1 SYNOPSIS
21 # Get a Bio::PopGen::MarkerI somehow - like using a Bio::PopGen::Marker
23 my $name = $marker->name(); # marker name
24 my $description = $marker->description(); # description
25 my $type = $marker->type(); # coded type of the marker
26 my $unique_id = $marker->unique_id; # optional unique ID
28 my @alleles = $marker->get_Alleles(); # the known alleles
29 my %allele_freqs = $marker->get_Allele_Frequencies(); # keys are marker names
30 # vals are frequencies
31 # may change to handle multiple populations
34 =head1 DESCRIPTION
36 This is the basic interface for Markers which one can associate
37 alleles with for calculating Theta and Pi.
39 =head1 FEEDBACK
41 =head2 Mailing Lists
43 User feedback is an integral part of the evolution of this and other
44 Bioperl modules. Send your comments and suggestions preferably to
45 the Bioperl mailing list. Your participation is much appreciated.
47 bioperl-l@bioperl.org - General discussion
48 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
50 =head2 Support
52 Please direct usage questions or support issues to the mailing list:
54 I<bioperl-l@bioperl.org>
56 rather than to the module maintainer directly. Many experienced and
57 reponsive experts will be able look at the problem and quickly
58 address it. Please include a thorough description of the problem
59 with code and data examples if at all possible.
61 =head2 Reporting Bugs
63 Report bugs to the Bioperl bug tracking system to help us keep track
64 of the bugs and their resolution. Bug reports can be submitted via
65 email or the web:
67 http://bugzilla.open-bio.org/
69 =head1 AUTHOR - Jason Stajich
71 Email jason-at-bioperl.org
73 =head1 CONTRIBUTORS
75 Matthew Hahn, matthew.hahn-at-duke.edu
77 =head1 APPENDIX
79 The rest of the documentation details each of the object methods.
80 Internal methods are usually preceded with a _
82 =cut
85 # Let the code begin...
88 package Bio::PopGen::MarkerI;
89 use strict;
92 use base qw(Bio::Root::RootI Bio::AnnotatableI);
95 =head2 name
97 Title : name
98 Usage : my $name = $marker->name();
99 Function: Get the name of the marker
100 Returns : string representing the name of the marker
101 Args :
104 =cut
106 sub name{
107 $_[0]->throw_not_implemented();
111 =head2 description
113 Title : description
114 Usage : my $desc = $marker->description
115 Function: Get the marker description free text
116 Returns : string
117 Args : [optional] string
120 =cut
122 sub description{
123 $_[0]->throw_not_implemented();
126 =head2 type
128 Title : type
129 Usage : my $type = $marker->type;
130 Function: Get coded string for marker type
131 Returns : string
132 Args : [optional] string
135 =cut
137 sub type{
138 my ($self) = @_;
139 $self->throw_not_implemented();
143 =head2 unique_id
145 Title : unique_id
146 Usage : my $id = $marker->unique_id;
147 Function: Get the unique marker ID
148 Returns : unique ID string
149 Args : [optional ] string
152 =cut
154 sub unique_id{
155 my ($self) = @_;
156 $self->throw_not_implemented();
160 =head2 annotation
162 Title : annotation
163 Usage : $obj->annotation($seq_obj)
164 Function: retrieve the attached annotation object
165 Returns : Bio::AnnotationCollectionI or none;
167 See L<Bio::AnnotationCollectionI> and L<Bio::Annotation::Collection>
168 for more information. This method comes through extension from
169 L<Bio::AnnotatableI>.
172 =cut
175 sub annotation{
176 my ($self,@args) = @_;
177 $self->throw_not_implemented();
181 =head2 get_Alleles
183 Title : get_Alleles
184 Usage : my @alleles = $marker->get_Alleles();
185 Function: Get the available marker alleles if they are known and stored
186 Returns : Array of strings
187 Args : none
190 =cut
192 sub get_Alleles{
193 my ($self) = @_;
194 $self->throw_not_implemented();
198 =head2 get_Allele_Frequencies
200 Title : get_Allele_Frequencies
201 Usage : my %allele_freqs = $marker->get_Allele_Frequencies;
202 Function: Get the alleles and their frequency (set relative to
203 a given population - you may want to create different
204 markers with the same name for different populations
205 with this current implementation
206 Returns : Associative array (hash) where keys are the names of the alleles
207 Args : none
210 =cut
212 sub get_Allele_Frequencies{
213 my ($self) = @_;
214 $self->throw_not_implemented();