Thanks both, to explain me the rules of questioning and for solving my problem.
I'd like to perform a blastn on the NCBI servers using Bio :: Tools :: Run :: RemoteBlast. No problem to configure "standard" parameters as defined here.
My problem is with more exotic setting such as opening penalty, gap extension penalty fee of mismatch, declared by the parameters -E,-w,-G,-q when I do local blast analysis.
Do you have an idea or a link with a solution for me?
2 answers
From looking at the documentation, it looks like the correct way to do this is with the "submit_parameter" function. For example (untested):
my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
$factory->submit_parameter('word_size', 11);
my $r = $factory->submit_blast($input);
Available parameters, from the source, are:
our %PUTPARAMS = (
'AUTO_FORMAT' => '(Off|(Semi|Full)auto)', # Off, Semiauto, Fullauto
'COMPOSITION_BASED_STATISTICS' => '(0|1)', # yes, no on NCBI's site, but actually binary 0/1
'DATABASE' => '.*',
'DB_GENETIC_CODE' => '([1-9]|1[1-6]|2(1|2))', # 1..16,21,22
'DISPLAY_SORT' => '\d',
'ENDPOINTS' => '(yes|no)', # yes,no
'ENTREZ_QUERY' => '.*',
'EXPECT' => '\d+(\.\d+)?([eE]-\d+)?', # Positive double
'FILTER' => '[LRm]', # L or R or m
'GAPCOSTS' => '-?\d+(\.\d+)\s+-?\d+(\.\d+)',
# Two space separated float values
'GENETIC_CODE' => '([1-9]|1[1-6]|2(1|2))', # 1..16,21,22
'HITLIST_SIZE' => '\d+', # Positive integer
'I_THRESH' => '-?\d+(\.\d+)([eE]-\d+)?', # float
'LAYOUT' => '(One|Two)Windows?', # onewindow, twowindows
'LCASE_MASK' => '(yes|no)', # yes, no
'MATRIX_NAME' => '.*',
'NUCL_PENALTY' => '-\d+', # Negative integer
'NUCL_REWARD' => '-?\d+', # Integer
'OTHER_ADVANCED' => '.*',
'PERC_IDENT' => '\d\d+', # Integer, 0-99 inclusive
'PHI_PATTERN' => '.*',
'PROGRAM' => 't?blast[pnx]',
# tblastp, tblastn, tblastx, blastp, blastn, blastx
'QUERY' => '.*',
'QUERY_FILE' => '.*',
'QUERY_BELIEVE_DEFLINE' => '(yes|no)', # yes, no
'QUERY_FROM' => '\d+', # Positive integer
'QUERY_TO' => '\d+', # Positive integer
'SEARCHSP_EFF' => '\d+', # Positive integer
'SERVICE' => '(plain|p[sh]i|(rps|mega)blast)',
# plain,psi,phi,rpsblast,megablast
'SHORT_QUERY_ADJUST' => '(true|false)',
'THRESHOLD' => '-?\d+', # Integer
'UNGAPPED_ALIGNMENT' => '(yes|no)', # yes, no
'WORD_SIZE' => '\d+' # Positive integer
);
Thanks Niek for reply.
I don't manage to find how to change the parameters for gap opening/extension and mismatch penality.
my $prog = 'blastn';
my $db = 'nr';
my $e_val= '1e-10';
my $v = 1;
my @params = (
'-prog' => $prog,
'-data' => $db,
'-expect' => $e_val,
'-readmethod' => 'SearchIO');
my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
my $seq_blast = Bio::SeqIO ->new (-file =>$fasta_interet, -format =>'fasta');
while (my $input = $seq_blast -> next_seq()){
my $r = $factory->submit_blast($input);
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();
my $filename = "out_remote.blast";
$factory->save_output($filename);
$factory->remove_rid($rid);
}
}
}
}
You should not answer your own questions with updates. Instead, you should update your original question and put this information in there. That makes it easier for other people to understand what your problem is, which will get you an answer faster.
Log in to answer this question.
Can you update your question with what the problem is you're having with them?