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

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3