9 Reverse-translates a nucleotide sequence using the most frequent codons.
10 Requires an input sequence file and a nucleotide sequence file containing
11 one sequence comprised of one or more ORFs. This file supplies the codon
12 frequency data and will be parsed starting at the first triplet in the sequence.
16 -i Input sequence, amino acid
17 -c Input sequence, nucleotide ORFs
21 reverse-translate.pl -i ~/bioperl-live/t/data/cysprot.fa -c ~/bioperl-live/t/data/HUMBETGLOA.fa
27 use Bio
::Tools
::CodonTable
;
28 use Bio
::Tools
::SeqStats
;
29 use Bio
::CodonUsage
::Table
;
32 my ($codonFile,$seqFile);
34 GetOptions
( "c=s" => \
$codonFile,
37 die "Need input sequence and file containing coding regions"
38 if ( !$codonFile || !$seqFile );
40 my $codonIn = Bio
::SeqIO
->new(-file
=> $codonFile,
43 my $codonSeq = $codonIn->next_seq;
45 my $codonStats = Bio
::Tools
::SeqStats
->count_codons($codonSeq);
47 my $codonUsage = Bio
::CodonUsage
::Table
->new(-data
=> $codonStats );
49 my $codonTable = Bio
::Tools
::CodonTable
->new;
51 my $seqIn = Bio
::SeqIO
->new(-file
=> $seqFile);
53 my $seq = $seqIn->next_seq;
55 my $rvSeq = $codonTable->reverse_translate_best($seq,$codonUsage);