Permalink
Browse files

Revert "Fixed no-hit blast bug and faulty regexs, added tests"

This reverts commit dc5696b.
  • Loading branch information...
1 parent dc5696b commit f3c0f98444fa73312727d66b1b971fa41bf304a4 @fjossandon fjossandon committed Mar 7, 2013
Showing with 23 additions and 92 deletions.
  1. +21 −22 Bio/SearchIO/blast.pm
  2. +2 −12 t/SearchIO/blast.t
  3. +0 −58 t/data/rpsblast_no_hits.bls
View
@@ -630,27 +630,6 @@ sub next_result {
'Data' => "$acc$version"
}
) if $acc;
-
- # these elements are dropped with some multiquery reports; add
- # back here
- $self->element(
- {
- 'Name' => 'BlastOutput_db-len',
- 'Data' => $self->{'_blsdb_length'}
- }
- ) if $self->{'_blsdb_length'};
- $self->element(
- {
- 'Name' => 'BlastOutput_db-let',
- 'Data' => $self->{'_blsdb_letters'}
- }
- ) if $self->{'_blsdb_letters'};
- $self->element(
- {
- 'Name' => 'BlastOutput_db',
- 'Data' => $self->{'_blsdb'}
- }
- ) if $self->{'_blsdb_letters'};
}
# added check for WU-BLAST -echofilter option (bug 2388)
elsif (/^>Unfiltered[+-]1$/) {
@@ -676,6 +655,26 @@ sub next_result {
if ( !$self->in_element('iteration') ) {
$self->start_element( { 'Name' => 'Iteration' } );
}
+ # these elements are dropped with some multiquery reports; add
+ # back here
+ $self->element(
+ {
+ 'Name' => 'BlastOutput_db-len',
+ 'Data' => $self->{'_blsdb_length'}
+ }
+ ) if $self->{'_blsdb_length'};
+ $self->element(
+ {
+ 'Name' => 'BlastOutput_db-let',
+ 'Data' => $self->{'_blsdb_letters'}
+ }
+ ) if $self->{'_blsdb_letters'};
+ $self->element(
+ {
+ 'Name' => 'BlastOutput_db',
+ 'Data' => $self->{'_blsdb'}
+ }
+ ) if $self->{'_blsdb_letters'};
# changed 8/28/2008 to exit hit table if blank line is found after an
# appropriate line
@@ -758,7 +757,7 @@ sub next_result {
}
}
- elsif (/^Database:\s*(.+?)\s*$/) {
+ elsif (/^Database:\s*(.+)$/) {
$self->debug("blast.pm: Database: $1\n");
my $db = $1;
View
@@ -8,7 +8,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin(-tests => 1360);
+ test_begin(-tests => 1357);
use_ok('Bio::SearchIO');
}
@@ -1171,7 +1171,7 @@ is( $r->algorithm, 'MEGABLAST' );
is( $r->query_name, '503384' );
is( $r->query_description, '11337 bp 2 contigs' );
is( $r->query_length, 11337 );
-is( $r->database_name, 'cneoA.nt' );
+is( $r->database_name, 'cneoA.nt ' );
is( $r->database_letters, 17206226 );
is( $r->database_entries, 4935 );
is( $r->get_statistic('querylength'), 11318 );
@@ -2211,13 +2211,3 @@ $searchio = Bio::SearchIO->new(
is ($searchio->next_result->algorithm_version, '2.2.25+', "testing Bug 3298");
is ($searchio->next_result->algorithm_version, '2.2.25+', "testing Bug 3298");
is ($searchio->next_result->algorithm_version, '2.2.25+', "testing Bug 3298");
-
-# testing for Bug #3251
-$searchio = Bio::SearchIO->new(
- '-format' => 'blast',
- '-file' => test_input_file('rpsblast_no_hits.bls')
-);
-
-is ($searchio->next_result->database_name, 'CDD.v.2.13', "testing Bug 3251");
-is ($searchio->next_result->database_name, 'CDD.v.2.13', "testing Bug 3251");
-is ($searchio->next_result->database_name, 'CDD.v.2.13', "testing Bug 3251");
@@ -1,58 +0,0 @@
-RPS-BLAST 2.2.18 [Mar-02-2008]
-
-Database: CDD.v.2.13
- 24,083 sequences; 5,982,884 total letters
-
-Searching..................................................done
-
-Query= lcl|YP_134044.1|Plus1 F 4437 4742 NC_006391 hypothetical
-protein {Haloarcula marismortui ATCC 43049}
- (101 letters)
-
- ***** No hits found ******
-
-
-Query= lcl|YP_134045.1|Plus1 F 4742 5065 NC_006391 transcription
-regulator {Haloarcula marismortui ATCC 43049}
- (107 letters)
-
- ***** No hits found ******
-
-
-Query= lcl|YP_134046.1|Plus1 F 5275 5808 NC_006391 hypothetical
-protein {Haloarcula marismortui ATCC 43049}
- (177 letters)
-
- ***** No hits found ******
-
-
- Database: CDD.v.2.13
- Posted date: Nov 8, 2007 6:30 PM
- Number of letters in database: 5,982,884
- Number of sequences in database: 24,083
-
-Lambda K H
- 0.308 0.126 0.352
-
-Gapped
-Lambda K H
- 0.267 0.0606 0.140
-
-
-Matrix: BLOSUM62
-Gap Penalties: Existence: 11, Extension: 1
-Number of Sequences: 24083
-Number of Hits to DB: 200,397,591
-Number of extensions: 14170162
-Number of successful extensions: 17150
-Number of sequences better than 1.0e-005: 6
-Number of HSP's gapped: 17124
-Number of HSP's successfully gapped: 29
-Length of database: 5,982,884
-Neighboring words threshold: 11
-Window for multiple hits: 40
-X1: 15 ( 6.7 bits)
-X2: 38 (14.6 bits)
-X3: 64 (24.7 bits)
-S1: 40 (20.8 bits)
-S2: 102 (43.3 bits)

0 comments on commit f3c0f98

Please sign in to comment.