The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::Mitomaster::AASeq - An mtDNA translation.

SYNOPSIS

Generally, these objects should be instantiated by calling the translate method on a Bio::Mitomaster::RNASeq object. If for some reason you want to create an AASeq object directly, you must specify a SpeciesRef object, locus ID, and a hash reference of codon variants with frameshift information appended to the end of each variant (separated by a space). If the sequence is partial, then you must also specify the start and end values. When created using the translate method, an AASeq object will inherit the SpeciesRef object and locus_id from the RNASeq object that created it.

    use Bio::Mitomaster::SpeciesRef;
    use Bio::Mitomaster::AASeq;

    my $ref = Bio::Mitomaster::SpeciesRef->new(species=>'human', reference=>'rCRS');
    my $aa_seq1 = Bio::Mitomaster::AASeq->new(species_ref=>$ref, locus_id=>33, variants=>{2=>'UUG', 3=>'AUG +1', 4=>'CUU +1', 5=>'UGG'});
    my $aa_seq2 = Bio::Mitomaster::AASeq->new(species_ref=>$ref, locus_id=>33, start=>1, end=>15, variants=>{2=>'UUG', 3=>'AUG +1', 4=>'CUU +1', 5=>'UGG'});  # same thing except that we only have the first 15 amino acids

    my $s = $aa_seq1->seq(1,5);  # $s is 'MMYAL', the first 5 amino acids
    my $r = $aa_seq1->ref_seq(1,5);  # $s is 'MLMLW', the first 5 amino acids of its ref translation

ATTRIBUTES

See Bio::Mitomaster::MitoSeq for inherited attributes.

end

The end position of the sequence. Defaults to the length of the reference sequence translation. Set this in order to analyze partial sequences. It will also cause the ref_seq value to end at this position.

locus_id

The locus_id for this AA sequence. Use a Mitomaster object to see a list of the valid locus_id values that can be used (see the Bio::Mitomaster documentation). This is a read-only value and must be set during object construction.

variants

A hash reference to a list of variants, indexed by translation position. Note that AASeq stores variants as codons, along with frame information, and converts the values to amino acids using the codon code in the SpeciesRef object. This behavior can be altered by setting the show_codons and show_frames attributes.

With this flag set, a single base DNA insertion would cause a -1 frame for the encoded amino acid, while a single base deletion would result in a +1 frame. Variants that are in frame do not have any frame information recorded. This flag is often used in combination with the show_codons flag.

show_codons

A flag that alters the variants method. When set to 1, the variants will be returned as codons, rather than single letter amino acid values. See 'variants'.

show_frames

A flag that alters the variants method. When set to 1, the variants will have frame information appended to the end (separated by a space). See 'variants'.

start

The start position of the sequence. Defaults to 1. Set this in order to analyze partial sequences. It will also alter the behavior of the ref_seq method.

METHODS

See Bio::Mitomaster::MitoSeq for inherited methods, particularly the seq method, which is probably the most important one provided.

AUTHOR

Marty Brandon, <mbrandon at uci.edu>

BUGS

Please report any bugs or feature requests to bug-bio-mitomaster-seq at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-Mitomaster-AASeq. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Bio::Mitomaster::AASeq

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Marty Brandon, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.