3 # ## Bioperl Test Harness Script for Modules
6 my $verbose = $ENV{'BIOPERLDEBUG'} || 0;
8 eval { require Test
; };
15 plan tests => $NTESTS;
19 foreach ( $Test::ntest..$NTESTS ) {
20 skip('Unable to run Blat tests, exe may not be installed',1);
24 use Bio::Tools::Run::Alignment::Blat;
29 my $db = Bio::Root::IO->catfile("t","data","blat_dna.fa");
31 my $query = Bio::Root::IO->catfile("t","data","blat_dna.fa");
33 my $factory = Bio::Tools::Run::Alignment::Blat->new('quiet' => 1,
36 ok $factory->isa('Bio::Tools::Run::Alignment::Blat');
38 my $blat_present = $factory->executable();
40 unless ($blat_present) {
41 warn("blat program not found. Skipping tests $Test::ntest to $NTESTS.\n");
45 my $searchio = $factory->align($query);
46 my $result = $searchio->next_result;
47 my $hit = $result->next_hit;
48 my $hsp = $hit->next_hsp;
49 ok $hsp->isa("Bio::Search::HSP::HSPI");
50 ok ($hsp->query->start,1);
51 ok ($hsp->query->end,1775);
52 ok ($hsp->hit->start,1);
53 ok ($hsp->hit->end,1775);
54 my $sio = Bio::SeqIO->new(-file=>$query,-format=>'fasta');
56 my $seq = $sio->next_seq ;
58 $searchio = $factory->align($seq);
59 $result = $searchio->next_result;
60 $hit = $result->next_hit;
61 $hsp = $hit->next_hsp;
62 ok $hsp->isa("Bio::Search::HSP::HSPI");
63 ok ($hsp->query->start,1);
64 ok ($hsp->query->end,1775);
65 ok ($hsp->hit->start,1);
66 ok ($hsp->hit->end,1775);