AlignDB-Codon

 view release on metacpan or  search on metacpan

lib/AlignDB/Codon.pm  view on Meta::CPAN


our $VERSION = '1.1.1';

# codon tables
has 'table_id' => ( is => 'ro', isa => 'Int', default => sub {1}, );
has 'table_name'    => ( is => 'ro', isa => 'Str', );
has 'table_content' => ( is => 'ro', isa => 'Str', );
has 'table_starts'  => ( is => 'ro', isa => 'Str', );

# codons
has 'codons'    => ( is => 'ro', isa => 'ArrayRef', );
has 'codon_idx' => ( is => 'ro', isa => 'HashRef', );
has 'codon2aa'  => ( is => 'ro', isa => 'HashRef', );

# lookup hash for the number of synonymous changes per codon
has 'syn_sites' => ( is => 'ro', isa => 'HashRef', );

# lookup hash of all pairwise combinations of codons differing by 1
#    1 = synonymous, 0 = non-synonymous, -1 = stop
has 'syn_changes' => ( is => 'ro', isa => 'HashRef', );

# One <=> Three
has 'one2three' => ( is => 'ro', isa => 'HashRef', );
has 'three2one' => ( is => 'ro', isa => 'HashRef', );

sub BUILD {
    my $self = shift;

    $self->_make_codons;
    $self->change_codon_table( $self->{table_id} );
    $self->_load_aa_code;

    return;
}



( run in 0.227 second using v1.01-cache-2.11-cpan-5f2e87ce722 )