1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: SearchIO_exonerate.t 11525 2007-06-27 10:16:38Z sendu $
10 test_begin( -tests => 51 );
12 use_ok('Bio::SearchIO');
15 my ( $searchio, $result, $hit, $hsp );
17 $searchio = Bio::SearchIO->new(
18 -file => test_input_file('testdat.exonerate'),
19 -format => 'exonerate'
23 qw(ln27 416 Contig124 939
35 qw(ln74 644 Contig275 1296
51 while ( my $r = $searchio->next_result ) {
53 is( $r->query_name, shift @$d );
56 skip( 'no query length available in default output', 1 );
57 is( $r->query_length, $val );
61 is( $h->name, shift @$d );
64 skip( 'no hit length available in default output', 1 );
65 is( $h->length, $val );
67 while ( my $hsp = $h->next_hsp ) {
68 is( $hsp->query->start, shift @$d );
69 is( $hsp->query->end, shift @$d );
70 is( $hsp->query->strand, shift @$d );
72 is( $hsp->hit->start, shift @$d );
73 is( $hsp->hit->end, shift @$d );
74 is( $hsp->hit->strand, shift @$d );
82 $searchio = Bio::SearchIO->new(
83 -format => 'exonerate',
84 -file => test_input_file('exonerate.output.works'),
88 $searchio = Bio::SearchIO->new(
89 -format => 'exonerate',
90 -file => test_input_file('exonerate.output.dontwork'),
94 $searchio = Bio::SearchIO->new(
95 -format => 'exonerate',
96 -file => test_input_file('exonerate.whitespace_before_query.works'),
102 while( my $r = $searchio->next_result ) {
104 while(my $hit = $r->next_hit){
105 while(my $hsp = $hit->next_hsp){
109 ok($r->query_name, "query_name");
110 is($hsp_ct, shift @cts);