bug 2549; fixed small bug in Bio::Taxon which doesn't catch -common_name
[bioperl-live.git] / Bio / PopGen / IndividualI.pm
blobbee96c81ad1270ef2c7a88d8c9c73ce07155f98b
1 # $Id $
3 # BioPerl module for Bio::PopGen::IndividualI
5 # Cared for by Jason Stajich <jason-at-bioperl.org>
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::PopGen::IndividualI - An individual who has Genotype or Sequence Results
17 =head1 SYNOPSIS
19 # Get a Bio::PopGen::IndividualI somehow
20 # test if it has alleles/genotypes for a given marker
21 if( $ind->has_marker($markername) ) {
23 # get the unique id
24 print $ind->unique_id, "\n";
26 # get the number of results (genotypes)
27 print $ind->num_results;
29 =head1 DESCRIPTION
31 Describe the interface here
33 =head1 FEEDBACK
35 =head2 Mailing Lists
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
44 =head2 Reporting Bugs
46 Report bugs to the Bioperl bug tracking system to help us keep track
47 of the bugs and their resolution. Bug reports can be submitted via
48 email or the web:
50 http://bugzilla.open-bio.org/
52 =head1 AUTHOR - Jason Stajich
54 Email jason-at-bioperl.org
56 =head1 APPENDIX
58 The rest of the documentation details each of the object methods.
59 Internal methods are usually preceded with a _
61 =cut
64 # Let the code begin...
67 package Bio::PopGen::IndividualI;
68 use strict;
71 use base qw(Bio::Root::RootI);
74 =head2 unique_id
76 Title : unique_id
77 Usage : my $id = $individual->unique_id
78 Function: Unique Identifier
79 Returns : string representing unique identifier
80 Args : string
83 =cut
85 sub unique_id{
86 my ($self) = @_;
87 $self->throw_not_implemented();
91 =head2 num_genotypes
93 Title : num_genotypes
94 Usage : my $count = $person->num_results;
95 Function: returns the count of the number of Results for a person
96 Returns : integer
97 Args : none
99 =cut
101 sub num_genotypes {
102 shift->throw_not_implemented;
105 sub num_of_results{
106 my $self = shift;
107 $self->deprecated("num_of_results is deprecated, use num_genotypes instead");
108 $self->num_genotypes;
111 =head2 get_Genotypes
113 Title : get_Genotypes
114 Usage : my @genotypes = $ind->get_Genotypes(-marker => $markername);
115 Function: Get the genotypes for an individual, based on a criteria
116 Returns : Array of genotypes
117 Args : either none (return all genotypes) or
118 -marker => name of marker to return (exact match, case matters)
121 =cut
123 sub get_Genotypes{
124 my ($self) = @_;
125 $self->throw_not_implemented();
128 =head2 has_Marker
130 Title : has_Marker
131 Usage : if( $ind->has_Marker($name) ) {}
132 Function: Boolean test to see if an Individual has a genotype
133 for a specific marker
134 Returns : Boolean (true or false)
135 Args : String representing a marker name
138 =cut
140 sub has_Marker{
141 my ($self,$name) = @_;
142 $self->throw_not_implemented();
145 =head2 get_marker_names
147 Title : get_marker_names
148 Usage : my @names = $individual->get_marker_names;
149 Function: Returns the list of known marker names
150 Returns : List of strings
151 Args : none
154 =cut
156 sub get_marker_names{
157 my ($self) = @_;
158 $self->throw_not_implemented();