[Bioperl-l] writing remote blasts to file
Richard Adams
Richard.Adams@ed.ac.uk
Tue, 23 Jul 2002 12:32:18 +0100
Hello,
I'm sure I'm missing something obvious but am trying just to get a
remote blast report to file for future
import into SearchIO for parsing. Since there doesn't seem to be the
equivalent to the standaloneblast's
$factory->outfile('>OUT.blast')
I'm trying to use the TableWriter modules
e.g.,
use Bio::Tools::RemoteBlast
use Bio::SearchIO;
use Bio::SearchIO::Writer::HSPTableWriter;
$report = $factory->retrieve_blast ($rid);
#assuming retrieval has worked
$factory->remove_rid($rid);
my $writer = Bio::SearchIO::Writer::HSPTableWriter->new();
my $out = Bio::SearchIO->new (-format =>'blast',
-file =>
">OUT4.out",
-writer
=> $writer);
while ( $result = $report->next_result) {
$out->write_result($result);
Examining the contents of OUT4.out shows a listing full of 0 or 0.00
instead of the HSP details
If I use ResultTableWriter this just outputs a single integer .
But the blast did generate hits.
How can I just send the whole report to file, and/or get the
HSPTableWriter to access the data in the blast report?
I'm sure this has a trivial answer but would greatly appreciate any
assistance.
Richard Adams
Molecular Medicine Centre
University of Edinburgh
UK