[Bioperl-l] Problems with Unflattener.pm

Barry Moore barry.moore at genetics.utah.edu
Tue May 23 01:00:06 UTC 2006


Hi All,

NT_113910 appears to throw Bio::SeqFeatures::Tools::Unflattener into  
an infinite recursive loop.  The trouble occurs in the method  
find_best_matches between lines 2258 and 2281, and in particular the  
loop is perpetuated by line 2273.   NT_113910 has a fairly complex  
features table, and but I have as yet been unable to figure out why  
this loop is not exiting properly.  This has been submitted to  
bugzilla, but I’ll post here so it gets documented on the list also.   
Any suggestions from Chris or others would be greatly appreciated.

This problem can be recreated as follows:

Grab NT_113910 from genbank.
bp_fetch.pl -fmt genbank net::genbank:NT_113910 > NT_113910.gbk

Pass NT_113910.gbk on the command line to the attached script.



#!/usr/bin/perl;

use strict;
use warnings;

use Bio::SeqIO;
use Bio::SeqFeature::Tools::Unflattener;

my $file = shift;

# generate an Unflattener object
my $unflattener = Bio::SeqFeature::Tools::Unflattener->new;
#$unflattener->verbose(1);

# first fetch a genbank SeqI object
my $seqio =
     Bio::SeqIO->new(-file   => $file,
                     -format => 'GenBank');
my $out =
     Bio::SeqIO->new(-format => 'asciitree');
while (my $seq = $seqio->next_seq()) {

         # get top level unflattended SeqFeatureI objects
         $unflattener->unflatten_seq(-seq       => $seq,
                                     -use_magic => 1);
         $out->write_seq($seq);
}





More information about the Bioperl-l mailing list