line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# BioPerl module for Bio::PopGen::MarkerI |
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::MarkerI - A Population Genetic conceptual marker |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Get a Bio::PopGen::MarkerI somehow - like using a Bio::PopGen::Marker |
22
|
|
|
|
|
|
|
|
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 |
27
|
|
|
|
|
|
|
|
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 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
This is the basic interface for Markers which one can associate |
37
|
|
|
|
|
|
|
alleles with for calculating Theta and Pi. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 FEEDBACK |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 Mailing Lists |
42
|
|
|
|
|
|
|
|
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. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
bioperl-l@bioperl.org - General discussion |
48
|
|
|
|
|
|
|
http://bioperl.org/wiki/Mailing_lists - About the mailing lists |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 Support |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Please direct usage questions or support issues to the mailing list: |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
I |
55
|
|
|
|
|
|
|
|
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. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 Reporting Bugs |
62
|
|
|
|
|
|
|
|
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: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
https://github.com/bioperl/bioperl-live/issues |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR - Jason Stajich |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Email jason-at-bioperl.org |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 CONTRIBUTORS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Matthew Hahn, matthew.hahn-at-duke.edu |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 APPENDIX |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The rest of the documentation details each of the object methods. |
80
|
|
|
|
|
|
|
Internal methods are usually preceded with a _ |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
# Let the code begin... |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
package Bio::PopGen::MarkerI; |
89
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
94
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
3
|
|
|
3
|
|
15
|
use base qw(Bio::Root::RootI Bio::AnnotatableI); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
717
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 name |
96
|
|
|
|
|
|
|
|
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 : |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub name{ |
107
|
0
|
|
|
0
|
1
|
|
$_[0]->throw_not_implemented(); |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 description |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Title : description |
114
|
|
|
|
|
|
|
Usage : my $desc = $marker->description |
115
|
|
|
|
|
|
|
Function: Get the marker description free text |
116
|
|
|
|
|
|
|
Returns : string |
117
|
|
|
|
|
|
|
Args : [optional] string |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub description{ |
123
|
0
|
|
|
0
|
1
|
|
$_[0]->throw_not_implemented(); |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 type |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Title : type |
129
|
|
|
|
|
|
|
Usage : my $type = $marker->type; |
130
|
|
|
|
|
|
|
Function: Get coded string for marker type |
131
|
|
|
|
|
|
|
Returns : string |
132
|
|
|
|
|
|
|
Args : [optional] string |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=cut |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub type{ |
138
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
139
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 unique_id |
144
|
|
|
|
|
|
|
|
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 |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=cut |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
sub unique_id{ |
155
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
156
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head2 annotation |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Title : annotation |
163
|
|
|
|
|
|
|
Usage : $obj->annotation($seq_obj) |
164
|
|
|
|
|
|
|
Function: retrieve the attached annotation object |
165
|
|
|
|
|
|
|
Returns : Bio::AnnotationCollectionI or none; |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
See L and L |
168
|
|
|
|
|
|
|
for more information. This method comes through extension from |
169
|
|
|
|
|
|
|
L. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=cut |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
sub annotation{ |
176
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
177
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 get_Alleles |
182
|
|
|
|
|
|
|
|
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 |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=cut |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub get_Alleles{ |
193
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
194
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
195
|
|
|
|
|
|
|
} |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=head2 get_Allele_Frequencies |
199
|
|
|
|
|
|
|
|
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 |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=cut |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub get_Allele_Frequencies{ |
213
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
214
|
0
|
|
|
|
|
|
$self->throw_not_implemented(); |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
1; |