[Bioperl-l] How to set proxy information in getGenBank.pl?

Wei Yichun ycwei@mail.ustc.edu.cn
Fri, 2 Aug 2002 08:49:54 +0800 (CST)


Hi all,

Sorry for asking this twice.

I am a newbie behind a firewall and have to use bioperl
through that firewall. But I can not figure out how to
set it in bioperl scripts.

Jason Stajich said that all the modules which make internet connections
either use LWP or a bioperl internal module to connect which has built in
proxy capabilities. It seems that Bio::DB::WebDBSeqI uses LWP. But there is
 some problem.

I wonder whether the LWP support in Bio::DB::WebDBSeqI
really work. As the doc of Bio::DB::WebDBSeqI saying, I
modified the examples/getGenBank.pl as the following:

...
use Bio::DB::GenBank;
use Bio::SeqIO;

my $gb = new Bio::DB::GenBank;
# $gb->proxy(['http'.'ftp'],'http://xx.xx.xx.xx:8080');
# or
$gb->ua->proxy(['http'.'ftp'], 'http://xx.xx.xx.xx:8080');
# or $gb->proxy(['http'.'ftp'],'http://usrname:passwd@xx.xx.xx.xx:8080');
...

But it did not work at all.

The error message is presented here:
[eacheon@neuro examples]$ perl getGenBank.pl
-------------------- WARNING ---------------------
MSG: 500 (Internal Server Error) Can't connect to www.ncbi.nlm.nih.gov:80
(Timeout)
Client-Date: Sun, 28 Jul 2002 11:02:45 GMT



---------------------------------------------------
------------- EXCEPTION  -------------
MSG: WebDBSeqI Request Error

STACK Bio::DB::WebDBSeqI::_request
/usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBSeqI.pm:523
STACK Bio::DB::WebDBSeqI::get_seq_stream
/usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBSeqI.pm:375
STACK Bio::DB::WebDBSeqI::get_Stream_by_id
/usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBSeqI.pm:237
STACK Bio::DB::WebDBSeqI::get_Seq_by_id
/usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBSeqI.pm:143
STACK toplevel getGenBank.pl:25

--------------------------------------

I tried a long time, but still could not establish the connection with
GenBank. Is there anyone can help me?