| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id $ |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# BioPerl module for Bio::PopGen::IndividualI |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# Please direct questions and support issues to |
|
6
|
|
|
|
|
|
|
# |
|
7
|
|
|
|
|
|
|
# Cared for by Jason Stajich |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# Copyright Jason Stajich |
|
10
|
|
|
|
|
|
|
# |
|
11
|
|
|
|
|
|
|
# You may distribute this module under the same terms as perl itself |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Bio::PopGen::IndividualI - An individual who has Genotype or Sequence Results |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Get a Bio::PopGen::IndividualI somehow |
|
22
|
|
|
|
|
|
|
# test if it has alleles/genotypes for a given marker |
|
23
|
|
|
|
|
|
|
if( $ind->has_marker($markername) ) { |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
# get the unique id |
|
26
|
|
|
|
|
|
|
print $ind->unique_id, "\n"; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# get the number of results (genotypes) |
|
29
|
|
|
|
|
|
|
print $ind->num_results; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Describe the interface here |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 FEEDBACK |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 Mailing Lists |
|
38
|
|
|
|
|
|
|
|
|
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. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
bioperl-l@bioperl.org - General discussion |
|
44
|
|
|
|
|
|
|
http://bioperl.org/wiki/Mailing_lists - About the mailing lists |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 Support |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Please direct usage questions or support issues to the mailing list: |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
I |
|
51
|
|
|
|
|
|
|
|
|
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. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 Reporting Bugs |
|
58
|
|
|
|
|
|
|
|
|
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: |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
https://github.com/bioperl/bioperl-live/issues |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR - Jason Stajich |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Email jason-at-bioperl.org |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 APPENDIX |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The rest of the documentation details each of the object methods. |
|
72
|
|
|
|
|
|
|
Internal methods are usually preceded with a _ |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# Let the code begin... |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
package Bio::PopGen::IndividualI; |
|
81
|
4
|
|
|
4
|
|
19
|
use strict; |
|
|
4
|
|
|
|
|
5
|
|
|
|
4
|
|
|
|
|
97
|
|
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
|
84
|
4
|
|
|
4
|
|
12
|
use base qw(Bio::Root::RootI); |
|
|
4
|
|
|
|
|
102
|
|
|
|
4
|
|
|
|
|
703
|
|
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 unique_id |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Title : unique_id |
|
90
|
|
|
|
|
|
|
Usage : my $id = $individual->unique_id |
|
91
|
|
|
|
|
|
|
Function: Unique Identifier |
|
92
|
|
|
|
|
|
|
Returns : string representing unique identifier |
|
93
|
|
|
|
|
|
|
Args : string |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub unique_id{ |
|
99
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
|
100
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
|
101
|
|
|
|
|
|
|
} |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 num_genotypes |
|
105
|
|
|
|
|
|
|
|
|
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 |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub num_genotypes { |
|
115
|
0
|
|
|
0
|
1
|
|
shift->throw_not_implemented; |
|
116
|
|
|
|
|
|
|
} |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub num_of_results{ |
|
119
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
120
|
0
|
|
|
|
|
|
$self->deprecated("num_of_results is deprecated, use num_genotypes instead"); |
|
121
|
0
|
|
|
|
|
|
$self->num_genotypes; |
|
122
|
|
|
|
|
|
|
} |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 annotation |
|
125
|
|
|
|
|
|
|
|
|
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 |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=cut |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub annotation{ |
|
135
|
0
|
|
|
0
|
1
|
|
my ($self, $arg) = @_; |
|
136
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
|
137
|
|
|
|
|
|
|
} |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 get_Genotypes |
|
140
|
|
|
|
|
|
|
|
|
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) |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=cut |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
sub get_Genotypes{ |
|
152
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
|
153
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
|
154
|
|
|
|
|
|
|
} |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head2 has_Marker |
|
157
|
|
|
|
|
|
|
|
|
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 |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=cut |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
sub has_Marker{ |
|
169
|
0
|
|
|
0
|
1
|
|
my ($self,$name) = @_; |
|
170
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
|
171
|
|
|
|
|
|
|
} |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 get_marker_names |
|
174
|
|
|
|
|
|
|
|
|
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 |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
sub get_marker_names{ |
|
185
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
|
186
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
|
187
|
|
|
|
|
|
|
} |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
1; |