Bio::CUA::CodonTable -- A package processing genetic codon table
This package is provided to improve portability of http://search.cpan.org/dist/Bio-CUA/, in case that one may not install "http://www.bioperl.org/" in BioPerl which includes huge number of modules.
The package obtains genetic code tables from NCBI at http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/index.cgi?chapter=cgencodes
examples:
# get the standard genetic code my $table = Bio::CUA::CodonTable->new(-id => 1) # get table from an input file if know genetic codes can not # satisfy the need. my $table = Bio::CUA::CodonTable->new(-map_file => 'codon_to_aa.tsv') # in 'codon_to_aa.tsv', it looks like this # GCU A # AAU N # CAU H # ... ...
Title : new Usage : $obj = Bio::CUA::CodonTable->new(-map_file => 'file'); Function: creat an object for processing genetic codon tables Returns : an object of L<Bio::CUA::CodonTable> Args : a hash with following keys:
genetic code id. The id follows NCBI's standard, here are the list: 1. The Standard Code 2. The Vertebrate Mitochondrial Code 3. The Yeast Mitochondrial Code 4. The Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code 5. The Invertebrate Mitochondrial Code 6. The Ciliate, Dasycladacean and Hexamita Nuclear Code 9. The Echinoderm and Flatworm Mitochondrial Code 10. The Euplotid Nuclear Code 11. The Bacterial, Archaeal and Plant Plastid Code 12. The Alternative Yeast Nuclear Code 13. The Ascidian Mitochondrial Code 14. The Alternative Flatworm Mitochondrial Code 16. Chlorophycean Mitochondrial Code 21. Trematode Mitochondrial Code 22. Scenedesmus obliquus Mitochondrial Code 23. Thraustochytrium Mitochondrial Code 24. Pterobranchia Mitochondrial Code 25. Candidate Division SR1 and Gracilibacteria Code see L<http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/index.cgi?chapter=tgencodes#SG1> for more details.
-map_file = a file containing a mapping between codons to amino acids, one codon per line followed by its amino acid, separated by tab or space.
a switch to indicate whether to show more warnings which may help to identify sources of errors if any. put 1 to switch it on. The default is off.
Note: argument -map_file has higher priority than -id, and the default is -id => 1, i.e., the standard genetic code
Title : name Usage : $name = $self->name(); Function: the name of genetic code table in use Returns : a string for the name Args : None
Title : id Usage : $id = $self->id(); Function: the id of genetic code table in use Returns : a integer for the id Args : None
Title : total_num_of_codons Usage : $num = $self->total_num_of_codons; Function: get total number of codons of the genetic code table in use Returns : an integer Args : None
Title : is_valid_codon Usage : $test = $self->is_valid_codon('ACG'); Function: test whether a given character string is a valid codon in current codon table Returns : 1 if true, otherwise 0 Args : a codon sequence
Title : all_codons Usage : @codons = $self->all_codons; Function: get all the codons in this genetic code table. Codons are ordered by the coded amino acids. Stop codons are also included. Returns : an array of codons, or its reference in scalar context Args : None
Title : all_sense_codons Usage : @codons = $self->all_sense_codons; Function: get all the sense codons in this genetic code table Returns : an array of codons, or its reference in scalar context Args : None
Title : all_amino_acids Usage : @AAs = $self->all_amino_acids Function: get all the amino acids in this genetic code table. Stop codons are excluded. Returns : an array of amino acids, or its reference if in scalar context Args : None
Title : all_start_codons Usage : @startCodons = $self->all_start_codons; Function: get all the start codons in the genetic code table in use Returns : an array of codons, or its reference if in scalar context Args : None
Title : all_stop_codons Usage : @stopCodons = $self->all_stop_codons; Function: get all the stop codons in the genetic code table in use Returns : an array of codons, or its reference if in scalar context Args : None
Title : codons_of_AA Usage : @codons = $self->codons_of_AA('S'); Function: get codons encoding the given amino acid Returns : an array of codons, or its reference if in scalar context Args : a single amino acid; for stop codons, one can give '*' here
Title : codon_to_AA_map Usage : $hash = $self->codon_to_AA_map Function: get the mapping from codon to amino acid in a hash Returns : a hash reference in which codons are keys and AAs are values Args : None
Title : translate Usage : $AA_string = $self->translate('ATGGCA'); Function: get the translation of input nucleotides Returns : a string of amino acids, unknown amino acids are represented as 'X'. Args : nucleotide sequence. Note : if the input sequence is not multiple of 3 long, the last remained 1 or 2 nucleotides would be simply ignored.
Title : is_stop_codon Usage : $test = $self->is_stop_codon('UAG'); Function: check whether this is a stop codon Returns : 1 if true, otherwise 0 Args : a codon sequence
Title : codon_degeneracy Usage : $hash = $self->codon_degeneracy; Function: group AAs and codons into codon degeneracy groups Returns : reference to a hash in which 1st level key is degeneracy (i.e., 1,2,6,etc), 2nd level key is amino acids for that degeneracy group, and 3rd level is reference of arrays containing coding codons for each amino acid. For example: { 2 => { D => [GAU, GAC], C => [UGU, UGC], ... ... }, 4 => { A => [GCU, GCC, GCA, GCG], ... ... }, ... ... ... } Args : None
Zhenguo Zhang, <zhangz.sci at gmail.com>
<zhangz.sci at gmail.com>
Please report any bugs or feature requests to bug-bio-cua at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-CUA. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-bio-cua at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Bio::CUA::CodonTable
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Bio-CUA
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Bio-CUA
CPAN Ratings
http://cpanratings.perl.org/d/Bio-CUA
Search CPAN
http://search.cpan.org/dist/Bio-CUA/
Copyright 2015 Zhenguo Zhang.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
To install Bio::CUA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::CUA
CPAN shell
perl -MCPAN -e shell install Bio::CUA
For more information on module installation, please visit the detailed CPAN module installation guide.