[Bioperl-l] Blast html report
Vilanova,David,LAUSANNE,NRC/BS
david.vilanova@rdls.nestle.com
Fri, 5 Apr 2002 15:10:38 +0200
Hi,
I have a multiple sequence fasta file. I'm running a blast for each sequence
and parsing the output. I'm also trying to generate with the same script the
html report
using the parameter :blast->T(T) for each sequence I blast.
The thing is that I launch the blast using standalone and parse it with
searchIO directly without generating an intermediate blast output but than
bioperl tries to parse the new "html object"(normal ) and fails...
use Bio::SeqIO; # manipulate sequences
use Bio::Tools::Run::StandAloneBlast; # Launch blast
use Bio::SearchIO ;#new Bioperl 1.0
begining of script skip............
.................................
..............................
my $blast = Bio::Tools::Run::StandAloneBlast->new(
database => 'databse.fasta',
program => 'blastn',
'_READMETHOD' => 'Blast',
);
#More blast parameters
$blast->a(2); #nb of cpu
#$blast->T(T); # create blast output
#$blast->e(0.0000000001); #e-10
while ( $seq = $Seq_in->next_seq() )
{
my $blast_output = $blast->blastall($seq);
$name = $seq->id();
$output = './files/'.$name.".html";
$blast->o($output); #Create html output file
print HTML_INDEX ("<tr><A
HREF='$output'>$name</A></tr> ");
while (my $result = $blast_output->next_result()) {
# Get info about the entire report
my $query_name = $result->query_name();
# get info about each hit
my ($hit, $hsp);
while ($hit = $result->next_hit()) {
my $hit_name = $hit->name()
;
my $hit_description =
$hit->description();
my $hit_rawscore =
$hit->raw_score();
my $hit_length = $hit->lengt
}
}
}
...........
.........end of script
Here is the error....
------------- EXCEPTION -------------
MSG: no data for midline <PRE>
STACK Bio::SearchIO::blast::next_result
/usr/lib/perl5/site_perl/5.6.1/Bio/SearchIO/blast.pm:486
STACK toplevel Blast_and_parse_all_bioperl_1_create_html_report.pl:85
It looks like It's trying to parse an html report but I just want to create
an html output of each blast.
Does anybody know why ???
David Vilanova