1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: SearchIO_HTMLWriter.t 14995 2008-11-16 06:20:00Z cjfields $
9 test_begin(-tests => 8);
11 use_ok('Bio::SearchIO');
12 use_ok('Bio::SearchIO::Writer::HTMLResultWriter');
15 my ($searchio, $result,$iter,$hit,$hsp);
17 $searchio = Bio::SearchIO->new('-format' => 'blast',
18 '-file' => test_input_file('HUMBETGLOA.tblastx'));
20 $result = $searchio->next_result;
22 isa_ok($result,'Bio::Search::Result::ResultI');
23 $hit = $result->next_hit;
24 is($hit->accession, 'AE000479');
26 $hsp = $hit->next_hsp;
27 is($hit->hsp->bits,$hsp->bits);
28 isa_ok($hsp->get_aln,'Bio::Align::AlignI');
30 my $outfile = test_output_file();
31 my $writerhtml = Bio::SearchIO::Writer::HTMLResultWriter->new();
32 my $outhtml = Bio::SearchIO->new(-writer => $writerhtml,
33 -file => ">$outfile");
34 $outhtml->write_result($result, 1);
37 # tests checking HTML file output?