[Bioperl-l] problem with SearchIO and writer
diriano at uni-potsdam.de
diriano at uni-potsdam.de
Tue Mar 11 14:25:19 UTC 2008
Dear all,
Please excuse my previous e-mail, it was incomplete, here it is again:
I have a small problem parsing a BLAST report with SearchIO and using
TextResultWriter.
I have a large file with several BLAST results, I instantiate SearchIO as:
my $searchio = new Bio::SearchIO ('-format' => 'blast', '-file' =>
"$blastFile");
##then I extract each individual report as
while (my $result = $searchio->next_result){
my $writertxt = Bio::SearchIO::Writer::TextResultWriter->new();
my $blastresult=$writertxt->to_string($result);
while (my $hit = $result->next_hit){
print $hit->name."\n"; #I will do further processing of the HSPs
}
}
But I do not get any output. It works if I comment the lines referencing the
$writertxt. The problem is that I need to extract the whole report to later
insert it ($blastresult) into a database. But I also need to process each hit
and hsp.
Any idea how can I accomplish this? Any help will be greatly appreciated.
Have a nice day,
Diego
--
Diego Mauricio Riano Pachon
Biologist
Institute of Biology and Biochemistry
University of Potsdam
Karl-Liebknecht-Str. 24-25
Haus 20
14476 Golm
Germany
Tel:0331/977-2809
http://www.geocities.com/dmrp.geo/
More information about the Bioperl-l
mailing list