line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Phylo::Matrices::Matrix; |
2
|
13
|
|
|
13
|
|
130255
|
use strict; |
|
13
|
|
|
|
|
51
|
|
|
13
|
|
|
|
|
417
|
|
3
|
13
|
|
|
13
|
|
68
|
use warnings; |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
381
|
|
4
|
13
|
|
|
13
|
|
68
|
use base 'Bio::Phylo::Matrices::MatrixRole'; |
|
13
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
6831
|
|
5
|
13
|
|
|
13
|
|
127
|
use Bio::Phylo::Util::CONSTANT qw':objecttypes /looks_like/'; |
|
13
|
|
|
|
|
38
|
|
|
13
|
|
|
|
|
3744
|
|
6
|
13
|
|
|
13
|
|
97
|
use Bio::Phylo::Util::Exceptions qw'throw'; |
|
13
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
2601
|
|
7
|
|
|
|
|
|
|
{ |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $logger = __PACKAGE__->get_logger; |
10
|
|
|
|
|
|
|
my @inside_out_arrays = \( |
11
|
|
|
|
|
|
|
my ( |
12
|
|
|
|
|
|
|
%type, %charlabels, %statelabels, |
13
|
|
|
|
|
|
|
%gapmode, %matchchar, %polymorphism, |
14
|
|
|
|
|
|
|
%case_sensitivity, %characters, |
15
|
|
|
|
|
|
|
) |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Bio::Phylo::Matrices::Matrix - Character state matrix |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
use Bio::Phylo::Factory; |
25
|
|
|
|
|
|
|
my $fac = Bio::Phylo::Factory->new; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# instantiate taxa object |
28
|
|
|
|
|
|
|
my $taxa = $fac->create_taxa; |
29
|
|
|
|
|
|
|
for ( 'Homo sapiens', 'Pan paniscus', 'Pan troglodytes' ) { |
30
|
|
|
|
|
|
|
$taxa->insert( $fac->create_taxon( '-name' => $_ ) ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# instantiate matrix object, 'standard' data type. All categorical |
34
|
|
|
|
|
|
|
# data types follow semantics like this, though with different |
35
|
|
|
|
|
|
|
# symbols in lookup table and matrix |
36
|
|
|
|
|
|
|
my $standard_matrix = $fac->create_matrix( |
37
|
|
|
|
|
|
|
'-type' => 'STANDARD', |
38
|
|
|
|
|
|
|
'-taxa' => $taxa, |
39
|
|
|
|
|
|
|
'-lookup' => { |
40
|
|
|
|
|
|
|
'-' => [], |
41
|
|
|
|
|
|
|
'0' => [ '0' ], |
42
|
|
|
|
|
|
|
'1' => [ '1' ], |
43
|
|
|
|
|
|
|
'?' => [ '0', '1' ], |
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
'-charlabels' => [ 'Opposable big toes', 'Opposable thumbs', 'Not a pygmy' ], |
46
|
|
|
|
|
|
|
'-matrix' => [ |
47
|
|
|
|
|
|
|
[ 'Homo sapiens' => '0', '1', '1' ], |
48
|
|
|
|
|
|
|
[ 'Pan paniscus' => '1', '1', '0' ], |
49
|
|
|
|
|
|
|
[ 'Pan troglodytes' => '1', '1', '1' ], |
50
|
|
|
|
|
|
|
], |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# note: complicated constructor for mixed data! |
54
|
|
|
|
|
|
|
my $mixed_matrix = Bio::Phylo::Matrices::Matrix->new( |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# if you want to create 'mixed', value for '-type' is array ref... |
57
|
|
|
|
|
|
|
'-type' => [ |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# ...with first field 'mixed'... |
60
|
|
|
|
|
|
|
'mixed', |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# ...second field is an array ref... |
63
|
|
|
|
|
|
|
[ |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# ...with _ordered_ key/value pairs... |
66
|
|
|
|
|
|
|
'dna' => 10, # value is length of type range |
67
|
|
|
|
|
|
|
'standard' => 10, # value is length of type range |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# ... or, more complicated, value is a hash ref... |
70
|
|
|
|
|
|
|
'rna' => { |
71
|
|
|
|
|
|
|
'-length' => 10, # value is length of type range |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# ...value for '-args' is an array ref with args |
74
|
|
|
|
|
|
|
# as can be passed to 'unmixed' datatype constructors, |
75
|
|
|
|
|
|
|
# for example, here we modify the lookup table for |
76
|
|
|
|
|
|
|
# rna to allow both 'U' (default) and 'T' |
77
|
|
|
|
|
|
|
'-args' => [ |
78
|
|
|
|
|
|
|
'-lookup' => { |
79
|
|
|
|
|
|
|
'A' => [ 'A' ], |
80
|
|
|
|
|
|
|
'C' => [ 'C' ], |
81
|
|
|
|
|
|
|
'G' => [ 'G' ], |
82
|
|
|
|
|
|
|
'U' => [ 'U' ], |
83
|
|
|
|
|
|
|
'T' => [ 'T' ], |
84
|
|
|
|
|
|
|
'M' => [ 'A', 'C' ], |
85
|
|
|
|
|
|
|
'R' => [ 'A', 'G' ], |
86
|
|
|
|
|
|
|
'S' => [ 'C', 'G' ], |
87
|
|
|
|
|
|
|
'W' => [ 'A', 'U', 'T' ], |
88
|
|
|
|
|
|
|
'Y' => [ 'C', 'U', 'T' ], |
89
|
|
|
|
|
|
|
'K' => [ 'G', 'U', 'T' ], |
90
|
|
|
|
|
|
|
'V' => [ 'A', 'C', 'G' ], |
91
|
|
|
|
|
|
|
'H' => [ 'A', 'C', 'U', 'T' ], |
92
|
|
|
|
|
|
|
'D' => [ 'A', 'G', 'U', 'T' ], |
93
|
|
|
|
|
|
|
'B' => [ 'C', 'G', 'U', 'T' ], |
94
|
|
|
|
|
|
|
'X' => [ 'G', 'A', 'U', 'T', 'C' ], |
95
|
|
|
|
|
|
|
'N' => [ 'G', 'A', 'U', 'T', 'C' ], |
96
|
|
|
|
|
|
|
}, |
97
|
|
|
|
|
|
|
], |
98
|
|
|
|
|
|
|
}, |
99
|
|
|
|
|
|
|
], |
100
|
|
|
|
|
|
|
], |
101
|
|
|
|
|
|
|
); |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# prints 'mixed(Dna:1-10, Standard:11-20, Rna:21-30)' |
104
|
|
|
|
|
|
|
print $mixed_matrix->get_type; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 DESCRIPTION |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This module defines a container object that holds |
109
|
|
|
|
|
|
|
L<Bio::Phylo::Matrices::Datum> objects. The matrix |
110
|
|
|
|
|
|
|
object inherits from L<Bio::Phylo::MatrixRole>, so the |
111
|
|
|
|
|
|
|
methods defined there apply here. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 METHODS |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 MUTATORS |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=over |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item set_statelabels() |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Sets argument state labels. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Type : Mutator |
124
|
|
|
|
|
|
|
Title : set_statelabels |
125
|
|
|
|
|
|
|
Usage : $matrix->set_statelabels( [ [ 'state1', 'state2' ] ] ); |
126
|
|
|
|
|
|
|
Function: Assigns state labels. |
127
|
|
|
|
|
|
|
Returns : $self |
128
|
|
|
|
|
|
|
Args : ARRAY, or nothing (to reset); |
129
|
|
|
|
|
|
|
The array is two-dimensional, |
130
|
|
|
|
|
|
|
the first index is to indicate |
131
|
|
|
|
|
|
|
the column the labels apply to, |
132
|
|
|
|
|
|
|
the second dimension the states |
133
|
|
|
|
|
|
|
(sorted numerically or alphabetically, |
134
|
|
|
|
|
|
|
depending on what's appropriate) |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub set_statelabels : Clonable { |
139
|
7
|
|
|
7
|
1
|
17
|
my ( $self, $statelabels ) = @_; |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
# it's an array ref, but what about its contents? |
142
|
7
|
50
|
0
|
|
|
21
|
if ( looks_like_instance( $statelabels, 'ARRAY' ) ) { |
|
|
0
|
|
|
|
|
|
143
|
7
|
|
|
|
|
13
|
for my $col ( @{$statelabels} ) { |
|
7
|
|
|
|
|
20
|
|
144
|
2
|
50
|
|
|
|
5
|
if ( not looks_like_instance( $col, 'ARRAY' ) ) { |
145
|
0
|
|
|
|
|
0
|
throw 'BadArgs' => |
146
|
|
|
|
|
|
|
"statelabels must be a two dimensional array ref"; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
# it's defined but not an array ref |
152
|
|
|
|
|
|
|
elsif ( defined $statelabels |
153
|
|
|
|
|
|
|
&& !looks_like_instance( $statelabels, 'ARRAY' ) ) |
154
|
|
|
|
|
|
|
{ |
155
|
0
|
|
|
|
|
0
|
throw 'BadArgs' => |
156
|
|
|
|
|
|
|
"statelabels must be a two dimensional array ref"; |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
# it's either a valid array ref, or nothing, i.e. a reset |
160
|
7
|
|
50
|
|
|
34
|
$statelabels{ $self->get_id } = $statelabels || []; |
161
|
7
|
|
|
|
|
17
|
return $self; |
162
|
13
|
|
|
13
|
|
94
|
} |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
74
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=item set_characters() |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Sets the character set manager object Bio::Phylo::Matrices::Characters. |
167
|
|
|
|
|
|
|
Normally you never have to use this. |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Type : Mutator |
170
|
|
|
|
|
|
|
Title : set_characters |
171
|
|
|
|
|
|
|
Usage : $matrix->set_characters( $characters ); |
172
|
|
|
|
|
|
|
Function: Assigns Bio::Phylo::Matrices::Characters object |
173
|
|
|
|
|
|
|
Returns : $self |
174
|
|
|
|
|
|
|
Args : Bio::Phylo::Matrices::Characters |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=cut |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
sub set_characters : Clonable DeepClonable { |
179
|
44
|
|
|
44
|
1
|
111
|
my ( $self, $characters ) = @_; |
180
|
44
|
50
|
|
|
|
164
|
if ( looks_like_object $characters, _CHARACTERS_ ) { |
181
|
44
|
|
|
|
|
186
|
$characters{ $self->get_id } = $characters; |
182
|
|
|
|
|
|
|
} |
183
|
44
|
|
|
|
|
119
|
return $self; |
184
|
13
|
|
|
13
|
|
4609
|
} |
|
13
|
|
|
|
|
33
|
|
|
13
|
|
|
|
|
66
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=item set_gapmode() |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Defines matrix gapmode. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
Type : Mutator |
191
|
|
|
|
|
|
|
Title : set_gapmode |
192
|
|
|
|
|
|
|
Usage : $matrix->set_gapmode( 1 ); |
193
|
|
|
|
|
|
|
Function: Defines matrix gapmode ( false = missing, true = fifth state ) |
194
|
|
|
|
|
|
|
Returns : $self |
195
|
|
|
|
|
|
|
Args : boolean |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=cut |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
sub set_gapmode : Clonable { |
200
|
6
|
|
|
6
|
1
|
14
|
my ( $self, $gapmode ) = @_; |
201
|
6
|
|
|
|
|
14
|
$gapmode{ $self->get_id } = $gapmode; |
202
|
6
|
|
|
|
|
17
|
return $self; |
203
|
13
|
|
|
13
|
|
3845
|
} |
|
13
|
|
|
|
|
35
|
|
|
13
|
|
|
|
|
55
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=item set_matchchar() |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
Assigns match symbol. |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
Type : Mutator |
210
|
|
|
|
|
|
|
Title : set_matchchar |
211
|
|
|
|
|
|
|
Usage : $matrix->set_matchchar( $match ); |
212
|
|
|
|
|
|
|
Function: Assigns match symbol (default is '.'). |
213
|
|
|
|
|
|
|
Returns : $self |
214
|
|
|
|
|
|
|
Args : ARRAY |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=cut |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub set_matchchar : Clonable { |
219
|
6
|
|
|
6
|
1
|
14
|
my ( $self, $match ) = @_; |
220
|
6
|
50
|
|
|
|
18
|
if ( $match ) { |
221
|
0
|
|
|
|
|
0
|
my $missing = $self->get_missing; |
222
|
0
|
|
|
|
|
0
|
my $gap = $self->get_gap; |
223
|
0
|
0
|
|
|
|
0
|
if ( $match eq $missing ) { |
|
|
0
|
|
|
|
|
|
224
|
0
|
|
|
|
|
0
|
throw 'BadArgs' => |
225
|
|
|
|
|
|
|
"Match character '$match' already in use as missing character"; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
elsif ( $match eq $gap ) { |
228
|
0
|
|
|
|
|
0
|
throw 'BadArgs' => |
229
|
|
|
|
|
|
|
"Match character '$match' already in use as gap character"; |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
else { |
232
|
0
|
|
|
|
|
0
|
$matchchar{ $self->get_id } = $match; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
else { |
236
|
6
|
|
|
|
|
15
|
$matchchar{ $self->get_id } = undef; |
237
|
|
|
|
|
|
|
} |
238
|
6
|
|
|
|
|
15
|
return $self; |
239
|
13
|
|
|
13
|
|
4378
|
} |
|
13
|
|
|
|
|
31
|
|
|
13
|
|
|
|
|
58
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=item set_polymorphism() |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
Defines matrix 'polymorphism' interpretation. |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
Type : Mutator |
246
|
|
|
|
|
|
|
Title : set_polymorphism |
247
|
|
|
|
|
|
|
Usage : $matrix->set_polymorphism( 1 ); |
248
|
|
|
|
|
|
|
Function: Defines matrix 'polymorphism' interpretation |
249
|
|
|
|
|
|
|
( false = uncertainty, true = polymorphism ) |
250
|
|
|
|
|
|
|
Returns : $self |
251
|
|
|
|
|
|
|
Args : boolean |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=cut |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub set_polymorphism : Clonable { |
256
|
6
|
|
|
6
|
1
|
17
|
my ( $self, $poly ) = @_; |
257
|
6
|
50
|
|
|
|
22
|
if ( defined $poly ) { |
258
|
0
|
|
|
|
|
0
|
$polymorphism{ $self->get_id } = $poly; |
259
|
|
|
|
|
|
|
} |
260
|
|
|
|
|
|
|
else { |
261
|
6
|
|
|
|
|
18
|
delete $polymorphism{ $self->get_id }; |
262
|
|
|
|
|
|
|
} |
263
|
6
|
|
|
|
|
13
|
return $self; |
264
|
13
|
|
|
13
|
|
3452
|
} |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
52
|
|
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
=item set_respectcase() |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
Defines matrix case sensitivity interpretation. |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
Type : Mutator |
271
|
|
|
|
|
|
|
Title : set_respectcase |
272
|
|
|
|
|
|
|
Usage : $matrix->set_respectcase( 1 ); |
273
|
|
|
|
|
|
|
Function: Defines matrix case sensitivity interpretation |
274
|
|
|
|
|
|
|
( false = disregarded, true = "respectcase" ) |
275
|
|
|
|
|
|
|
Returns : $self |
276
|
|
|
|
|
|
|
Args : boolean |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=cut |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
sub set_respectcase : Clonable { |
281
|
6
|
|
|
6
|
1
|
19
|
my ( $self, $case_sensitivity ) = @_; |
282
|
6
|
50
|
|
|
|
20
|
if ( defined $case_sensitivity ) { |
283
|
0
|
|
|
|
|
0
|
$case_sensitivity{ $self->get_id } = $case_sensitivity; |
284
|
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
|
else { |
286
|
6
|
|
|
|
|
16
|
delete $case_sensitivity{ $self->get_id }; |
287
|
|
|
|
|
|
|
} |
288
|
6
|
|
|
|
|
14
|
return $self; |
289
|
13
|
|
|
13
|
|
3586
|
} |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
55
|
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
=back |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
=head2 ACCESSORS |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
=over |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
=item get_characters() |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
Retrieves characters object. |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
Type : Accessor |
302
|
|
|
|
|
|
|
Title : get_characters |
303
|
|
|
|
|
|
|
Usage : my $characters = $matrix->get_characters |
304
|
|
|
|
|
|
|
Function: Retrieves characters object. |
305
|
|
|
|
|
|
|
Returns : Bio::Phylo::Matrices::Characters |
306
|
|
|
|
|
|
|
Args : None. |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
=cut |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
sub get_characters { |
311
|
169
|
|
|
169
|
1
|
279
|
my $self = shift; |
312
|
169
|
|
|
|
|
365
|
return $characters{ $self->get_id }; |
313
|
|
|
|
|
|
|
} |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
=item get_statelabels() |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
Retrieves state labels. |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
Type : Accessor |
320
|
|
|
|
|
|
|
Title : get_statelabels |
321
|
|
|
|
|
|
|
Usage : my @statelabels = @{ $matrix->get_statelabels }; |
322
|
|
|
|
|
|
|
Function: Retrieves state labels. |
323
|
|
|
|
|
|
|
Returns : ARRAY |
324
|
|
|
|
|
|
|
Args : None. |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
=cut |
327
|
|
|
|
|
|
|
|
328
|
7
|
100
|
|
7
|
1
|
27
|
sub get_statelabels { $statelabels{ $_[0]->get_id } || [] } |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=item get_gapmode() |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
Returns matrix gapmode. |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
Type : Accessor |
335
|
|
|
|
|
|
|
Title : get_gapmode |
336
|
|
|
|
|
|
|
Usage : do_something() if $matrix->get_gapmode; |
337
|
|
|
|
|
|
|
Function: Returns matrix gapmode ( false = missing, true = fifth state ) |
338
|
|
|
|
|
|
|
Returns : boolean |
339
|
|
|
|
|
|
|
Args : none |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
=cut |
342
|
|
|
|
|
|
|
|
343
|
6
|
|
|
6
|
1
|
18
|
sub get_gapmode { $gapmode{ $_[0]->get_id } } |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
=item get_matchchar() |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
Returns matrix match character. |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
Type : Accessor |
350
|
|
|
|
|
|
|
Title : get_matchchar |
351
|
|
|
|
|
|
|
Usage : my $char = $matrix->get_matchchar; |
352
|
|
|
|
|
|
|
Function: Returns matrix match character (default is '.') |
353
|
|
|
|
|
|
|
Returns : SCALAR |
354
|
|
|
|
|
|
|
Args : none |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
=cut |
357
|
|
|
|
|
|
|
|
358
|
25
|
|
|
25
|
1
|
87
|
sub get_matchchar { $matchchar{ $_[0]->get_id } } |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
=item get_polymorphism() |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
Returns matrix 'polymorphism' interpretation. |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
Type : Accessor |
365
|
|
|
|
|
|
|
Title : get_polymorphism |
366
|
|
|
|
|
|
|
Usage : do_something() if $matrix->get_polymorphism; |
367
|
|
|
|
|
|
|
Function: Returns matrix 'polymorphism' interpretation |
368
|
|
|
|
|
|
|
( false = uncertainty, true = polymorphism ) |
369
|
|
|
|
|
|
|
Returns : boolean |
370
|
|
|
|
|
|
|
Args : none |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=cut |
373
|
|
|
|
|
|
|
|
374
|
6
|
|
|
6
|
1
|
18
|
sub get_polymorphism { $polymorphism{ shift->get_id } } |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
=item get_respectcase() |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
Returns matrix case sensitivity interpretation. |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
Type : Accessor |
381
|
|
|
|
|
|
|
Title : get_respectcase |
382
|
|
|
|
|
|
|
Usage : do_something() if $matrix->get_respectcase; |
383
|
|
|
|
|
|
|
Function: Returns matrix case sensitivity interpretation |
384
|
|
|
|
|
|
|
( false = disregarded, true = "respectcase" ) |
385
|
|
|
|
|
|
|
Returns : boolean |
386
|
|
|
|
|
|
|
Args : none |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
=cut |
389
|
|
|
|
|
|
|
|
390
|
6
|
|
|
6
|
1
|
19
|
sub get_respectcase { $case_sensitivity{ shift->get_id } } |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
sub _cleanup : Destructor { |
393
|
39
|
|
|
39
|
|
81
|
my $self = shift; |
394
|
39
|
|
|
|
|
113
|
my $id = $self->get_id; |
395
|
39
|
|
|
|
|
102
|
for (@inside_out_arrays) { |
396
|
312
|
100
|
66
|
|
|
1017
|
delete $_->{$id} if defined $id and exists $_->{$id}; |
397
|
|
|
|
|
|
|
} |
398
|
13
|
|
|
13
|
|
4917
|
} |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
57
|
|
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
=back |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=cut |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
# podinherit_insert_token |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=head1 SEE ALSO |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
There is a mailing list at L<https://groups.google.com/forum/#!forum/bio-phylo> |
409
|
|
|
|
|
|
|
for any user or developer questions and discussions. |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=over |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=item L<Bio::Phylo::Taxa::TaxaLinker> |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
This object inherits from L<Bio::Phylo::Taxa::TaxaLinker>, so the |
416
|
|
|
|
|
|
|
methods defined therein are also applicable to L<Bio::Phylo::Matrices::Matrix> |
417
|
|
|
|
|
|
|
objects. |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=item L<Bio::Phylo::Matrices::TypeSafeData> |
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
This object inherits from L<Bio::Phylo::Matrices::TypeSafeData>, so the |
422
|
|
|
|
|
|
|
methods defined therein are also applicable to L<Bio::Phylo::Matrices::Matrix> |
423
|
|
|
|
|
|
|
objects. |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
=item L<Bio::Phylo::Manual> |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
Also see the manual: L<Bio::Phylo::Manual> and L<http://rutgervos.blogspot.com>. |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
=back |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
=head1 CITATION |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
If you use Bio::Phylo in published research, please cite it: |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
B<Rutger A Vos>, B<Jason Caravas>, B<Klaas Hartmann>, B<Mark A Jensen> |
436
|
|
|
|
|
|
|
and B<Chase Miller>, 2011. Bio::Phylo - phyloinformatic analysis using Perl. |
437
|
|
|
|
|
|
|
I<BMC Bioinformatics> B<12>:63. |
438
|
|
|
|
|
|
|
L<http://dx.doi.org/10.1186/1471-2105-12-63> |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
=cut |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
} |
443
|
|
|
|
|
|
|
1; |