1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin(-tests => 19);
11 use_ok('Bio::SearchIO');
14 my $axtparser = Bio::SearchIO->new(-format => 'axt',
15 -file => test_input_file('test_data.axt'));
17 my $result = $axtparser->next_result;
18 is($result->query_name, 'chr19');
20 my $hit = $result->next_hit;
21 is($hit->name, 'chr11');
23 my $hsp = $hit->next_hsp;
24 is($hsp->query->start,3001012);
25 is($hsp->query->end,3001075);
26 is($hsp->query->length, 64);
27 is($hsp->query->strand, 1);
29 is($hsp->hit->start,70568380);
30 is($hsp->hit->end,70568443);
31 is($hsp->hit->length, 64);
32 is($hsp->hit->strand, -1);
34 # next HSP returns next alignment, but shouldn't this be the next_hit instead????
35 # what happens if the hit name changes?
37 $hsp = $hit->next_hsp;
38 is($hsp->query->start,3008279);
39 is($hsp->query->end,3008357);
40 is($hsp->query->length, 79);
41 is($hsp->query->strand, 1);
43 is($hsp->hit->start,70573976);
44 is($hsp->hit->end,70574054);
45 is($hsp->hit->length, 79);
46 is($hsp->hit->strand, -1);