line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Bio::Util::AA - Basic Amino Acid utilities |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSES |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Bio::Util::AA qw(:all) |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 DESCRIPTION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Provides a set of functions and predefined variables which |
12
|
|
|
|
|
|
|
are handy when working with Amino Acids. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package Bio::Util::AA; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
23987
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
19
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
859
|
use version; our $VERSION = qv('0.1.6'); |
|
1
|
|
|
|
|
2931
|
|
|
1
|
|
|
|
|
7
|
|
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
82
|
use Exporter 'import'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
416
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
26
|
|
|
|
|
|
|
%ambiguous_forward |
27
|
|
|
|
|
|
|
%ambiguous_map |
28
|
|
|
|
|
|
|
%aa_abbrev |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$aas |
31
|
|
|
|
|
|
|
$aa_match |
32
|
|
|
|
|
|
|
$aa_fail |
33
|
|
|
|
|
|
|
$strict_aas |
34
|
|
|
|
|
|
|
$strict_match |
35
|
|
|
|
|
|
|
$strict_fail |
36
|
|
|
|
|
|
|
$ambigs |
37
|
|
|
|
|
|
|
$ambig_match |
38
|
|
|
|
|
|
|
$ambig_fail |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
42
|
|
|
|
|
|
|
all => \@EXPORT_OK, |
43
|
|
|
|
|
|
|
funcs => [qw()] |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VARIABLES |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 AMBIGUOUS MAPPINGS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Two ambiguous mapping hashes. One maps from the amino acid |
53
|
|
|
|
|
|
|
forward to the possible ambiguous amino acid, and one is a |
54
|
|
|
|
|
|
|
map of what each ambiguous amino acid means. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
our %ambiguous_forward = ( |
59
|
|
|
|
|
|
|
A => 'B', |
60
|
|
|
|
|
|
|
B => 'B', |
61
|
|
|
|
|
|
|
D => 'B', |
62
|
|
|
|
|
|
|
I => 'J', |
63
|
|
|
|
|
|
|
J => 'J', |
64
|
|
|
|
|
|
|
L => 'J', |
65
|
|
|
|
|
|
|
E => 'Z', |
66
|
|
|
|
|
|
|
Q => 'Z', |
67
|
|
|
|
|
|
|
Z => 'Z' |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
our %ambiguous_map = ( |
71
|
|
|
|
|
|
|
B => [ 'A', 'D' ], |
72
|
|
|
|
|
|
|
J => [ 'I', 'L' ], |
73
|
|
|
|
|
|
|
Z => [ 'E', 'Q' ] |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 %aa_abbrev |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Hash from one letter code for amino acids to the three |
79
|
|
|
|
|
|
|
letter abbreviations. Includes ambiguous amino acids as well |
80
|
|
|
|
|
|
|
as selenocysteine and pyrrolysine. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
our %aa_abbrev = ( |
85
|
|
|
|
|
|
|
A => 'Ala', |
86
|
|
|
|
|
|
|
B => 'Asx', |
87
|
|
|
|
|
|
|
C => 'Cys', |
88
|
|
|
|
|
|
|
D => 'Asp', |
89
|
|
|
|
|
|
|
E => 'Glu', |
90
|
|
|
|
|
|
|
F => 'Phe', |
91
|
|
|
|
|
|
|
G => 'Gly', |
92
|
|
|
|
|
|
|
H => 'His', |
93
|
|
|
|
|
|
|
I => 'Ile', |
94
|
|
|
|
|
|
|
J => 'Xle', |
95
|
|
|
|
|
|
|
K => 'Lys', |
96
|
|
|
|
|
|
|
L => 'Leu', |
97
|
|
|
|
|
|
|
M => 'Met', |
98
|
|
|
|
|
|
|
N => 'Asn', |
99
|
|
|
|
|
|
|
O => 'Pyl', |
100
|
|
|
|
|
|
|
P => 'Pro', |
101
|
|
|
|
|
|
|
Q => 'Gln', |
102
|
|
|
|
|
|
|
R => 'Arg', |
103
|
|
|
|
|
|
|
S => 'Ser', |
104
|
|
|
|
|
|
|
T => 'Thr', |
105
|
|
|
|
|
|
|
U => 'Sec', |
106
|
|
|
|
|
|
|
V => 'Val', |
107
|
|
|
|
|
|
|
W => 'Trp', |
108
|
|
|
|
|
|
|
X => 'Xaa', |
109
|
|
|
|
|
|
|
Y => 'Tyr', |
110
|
|
|
|
|
|
|
Z => 'Glx' |
111
|
|
|
|
|
|
|
); |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 BASIC VARIABLES |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Basic useful amino acid variables. A list of valid |
116
|
|
|
|
|
|
|
characters for amino acids, a stricter list containing just |
117
|
|
|
|
|
|
|
the 20 common ones and *, and another list containing the |
118
|
|
|
|
|
|
|
ambiguous amino acids. Also associated precompiled |
119
|
|
|
|
|
|
|
regular expressions. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
our $aas = '*ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
124
|
|
|
|
|
|
|
our $aa_match = qr/[$aas]/i; |
125
|
|
|
|
|
|
|
our $aa_fail = qr/[^$aas]/i; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
our $strict_aas = '*ACDEFGHIKLMNPQRSTVWXY'; |
128
|
|
|
|
|
|
|
our $strict_match = qr/[$strict_aas]/i; |
129
|
|
|
|
|
|
|
our $strict_fail = qr/[^$strict_aas]/i; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
our $ambigs = 'BJZ'; |
132
|
|
|
|
|
|
|
our $ambig_match = qr/[$ambigs]/i; |
133
|
|
|
|
|
|
|
our $ambig_fail = qr/[^$ambigs]/i; |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
1; |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 AUTHOR |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Kevin Galinsky, |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Copyright (c) 2010-2011, Broad Institute. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Copyright (c) 2008-2009, J. Craig Venter Institute. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
148
|
|
|
|
|
|
|
under the same terms as Perl itself. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=cut |