Bio::DB::Expression: move to defunct bioperl-microarray
[bioperl-live.git] / t / SearchIO / Writer / HTMLWriter.t
blob20ac6370eae4db4faee39c0f3a552a13a5ec89ad
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: SearchIO_HTMLWriter.t 14995 2008-11-16 06:20:00Z cjfields $
4 use strict;
6 BEGIN {
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 8);
11     
12     use_ok('Bio::SearchIO');
13     use_ok('Bio::SearchIO::Writer::HTMLResultWriter');
16 my ($searchio, $result,$iter,$hit,$hsp);
18 $searchio = Bio::SearchIO->new('-format' => 'blast',
19                    '-file'   => test_input_file('HUMBETGLOA.tblastx'));
21 $result = $searchio->next_result;
23 isa_ok($result,'Bio::Search::Result::ResultI');
24 $hit = $result->next_hit;
25 is($hit->accession, 'AE000479');
26 is($hit->bits, 33.6);
27 $hsp = $hit->next_hsp;
28 is($hit->hsp->bits,$hsp->bits);
29 isa_ok($hsp->get_aln,'Bio::Align::AlignI');
31 my $outfile = test_output_file();
32 my $writerhtml = Bio::SearchIO::Writer::HTMLResultWriter->new();
33 my $outhtml = Bio::SearchIO->new(-writer => $writerhtml,
34                 -file   => ">$outfile");
35 $outhtml->write_result($result, 1);
36 ok(-s $outfile);
38 # tests checking HTML file output?