Commit 5e95af32 authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Update blast ncbi URL

parent 34f43f70
......@@ -100,7 +100,7 @@ sub Html {
my $strain = 0;
if ( $cross_sp && $desc[0] =~ /^([\w\.\-]+)$/ ){
my $spe = $1;
$strain = 1 if ( $spe eq 'sp.' || $spe eq 'strain' );
$strain = 1 if ( $spe eq 'sp.' || $spe eq 'strain' || $spe eq 'ssp.' );
$match .= ' '.$spe;
shift(@desc);
}
......
......@@ -442,7 +442,8 @@ sub WEB_BLAST {
#-- BUILD THE REQUEST
my ($arguments) = "CMD=Put&ENTREZ_QUERY=$orgn&CDD_SEARCH=off&FILTER=$filter&MATRIX_NAME=$matrix&PROGRAM=$program&DATABASE=$database&QUERY=" . $encoded_seq;
my ($req) = new HTTP::Request POST => 'http://www.ncbi.nlm.nih.gov/blast/Blast.cgi';
# my ($req) = new HTTP::Request POST => 'http://www.ncbi.nlm.nih.gov/blast/Blast.cgi'; #old URL
my ($req) = new HTTP::Request POST => 'http://blast.ncbi.nlm.nih.gov/Blast.cgi';
$req -> content_type('application/x-www-form-urlencoded');
$req -> content($arguments);
......@@ -474,7 +475,8 @@ sub WEB_BLAST {
}
$req = new HTTP::Request GET =>
"http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=$rid";
"http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=$rid";
# "http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=$rid"; #old url
$response = $ua->request($req);
if ( $response->content =~ /Status=WAITING/im ){
next;
......@@ -500,7 +502,7 @@ sub WEB_BLAST {
}
}
elsif ( $response->content =~ /can\'t connect/im ){
print {*STDERR} "\nCan't connect to www.ncbi.nlm.nih.gov:80...new attempt";
print {*STDERR} "\nCan't connect to blast.ncbi.nlm.nih.gov:80...new attempt";
if ( $nb <3 ){
++$nb;
next;
......@@ -527,7 +529,8 @@ sub WEB_BLAST {
while (){
sleep 3;
$req = new HTTP::Request GET => "http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Get&FORMAT_TYPE=$format&FILTER=off&EXPECT=$Eval&ALIGNMENTS=$align&DESCRIPTIONS=$align&ALIGNMENT_VIEW=$aln_view&RID=$rid";
# $req = new HTTP::Request GET => "http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Get&FORMAT_TYPE=$format&FILTER=off&EXPECT=$Eval&ALIGNMENTS=$align&DESCRIPTIONS=$align&ALIGNMENT_VIEW=$aln_view&RID=$rid";
$req = new HTTP::Request GET => "http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_TYPE=$format&FILTER=off&EXPECT=$Eval&ALIGNMENTS=$align&DESCRIPTIONS=$align&ALIGNMENT_VIEW=$aln_view&RID=$rid";
$response = $ua -> request($req);
if ($response->content =~ /Altschul/i) { print {*STDERR} "Search Complete\n"; push(@list_pdb,$response -> content);last; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment