[Bio] / FigKernelPackages / NCBI_genetic_code.pm Repository:
ViewVC logotype

Annotation of /FigKernelPackages/NCBI_genetic_code.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : golsen 1.1 package NCBI_genetic_code;
2 :     #
3 :     # Access to the numbered genetic codes used by NCBI. A code is returned
4 :     # as a reference to a hash that has both uppercase and lowercase translations.
5 :     #
6 :     # There are two access methods: by hash element and by subroutine:
7 :     #
8 :     # \%genetic_code_n = $NCBI_genetic_code::NCBI_code{ $n };
9 :     #
10 :     # \%genetic_code_n = NCBI_genetic_code::NCBI_code( $n );
11 :     #
12 :     # The only difference in behaviour is that the subroutine defaults to code
13 :     # number 1 when no parameter is supplied:
14 :     #
15 :     # \%genetic_code_1 = NCBI_genetic_code::NCBI_code();
16 :     #
17 :     # All other invalid numbers return an undefined value.
18 :     #
19 :    
20 :     use strict;
21 :    
22 :     my @nt = qw( T C A G ); # The order here must match that in the tables
23 :    
24 :     my ( $nt1, $nt12 );
25 :     my @triplets = map { $nt1 = $_;
26 :     map { $nt12 = $nt1 . $_;
27 :     map { $nt12 . $_ } @nt
28 :     } @nt
29 :     } @nt;
30 :    
31 :     my $code_num;
32 :    
33 :     our %NCBI_code = map { my @aas = split //, $_->[1];
34 :     $_->[0] => { map { @$_, map { lc } @$_ } # uc and lc
35 :     map { [ $_ => shift @aas ] } # assignments
36 :     @triplets # codons
37 :     }
38 :     }
39 :     map { if ( /transl_table=(\d+)/ ) { $code_num = $1 };
40 :     /AAs\s+=\s+(\S+)/ ? [ $code_num, $1 ] : ()
41 :     }
42 :     split /\n/, <<'End_of_Codes';
43 :    
44 :     1. The Standard Code (transl_table=1)
45 :    
46 :     AAs = FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
47 :     Starts = ---M---------------M---------------M----------------------------
48 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
49 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
50 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
51 :    
52 :     2. The Vertebrate Mitochondrial Code (transl_table=2)
53 :    
54 :     AAs = FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG
55 :     Starts = --------------------------------MMMM---------------M------------
56 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
57 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
58 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
59 :    
60 :     3. The Yeast Mitochondrial Code (transl_table=3)
61 :    
62 :     AAs = FFLLSSSSYY**CCWWTTTTPPPPHHQQRRRRIIMMTTTTNNKKSSRRVVVVAAAADDEEGGGG
63 :     Starts = ----------------------------------MM----------------------------
64 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
65 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
66 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
67 :    
68 :     4. The Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code (transl_table=4)
69 :    
70 :     AAs = FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
71 :     Starts = --MM---------------M------------MMMM---------------M------------
72 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
73 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
74 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
75 :    
76 :     5. The Invertebrate Mitochondrial Code (transl_table=5)
77 :    
78 :     AAs = FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSSSVVVVAAAADDEEGGGG
79 :     Starts = ---M----------------------------MMMM---------------M------------
80 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
81 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
82 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
83 :    
84 :     6. The Ciliate, Dasycladacean and Hexamita Nuclear Code (transl_table=6)
85 :    
86 :     AAs = FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
87 :     Starts = -----------------------------------M----------------------------
88 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
89 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
90 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
91 :    
92 :     9. The Echinoderm and Flatworm Mitochondrial Code (transl_table=9)
93 :    
94 :     AAs = FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG
95 :     Starts = -----------------------------------M---------------M------------
96 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
97 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
98 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
99 :    
100 :     10. The Euplotid Nuclear Code (transl_table=10)
101 :    
102 :     AAs = FFLLSSSSYY**CCCWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
103 :     Starts = -----------------------------------M----------------------------
104 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
105 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
106 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
107 :    
108 :     11. The Bacterial and Plant Plastid Code (transl_table=11)
109 :    
110 :     AAs = FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
111 :     Starts = ---M---------------M------------MMMM---------------M------------
112 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
113 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
114 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
115 :    
116 :     12. The Alternative Yeast Nuclear Code (transl_table=12)
117 :    
118 :     AAs = FFLLSSSSYY**CC*WLLLSPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
119 :     Starts = -------------------M---------------M----------------------------
120 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
121 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
122 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
123 :    
124 :     13. The Ascidian Mitochondrial Code (transl_table=13)
125 :    
126 :     AAs = FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSGGVVVVAAAADDEEGGGG
127 :     Starts = ---M------------------------------MM---------------M------------
128 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
129 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
130 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
131 :    
132 :     14. The Alternative Flatworm Mitochondrial Code (transl_table=14)
133 :    
134 :     AAs = FFLLSSSSYYY*CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG
135 :     Starts = -----------------------------------M----------------------------
136 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
137 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
138 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
139 :    
140 :     15. Blepharisma Nuclear Code (transl_table=15)
141 :    
142 :     AAs = FFLLSSSSYY*QCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
143 :     Starts = -----------------------------------M----------------------------
144 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
145 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
146 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
147 :    
148 :     16. Chlorophycean Mitochondrial Code (transl_table=16)
149 :    
150 :     AAs = FFLLSSSSYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
151 :     Starts = -----------------------------------M----------------------------
152 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
153 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
154 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
155 :    
156 :     21. Trematode Mitochondrial Code (transl_table=21)
157 :    
158 :     AAs = FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNNKSSSSVVVVAAAADDEEGGGG
159 :     Starts = -----------------------------------M---------------M------------
160 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
161 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
162 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
163 :    
164 :     22. Scenedesmus obliquus mitochondrial Code (transl_table=22)
165 :    
166 :     AAs = FFLLSS*SYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
167 :     Starts = -----------------------------------M----------------------------
168 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
169 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
170 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
171 :    
172 :     23. Thraustochytrium Mitochondrial Code (transl_table=23)
173 :    
174 :     AAs = FF*LSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
175 :     Starts = --------------------------------M--M---------------M------------
176 :     Base1 = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
177 :     Base2 = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
178 :     Base3 = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG
179 :    
180 :     End_of_Codes
181 :    
182 :     sub NCBI_code { $NCBI_code{ $_[0] || '1' } }
183 :    
184 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3