Bio::T...eBlast(3pm)
๐ Bio::Tools::Run::RemoteBlast ๐
okay bestie, buckle up โ this is the Bio::Tools::Run::RemoteBlast page, straight outta the User Contributed Perl Documentation collection. it's giving "run NCBI BLAST from really far away and pretend it's local." no cap. โจ
๐ธ NAME ๐ธ
Bio::Tools::Run::RemoteBlast โ an object for remote execution of the NCBI Blast via HTTP ๐ฆ
โจ SYNOPSIS โจ
not me dropping the whole example on you, but it's literally all here, so read it, it's important iykyk
#Remote-blast "factory object" creation and blast-parameter initialization
use Bio::Tools::Run::RemoteBlast;
use strict;
my $prog = 'blastp';
my $db = 'swissprot';
my $e_val= '1e-10';
my @params = ( '-prog' => $prog,
'-data' => $db,
'-expect' => $e_val,
'-readmethod' => 'SearchIO' );
my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
#change a query parameter
$Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'} = 'Homo sapiens [ORGN]';
#change a retrieval parameter
$Bio::Tools::Run::RemoteBlast::RETRIEVALHEADER{'DESCRIPTIONS'} = 1000;
#remove a parameter
delete $Bio::Tools::Run::RemoteBlast::HEADER{'FILTER'};
#$v is just to turn on and off the messages
my $v = 1;
my $str = Bio::SeqIO->new(-file=>'amino.fa' , -format => 'fasta' );
#optional: send BLAST request to a cloud service provider instead of NCBI
#$factory->set_url_base("http://host.my.cloud.service.provider.com/cgi-bin/blast.cgi");
while (my $input = $str->next_seq()){
#Blast a sequence against a database:
#Alternatively, you could pass in a file with many
#sequences rather than loop through sequence one at a time
#Remove the loop starting 'while (my $input = $str->next_seq())'
#and swap the two lines below for an example of that.
my $r = $factory->submit_blast($input);
#my $r = $factory->submit_blast('amino.fa');
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 ) {
$factory->remove_rid($rid);
}
print STDERR "." if ( $v > 0 );
sleep 5;
} else {
my $result = $rc->next_result();
#save the output
my $filename = $result->query_name()."\.out";
$factory->save_output($filename);
$factory->remove_rid($rid);
print "\nQuery Name: ", $result->query_name(), "\n";
while ( my $hit = $result->next_hit ) {
next unless ( $v > 0);
print "\thit name is ", $hit->name, "\n";
while( my $hsp = $hit->next_hsp ) {
print "\t\tscore is ", $hsp->score, "\n";
}
}
}
}
}
}
# This example shows how to change a CGI parameter:
$Bio::Tools::Run::RemoteBlast::HEADER{'MATRIX_NAME'} = 'BLOSUM45';
$Bio::Tools::Run::RemoteBlast::HEADER{'GAPCOSTS'} = '15 2';
# And this is how to delete a CGI parameter:
delete $Bio::Tools::Run::RemoteBlast::HEADER{'FILTER'};
๐ DESCRIPTION ๐
Class for remote execution of the NCBI Blast via HTTP. ๐
if you wanna know about the many CGI parameters, the receipts are right here:
https://www.ncbi.nlm.nih.gov/BLAST/Doc/urlapi.html
also, various additional options and input formats are available. obsessed. ๐
๐ซถ FEEDBACK ๐ซถ
๐ Mailing Lists
okay so user feedback is an integral part of the evolution of this module and all the other Bioperl modules. send your comments and suggestions preferably to one of the Bioperl mailing lists. your participation is much appreciated. fr fr. ๐ฅน
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
๐ฉน Support
pls pls pls direct your usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
...and NOT to the module maintainer directly, bestie. there are tons of experienced and responsive experts on there who can look at the problem and address it fast. if at all possible, include a thorough description of the problem with code and data examples. give them the whole story, not just the vibe. ๐
๐ Reporting Bugs
report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution. bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
๐ AUTHOR ๐
please do NOT contact Jason directly about this module. post to the bioperl mailing list instead (see FEEDBACK up there โฌ๏ธ). and if you'd like to be the official maintainer of this module?? volunteer on the list and it will be made official in this POD. main character energy, honestly. ๐
first written by Jason Stajich, and many others have helped keep it running. ๐
๐ฎ APPENDIX ๐ฎ
the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ โ iykyk. ๐ฆ
๐ retrieve_parameter
- Title :
retrieve_parameter - Usage :
my $db = $self->retrieve_parameter - Function: Get/Set the named parameter for the
retrieve_blastoperation. - Returns : string
- Args :
$name: name of GET parameter$val: optional value to set the parameter to
๐ submit_parameter
- Title :
submit_parameter - Usage :
my $db = $self->submit_parameter - Function: Get/Set the named parameter for the
submit_blastoperation. - Returns : string
- Args :
$name: name of PUT parameter$val: optional value to set the parameter to
๐ header
- Title :
header - Usage :
my $header = $self->header - Function: Get HTTP header for blast query
- Returns : string
- Args : none
๐ readmethod
- Title :
readmethod - Usage :
my $readmethod = $self->readmethod - Function: Get/Set the method to read the blast report
- Returns : string
- Args : string [
blast,blasttable,xml]
๐ program
- Title :
program - Usage :
my $prog = $self->program - Function: Get/Set the program to run. Retained for backwards-compatibility.
- Returns : string
- Args : string [
blastp,blastn,blastx,tblastn,tblastx]
๐ database
- Title :
database - Usage :
my $db = $self->database - Function: Get/Set the database to search. Retained for backwards-compatibility.
- Returns : string
- Args : string [
swissprot,nr,nt,etc...]
๐ expect
- Title :
expect - Usage :
my $expect = $self->expect - Function: Get/Set the E value cutoff. Retained for backwards-compatibility.
- Returns : string
- Args : string [
'1e-4']
๐ ua
- Title :
ua - Usage :
my $ua = $self->uaor$self->ua($ua) - Function: Get/Set a
LWP::UserAgentfor use - Returns : reference to
LWP::UserAgentObject - Args : none
- Comments: Will create a UserAgent if none has been requested before.
๐ proxy
- Title :
proxy - Usage :
$httpproxy = $db->proxy('http')or$db->proxy(['http','ftp'], 'http://myproxy' ) - Function: Get/Set a proxy for use of proxy
- Returns : a string indicating the proxy
- Args :
$protocol: an array ref of the protocol(s) to set/get$proxyurl: url of the proxy to use for the specified protocol
๐ submit_blast
- Title :
submit_blast - Usage :
$self->submit_blast([$seq1,$seq2]); - Function: Submit blast jobs to ncbi blast queue on sequence(s)
- Returns : Blast report object as defined by
$self->readmethod - Args : input can be:
- sequence object
- array ref of sequence objects
- filename of file containing fasta formatted sequences
๐ retrieve_blast
- Title :
retrieve_blast - Usage :
my $blastreport = $blastfactory->retrieve_blast($rid); - Function: Attempts to retrieve a blast report from remote blast queue
- Returns : scalar int (constant) or
Bio::SearchIOobject Constants:NOT_FINISHED (= 0): 'job not finished'- code on error:
ERR_QBSTATUS (= 1): return line matches 'Status=ERROR'ERR_NOCONTENT (= 2): HTTP request successful, but no content returnedERR_HTTPFAIL (= 4): HTTP request failedERR_QBNONSPEC (= 8): return line matches 'ERROR' (not status line)
- Args : Remote Blast ID (RID)
๐ save_output
- Title :
saveoutput - Usage :
my $saveoutput = $self->save_output($filename) - Function: Method to save the blast report
- Returns :
1(throws error otherwise) - Args : string [
rid,filename]
๐ set_url_base
- Title :
set_url_base - Usage :
$self->set_url_base($url) - Function: Method to override the default URL to access the NCBI BLAST web service
- Returns : None
- Args : string (URL used for remote BLAST searches)
- NOTE : This is highly experimental; we cannot maintain support on web services other than the default NCBI BLAST web service at this time. Only some URL parameters may be supported by other BLAST web services.
๐ get_url_base
- Title :
get_url_base - Usage :
my $url = $self->set_url_base - Function: Get the current URL for BLAST searching
- Returns : string (URL used for remote blast searches)
- Args : None
๐ get_rtoe
- Title :
get_rtoe - Usage :
my $url = $self->rtoe - Function: Retrieve the retrieval time (defined after
submit_blast()) - Returns : number
- Args : None
and that's the whole page, bestie!! ๐ฆโจ๐
this one was brought to you by perl v5.30.0, dated 2020-05-12 โ so yes it's a lil vintage but she still slays ๐
go forth and blast remotely, you got this ๐
๐ฆ where this page comes from
- debian bookworm: libbio-tools-run-remoteblast-perl 1.7.3-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbio-tools-run-remoteblast-perl 1.7.3-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libbio-tools-run-remoteblast-perl 1.7.3-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-tools-run-remoteblast-perl 1.7.3-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbio-tools-run-remoteblast-perl 1.7.3-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbio-tools-run-remoteblast-perl 1.7.3-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms