Permalink
Browse files

Merge branch 'topic/bug-3376'

  • Loading branch information...
2 parents 09f5ae8 + 76d7e17 commit 142e5d79e3a6593db32bf0af99048f47d01bd3f2 @pcantalupo pcantalupo committed Nov 17, 2012
Showing with 54 additions and 2 deletions.
  1. +2 −1 Bio/SearchIO/hmmer2.pm
  2. +14 −1 t/SearchIO/hmmer.t
  3. +38 −0 t/data/pfamOutput-bug3376.out
View
3 Bio/SearchIO/hmmer2.pm
@@ -862,7 +862,8 @@ sub next_result {
}
elsif (CORE::length($_) == 0
|| ( $count != 1 && /^\s+$/o )
- || /^\s+\-?\*\s*$/ )
+ || /^\s+\-?\*\s*$/
+ || /^.+\-\s+\-\s*$/ )
{
next;
}
View
15 t/SearchIO/hmmer.t
@@ -7,7 +7,7 @@ BEGIN {
use lib '.';
use Bio::Root::Test;
- test_begin(-tests => 299);
+ test_begin(-tests => 300);
use_ok('Bio::SearchIO');
}
@@ -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
+
View
38 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.