Added 'DB_File' requirement to some tests files that use it,
[bioperl-live.git] / t / SearchIO / SimilarityPair.t
blob476182cb9e7e6885b063fa1216e4412e583f23ad
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {     
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 12);
11         
12         use_ok('Bio::SearchIO');
13         use_ok('Bio::SeqIO');
16 # test SimilarityPair
18 ok my $seq = (Bio::SeqIO->new('-format' => 'fasta',
19                           '-file' => test_input_file('AAC12660.fa')))->next_seq();
20 isa_ok $seq, 'Bio::SeqI';
21 ok my $blast = Bio::SearchIO->new('-file'=>test_input_file('blast.report'), '-format' => 'blast');
22 isa_ok $blast, 'Bio::SearchIO';
23 my $r = $blast->next_result;
24 ok my $hit = $r->next_hit;
25 isa_ok $hit, 'Bio::Search::Hit::HitI';
26 ok my $sim_pair = $hit->next_hsp;
27 isa_ok $sim_pair, 'Bio::SeqFeatureI';
28 ok $seq->add_SeqFeature($sim_pair);
29 is $seq->all_SeqFeatures(), 1;