2 ## Bioperl Test Harness Script for Modules
8 # Before `make install' is performed this script should be runnable with
9 # `make test'. After `make install' it should work as `perl test.t'
14 # to handle systems with no installed Test module
15 # we include the t dir (where a copy of Test.pm is located)
17 eval { require Test; };
26 use Bio::SeqFeature::SimilarityPair;
33 my $seq = (new Bio::SeqIO('-format' => 'fasta',
34 '-file' => Bio::Root::IO->catfile("t","data","AAC12660.fa")))->next_seq();
35 ok defined( $seq) && $seq->isa('Bio::SeqI');
36 my $blast = new Bio::SearchIO('-file'=>Bio::Root::IO->catfile("t","data","blast.report"), '-format' => 'blast');
37 ok defined ($blast) && $blast->isa('Bio::SearchIO');
38 my $r = $blast->next_result;
39 my $hit = $r->next_hit;
40 ok defined ($hit) && $hit->isa('Bio::Search::Hit::HitI'), 1, ' hit is ' . ref($hit);
41 my $sim_pair = $hit->next_hsp;
42 ok defined($sim_pair) && $sim_pair->isa('Bio::SeqFeatureI');
43 $seq->add_SeqFeature($sim_pair);
44 ok $seq->all_SeqFeatures() == 1;