[Bioperl-l] bug in Bio::SearchIO::Writer::HTMLResultWriter ?

Jason Stajich jason at bioperl.org
Fri Apr 3 01:09:20 UTC 2009


looking at the code - it doesn't seem to accept resetting the default  
value.
sub end_report {
     return "</BODY>\n</HTML>\n";
}

sub footer {
     my ($self) = @_;
     return "<hr><h5>Produced by Bioperl module ".ref($self)." on  
$DATE<br>Revision: $Revision</h5>\n"

}

So just adjusting it to mirror what is happening for title and the  
rest would be necessary.

-jason
On Apr 2, 2009, at 5:46 PM, Smithies, Russell wrote:

> I'm re-formatting some blast output into nice html webpages but am  
> finding $self->end_report() and $self->footer() don't seem to be  
> working.
> The other methods ($self->start_report, $self->introduction, $self- 
> >title) all work fine.
> Am I doing something wrong or is there a trick to it?
>
> Here's some test code:
> ==================================
>
> #!perl -w
>
> use Bio::SearchIO;
> use Bio::SearchIO::Writer::HTMLResultWriter;
> use CGI qw(:standard);
>
>
> my $in = Bio::SearchIO->new(-format => "blast",-file   => shift  
> @ARGV, );
>
> my $index = Bio::SearchIO::Writer::HTMLResultWriter->new();
>
> $index->start_report( \&my_start_report );
> $index->title( \&my_title );
> $index->footer(\&my_footer);
> $index->end_report(\&my_end_report);
>
> my $out = Bio::SearchIO->new(-writer => $index, -file =>  
> ">blast.htm");
>
> $out->write_result($in->next_result);
>
>
> sub my_start_report{
> 	return h1('this is my header');
> }
>
> sub my_title{
> 	return h1('this is my title');
> }
>
> sub my_footer{
>    my ($self) = @_;
>    return h2('this is a footer');
> }
>
> sub my_end_report {
>    return h2('this is the end');
> }
>
> =================================
>
> Thanx,
>
>
> Russell Smithies
>
> Bioinformatics Applications Developer
> T +64 3 489 9085
> E  russell.smithies at agresearch.co.nz
>
> Invermay  Research Centre
> Puddle Alley,
> Mosgiel,
> New Zealand
> T  +64 3 489 3809
> F  +64 3 489 9174
> www.agresearch.co.nz
>
>
>
> = 
> ======================================================================
> Attention: The information contained in this message and/or  
> attachments
> from AgResearch Limited is intended only for the persons or entities
> to which it is addressed and may contain confidential and/or  
> privileged
> material. Any review, retransmission, dissemination or other use of,  
> or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipients is prohibited by  
> AgResearch
> Limited. If you have received this message in error, please notify the
> sender immediately.
> = 
> ======================================================================
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Jason Stajich
jason at bioperl.org






More information about the Bioperl-l mailing list