[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.2 - (view) (download) (as text)

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3