[Bioperl-l] translate() oddities

Chris Fields cjfields at uiuc.edu
Tue Apr 29 11:07:30 EDT 2008


As an aside, I've been playing around with perl6 (Rakudo) for a bit  
now.  Parameter-like passing (using autoaccessors and other means)  
will be added in soon, so you will be able to do this:

$seqobj = Seq.new(seq => 'ATGATGATGATGATGTGA', alphabet => 'dna');
my $protobj = $seq.translate(frame => 1);

Yes, I'm a geek. ; >

chris

On Apr 29, 2008, at 8:46 AM, Stefan Kirov wrote:

> 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
>>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list