[Bioperl-l] translate() oddities

Derek Gatherer d.gatherer at mrcvu.gla.ac.uk
Tue Apr 29 08:21:05 EDT 2008


I thought I'd better run this by the community before I embarrass 
myself on Bugzilla.  It seems like a clear bug to me.  I'm running 
Bioperl 1.5.0 on RedHat.

For a test input:


the following code is fine.

while((my $seqobj = $seq_in->next_seq()))
     print "\n".$seqobj->display_id;
     my $len  = $seqobj->length();
     print " length: $len";
     my $frame1_obj = $seqobj->translate();
     my $f1_prot = $frame1_obj->seq();
     print "\n$f1_prot";


test length: 18

But if I want to change the frame as specified in the BioPerl 
tutorial, by using:

my $frame1_obj = $seqobj->translate(frame => 1); # which should now 
give frame 2, I get:

test length: 18

The frame is unchanged and the text "-frame" is tacked on the end of 
the output.  The same occurs with translate(frame => 2).

Any ideas?  Can something as fundamental as translate() really be 
bugged?  or am I guilty of some particularly heinous syntax error?


More information about the Bioperl-l mailing list