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

Jason Stajich jason.stajich at duke.edu
Tue Sep 14 09:35:01 EDT 2004


2 ways.

1.
Set verbose = 1
@paras = ( -verbose => 1, .... rest of your params);

my $plaintextfile = $factory->file;

This will be the filename where the temp report is stored, this is 
overwritten on each blast retrieval.

2. use Bio::SearchIO::Writer::TextResultWriter to turn the SearchIO 
object back into a Text Report (or use HTMLResultWriter to make it 
HTML).


On Sep 14, 2004, at 9:00 AM, Nathan Haigh wrote:

> 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()
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/



More information about the Bioperl-l mailing list