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
17 Bio::PopGen::MarkerI - A Population Genetic conceptual marker
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
36 This is the basic interface for Markers which one can associate
37 alleles with for calculating Theta and Pi.
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
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.
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
67 https://redmine.open-bio.org/projects/bioperl/
69 =head1 AUTHOR - Jason Stajich
71 Email jason-at-bioperl.org
75 Matthew Hahn, matthew.hahn-at-duke.edu
79 The rest of the documentation details each of the object methods.
80 Internal methods are usually preceded with a _
85 # Let the code begin...
88 package Bio
::PopGen
::MarkerI
;
92 use base
qw(Bio::Root::RootI Bio::AnnotatableI);
98 Usage : my $name = $marker->name();
99 Function: Get the name of the marker
100 Returns : string representing the name of the marker
107 $_[0]->throw_not_implemented();
114 Usage : my $desc = $marker->description
115 Function: Get the marker description free text
117 Args : [optional] string
123 $_[0]->throw_not_implemented();
129 Usage : my $type = $marker->type;
130 Function: Get coded string for marker type
132 Args : [optional] string
139 $self->throw_not_implemented();
146 Usage : my $id = $marker->unique_id;
147 Function: Get the unique marker ID
148 Returns : unique ID string
149 Args : [optional ] string
156 $self->throw_not_implemented();
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>.
176 my ($self,@args) = @_;
177 $self->throw_not_implemented();
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
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
212 sub get_Allele_Frequencies
{
214 $self->throw_not_implemented();