[Bioperl-l] Bio:Seq->translate with orf=1; behavior change between 1.5 and 1.6

Fields, Christopher J cjfields at illinois.edu
Thu Mar 19 01:01:48 UTC 2015


No, but I can work on cherry-picking over relevant commits to the v1.6x branch (which has Bio::Root modules).  That’s where the 1.6x releases are made from, not ‘master’.

chris

> On Mar 18, 2015, at 7:17 PM, Mark A. Jensen <maj at fortinbras.us> wrote:
> 
> Hi Colin,
> This is now fixed (I hope) at https://github.com/bioperl/bioperl-live/commit/9fb341c333b6b532308ebb4f2feef5a90382aab7. Added a couple of tests to t/Seq/PrimarySeq.t to make sure. If you look at the commit, it's pretty easy to patch Bio/PrimarySeqI.pm by hand (not ideal...but...sigh)
> (CJF - is it worth patching the 1.6.924 tag?)
> MAJ
> 
> On 2015-03-16 23:08, Mark A. Jensen wrote:
>> Colin - This looks like a bug; the pod states
>> 
>> "if you want translate() to find the first initiation
>>  codon and return the corresponding protein:
>> 
>>  $protein_seq_obj = $cds_seq_obj->translate(-orf => 1);"
>> 
>> but the orf-finding routine appears to stop at the first _termination_
>> codon (which is at bp 8 - TAA) and kicks out the "orf" M*.
>> 
>> I have created https://github.com/bioperl/bioperl-live/issues/105.
>> 
>> (Good test sequence, BTW)
>> 
>> MAJ
>> 
>> 
>> 
>> On 2015-03-03 20:13, Wilson, Colin (CC) wrote:
>>> I've got an older application that I'm migrating from BioPerl 1.5 to
>>> 1.6.923, and it didn't pass testing due to a change in the behavior of
>>> Bio:Seq::translate between 1.5 and 1.6
>>> 
>>> Per  the bioperl documentation Seq->translate(-orf=> 1) should return
>>> the first orf in a sequence.   It appears to be returning the orf
>>> upstream of the first stop codon, so an internal out of frame orf is
>>> found instead of a full length orf.
>>> 
>>> Here's my test code.   It passes in 1.5, fails in 1.6.  Is there a
>>> switch or different parameter to get the old behavior?  Is this a bug
>>> or intentional change in translate?
>>> ------------
>>> use strict;
>>> use Bio::Seq;
>>> 
>>> my ($bs, $prot, $orf0, $orf1, $orf) ;
>>> $bs = Bio::Seq->new( -seq           => "ATGAATGTAAATAA",
>>> 		   -display_id       => "TestSequence",
>>> 		   -alphabet         => 'dna' );
>>> 
>>> $orf0 = $bs->translate(-frame=>0);
>>> $orf1 = $bs->translate(-frame=>1);
>>> 
>>> # should output MNVN orf that starts in frame 0, not M* orf that
>>> starts in frame 1
>>> $orf = $bs->translate(-orf=>1, -start=> 'atg');
>>> if ($orf0->seq eq $orf->seq) {
>>>        print "PASS";
>>> }
>>> else {
>>>    print $orf0->seq . " != " . $orf->seq . "\n";
>>> }
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at mailman.open-bio.org
>>> http://mailman.open-bio.org/mailman/listinfo/bioperl-l
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list