[Bioperl-l] problem with trunc_with_features (SeqUtils.pm)

Fields, Christopher J cjfields at illinois.edu
Wed Apr 11 11:28:38 EDT 2012


Okay, closed it.  Thanks again!

chris

On Apr 11, 2012, at 5:55 AM, Roy Chaudhuri wrote:

> Hi Chris,
> 
> I think it should be fine to close, but my account doesn't have permission to do so.
> 
> Cheers,
> Roy.
> 
> On 10/04/2012 18:08, Fields, Christopher J wrote:
>> I have committed these to bioperl-live, they passed tests for me.  I
>> have left the bug report open, however, in case more work needs to be
>> done.  Roy, did you want to close that when you are ready?
>> 
>> chris
>> 
>> On Apr 10, 2012, at 10:34 AM, Heath O'Brien wrote:
>> 
>>> Works perfect for me. Thanks!
>>> 
>>> all good things, Heath
>>> 
>>> On 10-Apr-12, at 10:45 AM, Roy Chaudhuri wrote:
>>> 
>>>> Turns out I spoke too soon, I added in some new tests and they
>>>> highlighted problems with both trunc_with_features and
>>>> revcom_with_features. I think I have resolved all the issues in
>>>> the most recent Redmine patch - Frank, Heath, please could you
>>>> check that it works for you?
>>>> 
>>>> Cheers, Roy.
>>>> 
>>>> On 10/04/2012 12:52, Frank Schwach wrote:
>>>>> Brilliant, thanks Roy! Frank
>>>>> 
>>>>> 
>>>>> On 10/04/12 12:10, Roy Chaudhuri wrote:
>>>>>> Hi Heath, Frank,
>>>>>> 
>>>>>> This was probably my fault back in the mists of time. Looks
>>>>>> like an easy fix though, I've reported the issue on Redmine
>>>>>> and submitted a patch:
>>>>>> https://redmine.open-bio.org/issues/3339
>>>>>> 
>>>>>> We should probably also add Heath's example as a test case.
>>>>>> 
>>>>>> Cheers, Roy.
>>>>>> 
>>>>>> On 10/04/2012 09:42, Frank Schwach wrote:
>>>>>>> Hi Heath,
>>>>>>> 
>>>>>>> Yes, I just had a look too and it's true that it would
>>>>>>> currently ignore the original type. I had added some new
>>>>>>> methods (delete, insert, ligate) and with those the
>>>>>>> location type is preserved but not with the already
>>>>>>> existing methods like trunc_with_features. I will look into
>>>>>>> it when I have some time and make some changes.
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> 
>>>>>>> Frank
>>>>>>> 
>>>>>>> 
>>>>>>> On 09/04/12 22:37, Heath O'Brien wrote:
>>>>>>>> Hi Frank,
>>>>>>>> 
>>>>>>>> I just tried it with the latest version from
>>>>>>>> bioperl-live, and it worked the way I described in my
>>>>>>>> email.
>>>>>>>> 
>>>>>>>> all good things, Heath
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 9-Apr-12, at 5:21 PM, Frank Schwach wrote:
>>>>>>>> 
>>>>>>>>> Hi Heath,
>>>>>>>>> 
>>>>>>>>> I have recently worked a bit on that module and
>>>>>>>>> contributed the code to bioperl-live. I think this
>>>>>>>>> behaviour may already have changed but I'm not 100%
>>>>>>>>> sure at the moment. When I have some time I will
>>>>>>>>> review the code to confirm. In the meantime, you could
>>>>>>>>> give it a go with the bioperl-live version if that's an
>>>>>>>>> option for you?
>>>>>>>>> 
>>>>>>>>> Cheers,
>>>>>>>>> 
>>>>>>>>> Frank
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 03/04/12 17:56, Heath O'Brien wrote:
>>>>>>>>>> Hi All,
>>>>>>>>>> 
>>>>>>>>>> I've encountered a bug in the trunc_with_features
>>>>>>>>>> function in SeqUtils.pm, or at least behavior that
>>>>>>>>>> was unexpected to me:
>>>>>>>>>> 
>>>>>>>>>> Features with fuzzy coordinates in the original
>>>>>>>>>> sequence are converted to exact coordinates in the
>>>>>>>>>> truncated sequence. For example, the script below
>>>>>>>>>> changes the coordinates for the feature from<1..5 to
>>>>>>>>>> 1..5.
>>>>>>>>>> 
>>>>>>>>>> I have modified the code to change this behavior on
>>>>>>>>>> my system, but I thought I'd post something here in
>>>>>>>>>> case others encounter the same problem.
>>>>>>>>>> 
>>>>>>>>>> all good things, Heath
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> #!/usr/bin/perl -w
>>>>>>>>>> 
>>>>>>>>>> use strict; use warnings; use Bio::SeqIO; use
>>>>>>>>>> Bio::SeqUtils;
>>>>>>>>>> 
>>>>>>>>>> my $infile= shift;
>>>>>>>>>> 
>>>>>>>>>> my $inIO = Bio::SeqIO->new('-file' =>   $infile,
>>>>>>>>>> '-format' =>   'genbank') or die "could not open seq
>>>>>>>>>> file $infile\n";
>>>>>>>>>> 
>>>>>>>>>> my $outfile = $infile . '_out.gbk';
>>>>>>>>>> 
>>>>>>>>>> my $outIO = Bio::SeqIO->new('-file' =>
>>>>>>>>>> ">$outfile", '-format' =>   'genbank') or die "could
>>>>>>>>>> not open seq file $outfile\n";
>>>>>>>>>> 
>>>>>>>>>> my $in_seq = $inIO->next_seq; my $out_seq =
>>>>>>>>>> Bio::SeqUtils->trunc_with_features($in_seq, 1, 5);
>>>>>>>>>> $outIO->write_seq($out_seq); exit;
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> LOCUS test_sequence 57303 bp DNA linear UNA
>>>>>>>>>> DEFINITION Sequence to demonstrate unexpected
>>>>>>>>>> behavior of trunc_with_features ACCESSION unknown
>>>>>>>>>> KEYWORDS . FEATURES Location/Qualifiers source 1..10
>>>>>>>>>> /mol_type="genomic DNA" gene<1..5 /gene="test"
>>>>>>>>>> CDS<1..5 /product="hypothetical protein" ORIGIN 1
>>>>>>>>>> caagattaaa //
>>>>>>>>>> 
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Bioperl-l mailing list Bioperl-l at lists.open-bio.org
>>>>>>>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -- The Wellcome Trust Sanger Institute is operated by
>>>>>>>>> Genome Research Limited, a charity registered in
>>>>>>>>> England with number 1021457 and a company registered in
>>>>>>>>> England with number 2742969, whose registered office is
>>>>>>>>> 215 Euston Road, London, NW1 2BE.
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> _______________________________________________ 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