nexml.t: Added a missing XML::Twig requirement.
[bioperl-live.git] / Bio / PopGen / IndividualI.pm
blobcd774828df38d0186b7beaf5fc6e0ee63d9da8da
1 # $Id $
3 # BioPerl module for Bio::PopGen::IndividualI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Jason Stajich <jason-at-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::IndividualI - An individual who has Genotype or Sequence Results
19 =head1 SYNOPSIS
21 # Get a Bio::PopGen::IndividualI somehow
22 # test if it has alleles/genotypes for a given marker
23 if( $ind->has_marker($markername) ) {
25 # get the unique id
26 print $ind->unique_id, "\n";
28 # get the number of results (genotypes)
29 print $ind->num_results;
31 =head1 DESCRIPTION
33 Describe the interface here
35 =head1 FEEDBACK
37 =head2 Mailing Lists
39 User feedback is an integral part of the evolution of this and other
40 Bioperl modules. Send your comments and suggestions preferably to
41 the Bioperl mailing list. Your participation is much appreciated.
43 bioperl-l@bioperl.org - General discussion
44 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
46 =head2 Support
48 Please direct usage questions or support issues to the mailing list:
50 I<bioperl-l@bioperl.org>
52 rather than to the module maintainer directly. Many experienced and
53 reponsive experts will be able look at the problem and quickly
54 address it. Please include a thorough description of the problem
55 with code and data examples if at all possible.
57 =head2 Reporting Bugs
59 Report bugs to the Bioperl bug tracking system to help us keep track
60 of the bugs and their resolution. Bug reports can be submitted via
61 email or the web:
63 https://github.com/bioperl/bioperl-live/issues
65 =head1 AUTHOR - Jason Stajich
67 Email jason-at-bioperl.org
69 =head1 APPENDIX
71 The rest of the documentation details each of the object methods.
72 Internal methods are usually preceded with a _
74 =cut
77 # Let the code begin...
80 package Bio::PopGen::IndividualI;
81 use strict;
84 use base qw(Bio::Root::RootI);
87 =head2 unique_id
89 Title : unique_id
90 Usage : my $id = $individual->unique_id
91 Function: Unique Identifier
92 Returns : string representing unique identifier
93 Args : string
96 =cut
98 sub unique_id{
99 my ($self) = @_;
100 $self->throw_not_implemented();
104 =head2 num_genotypes
106 Title : num_genotypes
107 Usage : my $count = $person->num_results;
108 Function: returns the count of the number of Results for a person
109 Returns : integer
110 Args : none
112 =cut
114 sub num_genotypes {
115 shift->throw_not_implemented;
118 sub num_of_results{
119 my $self = shift;
120 $self->deprecated("num_of_results is deprecated, use num_genotypes instead");
121 $self->num_genotypes;
124 =head2 annotation
126 Title : annotation
127 Usage : my $annotation_collection = $ind->annotation;
128 Function: Get/set a Bio::AnnotationCollectionI for this individual
129 Returns : Bio::AnnotationCollectionI object
130 Args : [optional set] Bio::AnnotationCollectionI object
132 =cut
134 sub annotation{
135 my ($self, $arg) = @_;
136 $self->throw_not_implemented();
139 =head2 get_Genotypes
141 Title : get_Genotypes
142 Usage : my @genotypes = $ind->get_Genotypes(-marker => $markername);
143 Function: Get the genotypes for an individual, based on a criteria
144 Returns : Array of genotypes
145 Args : either none (return all genotypes) or
146 -marker => name of marker to return (exact match, case matters)
149 =cut
151 sub get_Genotypes{
152 my ($self) = @_;
153 $self->throw_not_implemented();
156 =head2 has_Marker
158 Title : has_Marker
159 Usage : if( $ind->has_Marker($name) ) {}
160 Function: Boolean test to see if an Individual has a genotype
161 for a specific marker
162 Returns : Boolean (true or false)
163 Args : String representing a marker name
166 =cut
168 sub has_Marker{
169 my ($self,$name) = @_;
170 $self->throw_not_implemented();
173 =head2 get_marker_names
175 Title : get_marker_names
176 Usage : my @names = $individual->get_marker_names;
177 Function: Returns the list of known marker names
178 Returns : List of strings
179 Args : none
182 =cut
184 sub get_marker_names{
185 my ($self) = @_;
186 $self->throw_not_implemented();