[Bioperl-l] Re:About reverse translation using.....

Todd Naumann tan10 at psu.edu
Fri Sep 24 15:52:02 EDT 2004


The following program takes a species, genetic code i.d., and peptide 
sequence as input. It then retrieves data from the web using 
Bio::DB::CUTG to create a Bio::CodonUsage::Table object.  (Check out 
www.kazusa.or.jp./codon/ to find correct species name to use, for E. 
coli there are several). I then use Bio::Tools::CodonTable to do the 
reverse translation and Bio::CodonUsage to determine which of the 
codons is most frequent. The output is then the oligo sequence matching 
the given peptide using the most frequent codons. I think this or 
something similar is what you are trying to do. If not maybe it will 
help put you on the right track.



use strict;
use warnings;
#use lib "/Users/todd/.cpan/build/bioperl-1.4";
use Bio::CodonUsage::Table;
use Bio::DB::CUTG;

my $organism = "Escherichia coli K12";
my $gc = "11";
my $amino_acids = "AKLMG";
my @peptide = split //, $amino_acids;
my $oligo;

# get  a codon usage table from web database
my $db = Bio::DB::CUTG->new(-sp => $organism,
				 -gc => $gc);
my $CUT = $db->get_request(); # This is Bio::CondonUsage::Table object

# use Bio::Tools::CodonTable to do the reverse translation
# with a specified table
my $CodonTable = Bio::Tools::CodonTable->new(-id => $gc);

# Loop throught the amino acids and pick most frequent
# codon
foreach (@peptide) {
     my @possible_codons = $CodonTable->revtranslate($_);
     my $most_frequent = shift @possible_codons;
     foreach my $next_codon (@possible_codons) {
	if ($CUT->codon_rel_frequency($next_codon) > 
$CUT->codon_rel_frequency($most_frequent)) {
	    $most_frequent = $next_codon;
     $oligo .= $most_frequent;
print "The DNA sequence is: $oligo.\n\n";

Todd Naumann
Post-Doc, Stephen Benkovic lab
Dept. of Chemistry
Penn State University
University Park, PA  16801
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1905 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20040924/e7a9cb82/attachment.bin

More information about the Bioperl-l mailing list