[Bioperl-l] HTMLResultWriter

lpaulet at ual.es lpaulet at ual.es
Mon Jan 25 15:31:08 EST 2010

Hi all,

I'm trying to generate a subroutine that performs a BLAST search and  
returns the corresponding reports in txt, xml and html format. I´m  
experiencing problems with the latter, as the program returns the  
following error message:

"Can't call method "next_result" without a package or object reference at..."

sub blasting    {
my ($query, $E_value) = @_;
my ($outputfilenameB, $outputfilenameX, $outputfilenameH);
#legacy_blast.pl blastall -i query -d nr -o blast.out --path /opt/blast/bin
print qx(du -s /tmp);
my $blast_report =qx/$blast -p blastp -d $database -i $query -e  
$E_value -b 20000 -o $outputfilenameB/;
my $XMLblast_report =qx/$blast -p blastp -d $database -i $query -e  
$E_value -m 7 -b 20000 -o $outputfilenameX/;

my $writerhtml = new Bio::SearchIO::Writer::HTMLResultWriter();
my $outhtml = new Bio::SearchIO(-writer => $writerhtml,
                                  -file   => ">$outputfilenameH");
while( my $result = $blast_report->next_result ) { # get a result from  
Bio::SearchIO parsing or build it up in memory

Can anyone  see where the problem is?

More information about the Bioperl-l mailing list