Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'topic/bug-3376'
  • Loading branch information
pcantalupo committed Nov 17, 2012
2 parents 09f5ae8 + 76d7e17 commit 142e5d7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Bio/SearchIO/hmmer2.pm
Expand Up @@ -862,7 +862,8 @@ sub next_result {
}
elsif (CORE::length($_) == 0
|| ( $count != 1 && /^\s+$/o )
|| /^\s+\-?\*\s*$/ )
|| /^\s+\-?\*\s*$/
|| /^.+\-\s+\-\s*$/ )
{
next;
}
Expand Down
15 changes: 14 additions & 1 deletion t/SearchIO/hmmer.t
Expand Up @@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;

test_begin(-tests => 299);
test_begin(-tests => 300);

use_ok('Bio::SearchIO');
}
Expand Down Expand Up @@ -401,3 +401,16 @@ is(ref($searchio), 'Bio::SearchIO::hmmer2', 'Check if reading from a pipe works'
$result = $searchio->next_result;
is(ref($result), 'Bio::Search::Result::HMMERResult', 'Check for the correct result reference type');
is($result->num_hits(), 2, 'Check num_hits');

# bug 3376
{
my $in = Bio::SearchIO->new(-format => 'hmmer',
-file => test_input_file('pfamOutput-bug3376.out')
);
my $result = $in->next_result;
my $hit = $result->next_hit;
my $hsp = $hit->next_hsp;
is($hsp->hit_string,"svfqqqqssksttgstvtAiAiAigYRYRYRAvtWnsGsLssGvnDnDnDqqsdgLYtiYYsvtvpssslpsqtviHHHaHkasstkiiikiePr","bug3376");
}
# end bug 3376

38 changes: 38 additions & 0 deletions t/data/pfamOutput-bug3376.out
@@ -0,0 +1,38 @@
hmmpfam - search one or more sequences against HMM database
HMMER 2.3.2 (Oct 2003)
Copyright (C) 1992-2003 HHMI/Washington University School of Medicine
Freely distributed under the GNU General Public License (GPL)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HMM file: testInput.hmm
Sequence file: testInput.fasta
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Query sequence: Test
Accession: [none]
Description: [none]

Scores for sequence family classification (score includes all domains):
Model Description Score E-value N
-------- ----------- ----- ------- ---
TEST 184.7 2.5e-56 1

Parsed for domains:
Model Domain seq-f seq-t hmm-f hmm-t score E-value
-------- ------- ----- ----- ----- ----- ----- -------
TEST 1/1 8 97 .] 1 95 [] 184.7 2.5e-56

Alignments of top-scoring domains:
TEST: domain 1 of 1, from 8 to 97: score 184.7, E = 2.5e-56
*->svfqqqqssksttgstvtAiAiAigYRYRYRAvtWnsGsLssGvnDn
sv+qqqq+ + +vtAiAiAigYRYRYRAv Wn GsLs G nDn
Test 8 SVYQQQQGGSA----MVTAIAIAIGYRYRYRAVVWNKGSLSTGTNDN 50

DnDqqsdgLYtiYYsvtvpssslpsqtviHHHaHkasstkiiikiePr<-
DnDq +d LYtiYYsvtv +ss+p q+v+HHHaH+asstkiiiki P
Test 51 DNDQAAD-LYTIYYSVTVSASSWPGQSVTHHHAHPASSTKIIIKIAPS 97

*

Test - -

//

0 comments on commit 142e5d7

Please sign in to comment.