Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastien Moretti
ProtoGene
Commits
3e6693f4
Commit
3e6693f4
authored
Jun 30, 2016
by
Sebastien Moretti
Browse files
Use https for NCBI blast queries
parent
dc701484
Changes
1
Show whitespace changes
Inline
Side-by-side
webblast.pl
View file @
3e6693f4
...
...
@@ -436,7 +436,7 @@ 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://blast.ncbi.nlm.nih.gov/Blast.cgi
';
my
(
$req
)
=
new
HTTP::
Request
POST
=>
'
http
s
://blast.ncbi.nlm.nih.gov/Blast.cgi
';
$req
->
content_type
('
application/x-www-form-urlencoded
');
$req
->
content
(
$arguments
);
...
...
@@ -468,7 +468,7 @@ sub WEB_BLAST {
}
$req
=
new
HTTP::
Request
GET
=>
"
http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=
$rid
";
"
http
s
://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=
$rid
";
$response
=
$ua
->
request
(
$req
);
if
(
$response
->
content
=~
/Status=WAITING/im
){
next
;
...
...
@@ -494,7 +494,7 @@ sub WEB_BLAST {
}
}
elsif
(
$response
->
content
=~
/can\'t connect/im
){
print
{
*STDERR
}
"
\n
Can't connect to blast.ncbi.nlm.nih.gov
:80
...new attempt
";
print
{
*STDERR
}
"
\n
Can't connect to blast.ncbi.nlm.nih.gov...
new attempt
";
if
(
$nb
<
3
){
++
$nb
;
next
;
...
...
@@ -521,7 +521,7 @@ sub WEB_BLAST {
while
(){
sleep
3
;
$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
";
$req
=
new
HTTP::
Request
GET
=>
"
http
s
://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
"
Search Complete
\n
";
push
(
@list_pdb
,
$response
->
content
);
last
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment