[Bioperl-l] remoteblast result in text format

Wiepert, Mathieu Wiepert.Mathieu@mayo.edu
Tue, 17 Sep 2002 17:51:08 -0500


I should have that committed later tonight...

-----Original Message-----
From: Damien Mattei
To: Wiepert, Mathieu
Cc: bioperl-l@bioperl.org
Sent: 9/17/2002 4:56 PM
Subject: Re: [Bioperl-l] remoteblast result in text format

Yes it's exactly what i need.

Thanks.

I haven't yet find time to test it and  i want to run it with 
nucleotide, not protein but i think it will be good if i change blastp 
to blastn and all the PARAMs description should be available at NCBI or 
in bioperl doc.

You can send me your modified RemoteBlast program i will test it as soon

as possible, it would be a good idea too to have it included in bioperl 
as it could be usefull sometimes to have the raw output of a remote
blast.

Thanks again.

Damien

Wiepert, Mathieu wrote:
> Hi,
> 
> I am not quite sure what you mean by this request.  Are you saying
that you want to get the raw blast output?  If so, I can send you a
modified RemoteBlast file that you can try.  I have been using it for
about a week, testing it before I commit it to Bioperl.  
> 
> It is invoked like
> 
> $factory->save_output($rid, $filename);
> 
> Here is a sample script, assuming that you pass in a sequence file.
The parameters set are the same as from the short nearly exact protein
match blast page at NCBI, filtered for Homo Sapiens:
> 
> my $factory = Bio::Tools::Run::RemoteBlast->new();
> $Bio::Tools::Run::RemoteBlast::HEADER{'PROGRAM'} = 'blastp';
> $Bio::Tools::Run::RemoteBlast::HEADER{'DATABASE'} = 'nr';
> $Bio::Tools::Run::RemoteBlast::HEADER{'EXPECT'} = '200000';
> $Bio::Tools::Run::RemoteBlast::HEADER{'MATRIX_NAME'} = 'PAM30';
> $Bio::Tools::Run::RemoteBlast::HEADER{'GAPCOSTS'} = '9 1';
> $Bio::Tools::Run::RemoteBlast::HEADER{'WORD_SIZE'} = '2';
> $Bio::Tools::Run::RemoteBlast::HEADER{'NCBI_GI'} = 'on';
> $Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'} = 'Homo sapiens
[ORGN]';
> #Have to request the blast with the right amount of alignments, 
> $Bio::Tools::Run::RemoteBlast::HEADER{'ALIGNMENTS'} = '1000';
> $Bio::Tools::Run::RemoteBlast::HEADER{'DESCRIPTIONS'} = '1000';
> #and then retrieve it that way as well
> $Bio::Tools::Run::RemoteBlast::RETRIEVALHEADER{'ALIGNMENTS'} = '1000';
> $Bio::Tools::Run::RemoteBlast::RETRIEVALHEADER{'DESCRIPTIONS'} =
'1000';
> $Bio::Tools::Run::RemoteBlast::RETRIEVALHEADER{'FORMAT_TYPE'} =
'Text';
> 
> my $r = $factory->submit_blast($inseqfile);
> print STDERR "waiting..." if( $v > 0 );
> while ( my @rids = $factory->each_rid ) {
>   foreach my $rid ( @rids ) {
>     my $rc = $factory->retrieve_blast($rid);
>     if( !ref($rc) ) {
>       if( $rc < 0 ) {
>         #This is an error condition, should be a warning or something?
>         $factory->remove_rid($rid);
>       }
>       print STDERR "." if ( $v > 0 );
>       sleep 5;
>     } else {
>       print "Parsing $rid\n";
>       my $filename = parseBlastObject($rc);
>       $factory->save_output($rid, $filename);
>       $factory->remove_rid($rid); 
>     }
>   }
> }
> $factory->DESTROY;
> 
> Mathieu Wiepert
> Medical Information Resources
> Mayo Foundation
> (507) 266-2317 Fax (507)-284-0360
> wiepert.mathieu@mayo.edu 
> 
> 
> 

----------------------------
Damien Mattei
C.N.R.S / U.N.S.A - UMR 6549
mailto:mattei@unice.fr
http://www-iag.unice.fr/
----------------------------