[Bioperl-l] translate() oddities

Stefan Kirov stefan.kirov at bms.com
Tue Apr 29 13:46:39 UTC 2008


my $frame1_obj = $seqobj->translate(-frame => 1);
not
my $frame1_obj = $seqobj->translate(frame => 1);
Stefan

Derek Gatherer wrote:
> Hi
>
> 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:
>
> >test
> ATGATGATGATGATGTGA
>
> 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";
> }
>
> Output:
>
> test length: 18
> MMMMM*
>
> 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
> MMMMM-frame
>
> 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?
>
> Cheers
> Derek
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>




More information about the Bioperl-l mailing list