Bio::CUA::Summarizer - a class to summarize features of sequences.
This class provides convenience for its child classes with methods summarizing sequence features, such as counting and listing amino acids and codons, retrieving amino acids with certain degree degeneracy in a genetic table. Refer to the "Methods" section for more details.
use Bio::CUA::Summarizer; my $summarizer = Bio::CUA::Summarizer->new( codon_table => 1 ); # using stardard genetic code # get codons in a sequence file my $codonList = $summarizer->tabulate_codons('seqs.fa'); # get the codon table object of this summarizer my $table = $summarizer->codon_table; # get all sense codons in the genetic codon table my @senseCodons = $summarizer->all_sense_codons; # get codons encoding an amino acid my @codons = $summarizer->codons_of_AA('Ser');
Title : new Usage : $obj=Bio::CUA::Summarizer->new(%args); Function: create an object which can be used to summarizing sequence features. Returns : an object of this or child class Args : a hash with a key 'codon_table', acceptable values are codon_table => id of genetic codon table # 1 codon_table => Bio::CUA::CodonTable object # 2 codon_table => 'map-file' # 3
id of genetic codon table can be found from NCBI genetic codes. A valid id is an integer.
an object of Bio::CUA::CodonTable. One can directly provide an object to the method.
If genetic code in analyzed sequences is not included in NCBI, one can also provide its own genetic code in a map-file, in the format of codon1<tab>AA1 codon2<tab>AA2, ... ... ....
Note all the analyzed sequences will use this provided genetic codon table to map between amino acids and codons.
Title : codon_table Usage : $table = $self->codon_table; Function: get associated codon table of this object Returns : an object of L<Bio::CUA::CodonTable> Args : None
get the 4 nucleotides A,T,C,G always in this order, to keep consistency among different classes
Title : get_codon_list Usage : $codonList = $self->get_codon_list($input) Function: get codons and their counts in input Returns : reference to a hash containing codons as keys and counts as values. Args : seq string, seq object, seq file, or another codon list
Title : tabulate_codons Usage : $codonList = $self->tabulate_codons($input,[$each]); Function: count codons in the input sequences Returns : reference to a hash in which codon is the key and counts as values. If $each is true, then each sequence is separately processed and stored in a larger hash with the sequence names as hash keys Args : accepted arguments are as follows: I<input> = name of a file containing fasta sequences I<each> = optional, if TRUE (i.e., non-zero values), each sequence is separately processed. This is a companionate method of L</get_codon_list> for situations when one want to get codon counts for each sequence separately.
Title : tabulate_AAs Usage : $AAList = $self->tabulate_AAs($input,[$each]); Function: similar to L</tabulate_codons>, but for counting amino acids Returns : the same as L</tabulate_codons>, but for amino acids Args : refer to L</tabulate_codons>.
get all sense codons in the genetic codon table this object
get all the amino acids coded in the genetic code table of this object
get codons coding the given amino acid, e.g.,
my @codons = $self->codons_of_AA('Ser');
Title : aa_degeneracy_classes Usage : $hashRef = $self->aa_degeneracy_classes; Function: get amino acid degeneracy classes according to the associated genetic code table Returns : a hash reference in which first level key is degeneracy degrees such as 1,2,3,4,6, second level is amino acid, the value is reference to the corresponding codon array. For example: { 2 => { D => [GAU, GAC], C => [UGU, UGC], ... ... }, 4 => { A => [GCU, GCC, GCA, GCG], ... ... }, ... ... ... } Args : None
Title : codons_by_degeneracy Usage : @codons = $self->codons_by_degeneracy(2); Function: get all the codons of AAs which have the specified degree of degeneracy, for example, codons of amino acids with degenracy degree 2. Returns : an array of codons, or its reference in scalar context Args : an integer for degeneracy degree
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::Summarizer
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.