1Bio::Tools::CodonTable(U3s)er Contributed Perl DocumentatBiioon::Tools::CodonTable(3)
2
3
4

NAME

6       Bio::Tools::CodonTable - Bioperl codon table object
7

SYNOPSIS

9         # This is a read-only class for all known codon tables.  The IDs are
10         # the ones used by nucleotide sequence databases.  All common IUPAC
11         # ambiguity codes for DNA, RNA and animo acids are recognized.
12
13         # to use
14         use Bio::Tools::CodonTable;
15
16         # defaults to ID 1 "Standard"
17         $myCodonTable   = Bio::Tools::CodonTable->new();
18         $myCodonTable2  = Bio::Tools::CodonTable->new( -id => 3 );
19
20         # change codon table
21         $myCodonTable->id(5);
22
23         # examine codon table
24         print  join (' ', "The name of the codon table no.", $myCodonTable->id(4),
25                      "is:", $myCodonTable->name(), "\n");
26
27         # print possible codon tables
28         $tables = Bio::Tools::CodonTable->tables;
29         while ( ($id,$name) = each %{$tables} ) {
30           print "$id = $name\n";
31         }
32
33         # translate a codon
34         $aa = $myCodonTable->translate('ACU');
35         $aa = $myCodonTable->translate('act');
36         $aa = $myCodonTable->translate('ytr');
37
38         # reverse translate an amino acid
39         @codons = $myCodonTable->revtranslate('A');
40         @codons = $myCodonTable->revtranslate('Ser');
41         @codons = $myCodonTable->revtranslate('Glx');
42         @codons = $myCodonTable->revtranslate('cYS', 'rna');
43
44         # reverse translate an entire amino acid sequence into a IUPAC
45         # nucleotide string
46
47         my $seqobj    = Bio::PrimarySeq->new(-seq => 'FHGERHEL');
48         my $iupac_str = $myCodonTable->reverse_translate_all($seqobj);
49
50         #boolean tests
51         print "Is a start\n"       if $myCodonTable->is_start_codon('ATG');
52         print "Is a termianator\n" if $myCodonTable->is_ter_codon('tar');
53         print "Is a unknown\n"     if $myCodonTable->is_unknown_codon('JTG');
54

DESCRIPTION

56       Codon tables are also called translation tables or genetic codes since
57       that is what they represent. A bit more complete picture of the full
58       complexity of codon usage in various taxonomic groups is presented at
59       the NCBI Genetic Codes Home page.
60
61       CodonTable is a BioPerl class that knows all current translation tables
62       that are used by primary nucleotide sequence databases (GenBank, EMBL
63       and DDBJ). It provides methods to output information about tables and
64       relationships between codons and amino acids.
65
66       This class and its methods recognized all common IUPAC ambiguity codes
67       for DNA, RNA and animo acids. The translation method follows the con‐
68       ventions in EMBL and TREMBL databases.
69
70       It is a nuisance to separate RNA and cDNA representations of nucleic
71       acid transcripts. The CodonTable object accepts codons of both type as
72       input and allows the user to set the mode for output when reverse
73       translating. Its default for output is DNA.
74
75       Note:
76
77       This class deals primarily with individual codons and amino acids. How‐
78       ever in the interest of speed you can translate longer sequence, too.
79       The full complexity of protein translation is tackled by Bio::Primary‐
80       SeqI::translate.
81
82       The amino acid codes are IUPAC recommendations for common amino acids:
83
84                 A           Ala            Alanine
85                 R           Arg            Arginine
86                 N           Asn            Asparagine
87                 D           Asp            Aspartic acid
88                 C           Cys            Cysteine
89                 Q           Gln            Glutamine
90                 E           Glu            Glutamic acid
91                 G           Gly            Glycine
92                 H           His            Histidine
93                 I           Ile            Isoleucine
94                 L           Leu            Leucine
95                 K           Lys            Lysine
96                 M           Met            Methionine
97                 F           Phe            Phenylalanine
98                 P           Pro            Proline
99                         O           Pyl            Pyrrolysine (22nd amino acid)
100                         U           Sec            Selenocysteine (21st amino acid)
101                 S           Ser            Serine
102                 T           Thr            Threonine
103                 W           Trp            Tryptophan
104                 Y           Tyr            Tyrosine
105                 V           Val            Valine
106                 B           Asx            Aspartic acid or Asparagine
107                 Z           Glx            Glutamine or Glutamic acid
108                         J           Xle            Isoleucine or Valine (mass spec ambiguity)
109                 X           Xaa            Any or unknown amino acid
110
111       It is worth noting that, "Bacterial" codon table no. 11 produces an
112       polypeptide that is, confusingly, identical to the standard one. The
113       only differences are in available initiator codons.
114
115       NCBI Genetic Codes home page:
116            http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=c
117
118       EBI Translation Table Viewer:
119            http://www.ebi.ac.uk/cgi-bin/mutations/trtables.cgi
120
121       Amended ASN.1 version with ids 16 and 21 is at:
122            ftp://ftp.ebi.ac.uk/pub/databases/geneticcode/
123
124       Thanks to Matteo diTomasso for the original Perl implementation of
125       these tables.
126

FEEDBACK

128       Mailing Lists
129
130       User feedback is an integral part of the evolution of this and other
131       Bioperl modules. Send your comments and suggestions preferably to the
132       Bioperl mailing lists  Your participation is much appreciated.
133
134         bioperl-l@bioperl.org                  - General discussion
135         http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
136
137       Reporting Bugs
138
139       Report bugs to the Bioperl bug tracking system to help us keep track
140       the bugs and their resolution.  Bug reports can be submitted via the
141       web:
142
143         http://bugzilla.open-bio.org/
144

AUTHOR - Heikki Lehvaslaiho

146       Email:  heikki-at-bioperl-dot-org
147

APPENDIX

149       The rest of the documentation details each of the object methods.
150       Internal methods are usually preceded with a _
151
152       id
153
154        Title   : id
155        Usage   : $obj->id(3); $id_integer = $obj->id();
156        Function:
157
158                  Sets or returns the id of the translation table.  IDs are
159                  integers from 1 to 15, excluding 7 and 8 which have been
160                  removed as redundant. If an invalid ID is given the method
161                  returns 0, false.
162
163        Example :
164        Returns : value of id, a scalar, 0 if not a valid
165        Args    : newvalue (optional)
166
167       name
168
169        Title   : name
170        Usage   : $obj->name()
171        Function: returns the descriptive name of the translation table
172        Example :
173        Returns : A string
174        Args    : None
175
176       tables
177
178        Title   : tables
179        Usage   : $obj->tables()  or  Bio::Tools::CodonTable->tables()
180        Function: returns a hash reference where each key is a valid codon
181                  table id() number, and each value is the corresponding
182                  codon table name() string
183        Example :
184        Returns : A hashref
185        Args    : None
186
187       translate
188
189        Title   : translate
190        Usage   : $obj->translate('YTR')
191        Function: Returns a string of one letter amino acid codes from
192                  nucleotide sequence input. The imput can be of any length.
193
194                  Returns 'X' for unknown codons and codons that code for
195                  more than one amino acid. Returns an empty string if input
196                  is not three characters long. Exceptions for these are:
197
198                    - IUPAC amino acid code B for Aspartic Acid and
199                      Asparagine, is used.
200                    - IUPAC amino acid code Z for Glutamic Acid, Glutamine is
201                      used.
202                    - if the codon is two nucleotides long and if by adding
203                      an a third character 'N', it codes for a single amino
204                      acid (with exceptions above), return that, otherwise
205                      return empty string.
206
207                  Returns empty string for other input strings that are not
208                  three characters long.
209
210        Example :
211        Returns : a string of one letter ambiguous IUPAC amino acid codes
212        Args    : ambiguous IUPAC nucleotide string
213
214       translate_strict
215
216        Title   : translate_strict
217        Usage   : $obj->translate_strict('ACT')
218        Function: returns one letter amino acid code for a codon input
219
220                  Fast and simple translation. User is responsible to resolve
221                  ambiguous nucleotide codes before calling this
222                  method. Returns 'X' for unknown codons and an empty string
223                  for input strings that are not three characters long.
224
225                  It is not recommended to use this method in a production
226                  environment. Use method translate, instead.
227
228        Example :
229        Returns : A string
230        Args    : a codon = a three nucleotide character string
231
232       revtranslate
233
234        Title   : revtranslate
235        Usage   : $obj->revtranslate('G')
236        Function: returns codons for an amino acid
237
238                  Returns an empty string for unknown amino acid
239                  codes. Ambiquous IUPAC codes Asx,B, (Asp,D; Asn,N) and
240                  Glx,Z (Glu,E; Gln,Q) are resolved. Both single and three
241                  letter amino acid codes are accepted. '*' and 'Ter' are
242                  used for terminator.
243
244                  By default, the output codons are shown in DNA.  If the
245                  output is needed in RNA (tr/t/u/), add a second argument
246                  'RNA'.
247
248        Example : $obj->revtranslate('Gly', 'RNA')
249        Returns : An array of three lower case letter strings i.e. codons
250        Args    : amino acid, 'RNA'
251
252       is_start_codon
253
254        Title   : is_start_codon
255        Usage   : $obj->is_start_codon('ATG')
256        Function: returns true (1) for all codons that can be used as a
257                  translation start, false (0) for others.
258        Example : $myCodonTable->is_start_codon('ATG')
259        Returns : boolean
260        Args    : codon
261
262       is_ter_codon
263
264        Title   : is_ter_codon
265        Usage   : $obj->is_ter_codon('GAA')
266        Function: returns true (1) for all codons that can be used as a
267                  translation tarminator, false (0) for others.
268        Example : $myCodonTable->is_ter_codon('ATG')
269        Returns : boolean
270        Args    : codon
271
272       is_unknown_codon
273
274        Title   : is_unknown_codon
275        Usage   : $obj->is_unknown_codon('GAJ')
276        Function: returns false (0) for all codons that are valid,
277                   true (1) for others.
278        Example : $myCodonTable->is_unknown_codon('NTG')
279        Returns : boolean
280        Args    : codon
281
282       _unambiquous_codons
283
284        Title   : _unambiquous_codons
285        Usage   : @codons = _unambiquous_codons('ACN')
286        Function:
287        Example :
288        Returns : array of strings (one letter unambiguous amino acid codes)
289        Args    : a codon = a three IUPAC nucleotide character string
290
291       add_table
292
293        Title   : add_table
294        Usage   : $newid = $ct->add_table($name, $table, $starts)
295        Function: Add a custom Codon Table into the object.
296                  Know what you are doing, only the length of
297                  the argument strings is checked!
298        Returns : the id of the new codon table
299        Args    : name, a string, optional (can be empty)
300                  table, a string of 64 characters
301                  startcodons, a string of 64 characters, defaults to standard
302
303
304
305perl v5.8.8                       2007-05-07         Bio::Tools::CodonTable(3)
Impressum