[Bioperl-l] remote blast - plain text blast report

Nathan Haigh nathanhaigh at ukonline.co.uk
Tue Sep 14 09:00:15 EDT 2004


Hi,

I am running a remote BLAST, and I just want to be able to get the plain
text version of the report as returned from NCBI - how do I do this?
Some previous code I had, was a follows - how should I modify this to enable
me to get the plain text report in a string?

Thanks
Nathan

my @params = (
                    -prog       => $blast_prog,
                    -expect     => $blast_expect,
                    -readmethod => 'SearchIO',
                    -database   => $blast_database,
);
my $factory = Bio::Tools::Run::RemoteBlast->new(@params);

$Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'} = $blast_entrez_query;
$Bio::Tools::Run::RemoteBlast::HEADER{'MATRIX_NAME'} = $blast_matrix;

my $r = $factory->submit_blast($seq_array_ref);

while (my @rids = $factory->each_rid ) {
        foreach my $rid ( @rids ) {
                my $rc = $factory->retrieve_blast($rid);
                if ( !ref($rc) ) {
                    if ($rc<0) {
                        $factory->remove_rid($rid);     # the sequence
failed for some reason!
                    }
                    sleep 5;    	# wait 5 secs before making another
request
                } else {
                    my $result = $rc->next_result();
                    push @results, $result;
                    $factory->remove_rid($rid);
                }
        }
}

# at this point @results stores the results of all the submitted seqs as
returned from $rc->next_result()





More information about the Bioperl-l mailing list