[Bio-software] Re: transeq

Don Gilbert via bio-soft%40net.bio.net (by gilbertd from kalo.bio.indiana.edu)
Fri Mar 30 17:18:52 EST 2007


You may want to look at some of the other Bioperl tools that do
DNA -> protein translation. See 
  Bio::SeqUtils - Additional methods for PrimarySeq objects
which has a translate_6frames() and translate_3frames() function.

The Bioperl (and computing) version of 'frame' is 0,1,2, meaning
start translating at the offset 0, 1 or 2 from the first base in your sequence.

You are using the biologist definition of frame (1,2,3 forward frame,
and -1,-2,-3 for reverse-complement frame).  To get -1,-2,-3 frames,
you want to first reverse-complement your sequence, then choose 0,1, or 2
for the Bioperl translation frame.  E.g.

  use Bio::PrimarySeq;
  $seq = Bio::PrimarySeq->new ( -seq => 'ATGGGGTGGGCGGTGGGTGGTTTG',);

# forward frames:
   for $frame (0,1,2) {  print "frame:",$frame+1,"=",$seq->translate(-frame =>$frame)->seq,"\n"; }
# reverse frames:
  $revseq = $seq->revcom;
  for $frame (0,1,2) {  print "frame:",-1-$frame,"=",$revseq->translate(-frame =>$frame)->seq,"\n"; }

This code gives the same result as this web tool: http://www.expasy.ch/cgi-bin/dna_aa

-- Don
-- 
-- d.gilbert--bioinformatics--indiana-u--bloomington-in-47405
-- gilbertd from indiana.edu--http://marmot.bio.indiana.edu/



More information about the Bio-soft mailing list