[Bioperl-guts-l] [14835] bioperl-live/trunk/Bio/SearchIO/blast.pm: [bug 2576]
Christopher John Fields
cjfields at dev.open-bio.org
Thu Aug 28 10:59:07 EDT 2008
Revision: 14835
Author: cjfields
Date: 2008-08-28 10:59:06 -0400 (Thu, 28 Aug 2008)
Log Message:
-----------
[bug 2576]
* explicitly leave hit table block if a blank line is encountered after the hit table (passes all SearchIO.t tests)
Modified Paths:
--------------
bioperl-live/trunk/Bio/SearchIO/blast.pm
Modified: bioperl-live/trunk/Bio/SearchIO/blast.pm
===================================================================
--- bioperl-live/trunk/Bio/SearchIO/blast.pm 2008-08-27 20:44:35 UTC (rev 14834)
+++ bioperl-live/trunk/Bio/SearchIO/blast.pm 2008-08-28 14:59:06 UTC (rev 14835)
@@ -630,11 +630,18 @@
}
) if $self->{'_blsdb_letters'};
- # changed 7/15/2007 to only check certain lines, end while if something doesn't match
+ # changed 8/28/2008 to exit hit table if blank line is found after an
+ # appropriate line
my $h_regex;
+ my $seen_block;
DESCLINE:
while ( defined( my $descline = $self->_readline() ) ) {
- next if $descline =~ m{^\s*$};
+ if ($descline =~ m{^\s*$}) {
+ last DESCLINE if $seen_block;
+ next DESCLINE;
+ }
+ # any text match is part of block...
+ $seen_block++;
# GCG multiline oddness...
if ($descline =~ /^(\S+)\s+Begin:\s\d+\s+End:\s+\d+/xms) {
my ($id, $nextline) = ($1, $self->_readline);
@@ -643,9 +650,9 @@
}
# NCBI style hit table (no N)
if ($descline =~ /(?<!cor) # negative lookahead
- (\d+\.?(?:[\+\-eE]+)?\d+) # number (float or scientific notation)
+ (\d*\.?(?:[\+\-eE]+)?\d+) # number (float or scientific notation)
\s+ # space
- ([\de]+\.?\d*(?:[\+\-eE]+)?\d*) # number (float or scientific notation)
+ (\d*\.?(?:[\+\-eE]+)?\d+) # number (float or scientific notation)
\s*$/xms) {
my ( $score, $evalue ) = ($1, $2);
More information about the Bioperl-guts-l
mailing list