[Bioperl-l] Bio::SearchIO::blast::next_result exception thrown

Andrew Stewart stewarta at nmrc.navy.mil
Thu Dec 14 18:30:11 EST 2006


I'm getting the following exception...

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: no data for midline     Posted date:  Dec 14, 2006  2:52 PM
STACK: Error::throw
STACK: Bio::Root::Root::throw /sw/lib/perl5/5.8.6/Bio/Root/Root.pm:328
STACK: Bio::SearchIO::blast::next_result /sw/lib/perl5/5.8.6/Bio/ 
SearchIO/blast.pm:1172
STACK: main::process_reports ./new_blast_script.pl:254
STACK: ./new_blast_script.pl:132
-----------------------------------------------------------


next_result is a pretty dense chunk of code to decipher.  I was  
wondering if anyone more familiar with that code might know what the  
"no data for midline $_" exception is referring to?

For context:

    1161                if( /^((Query|Sbjct):?\s+(\-?\d+)\s*)(\S+)\s+ 
(\-?\d+)/ ) {
    1162                    my ($full,$type,$start,$str,$end) = ($1, 
$2,$3,$4,$5);
    1163                    if( $str eq '-' ) {
    1164                        $i = 3 if $type eq 'Sbjct';
    1165                    } else {
    1166                        $data{$type} = $str;
    1167                    }
    1168                    $len = length($full);
    1169                    $self->{"\_$type"}->{'begin'} = $start  
unless $self->{"_$type"}->{'begin'};
    1170                    $self->{"\_$type"}->{'end'} = $end;
    1171                } else {
    1172                    $self->throw("no data for midline $_")
    1173                        unless (defined $_ && defined $len);
    1174                    $data{'Mid'} = substr($_,$len);
    1175                }


--
Andrew Stewart
Research Assistant, Genomics Team
Navy Medical Research Center (NMRC)
Biological Defense Research Directorate (BDRD)
BDRD Annex
12300 Washington Avenue, 2nd Floor
Rockville, MD 20852

email: stewarta at nmrc.navy.mil
phone: 301-231-6700 Ext 270




More information about the Bioperl-l mailing list