[Bioperl-l] starter..help run the first script

Chris Fields cjfields at uiuc.edu
Thu Aug 17 16:10:33 UTC 2006


If you set up environmental variables for your web proxy it should work.
This is one of the areas with BioPerl that really needs further testing:

http://www.bioperl.org/wiki/Project_priority_list#Test_and_fix_Bioperl.27s_u
se_of_proxies

There is also this from the INSTALL file and the wiki:

"HTTP_PROXY 	: If you access the internet via a proxy server then you can
tell the Bioperl modules which require network access about this by using
the HTTP_PROXY environment variable. The value set includes the proxy
address and the port used (e.g. http://www.cache.example.com:8080)."

If the module uses LWP, there is an additional problem (from perldoc
LWP::UserAgent):

"On systems with case insensitive environment variables there exists a name
clash between the CGI environment variables and the HTTP_PROXY environment
variable normally picked up by env_proxy(). Because of this HTTP_PROXY is
not honored for CGI scripts. The CGI_HTTP_PROXY environment variable can be
used instead." 

So try CGI_HTTP_PROXY if HTTP_PROXY doesn't work.   Don't know what system
you are using (Win or Linux) so really can't make a determination which
would be best for both.

Let us know how it works out!

Chris

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Reena Yadav
> Sent: Thursday, August 17, 2006 2:01 AM
> Cc: bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] starter..help run the first script
> 
> Hi I am a novice and am seriously starting today.
> I tried the following script, put in a text editor and saved it as  .pl as
> ext.
> Internet is connected, Web proxy is set. But is not recognised by the
> script.
> Could someone walk me through how exactly to write, save, and run the
> script
> in Linux or win, preferably linux.
> Reena Yadav
> SCRIPT
> ----------
> #!/usr/bin/perl -w
> use Bio::Perl;
> 
> # this script will only work if you have an internet connection on the
> # computer you're using, the databases you can get sequences from
> # are 'swiss', 'genbank', 'genpept', 'embl', and 'refseq'
> 
> $seq_object = get_sequence('swiss',"ROA1_HUMAN");
> 
> write_sequence(">roa1.fasta",'fasta',$seq_object);
> 
> REPLY ON THE PAGE
> ------------------------
> 
> ------------- EXCEPTION  -------------
> MSG: WebDBSeqI Request Error:
> HTTP/1.1 403 Forbidden
> Connection: close
> Date: Thursday, 17-Aug-06 06:31:28 GMT
> Server: Web_Proxy
> Content-Type: text/html
> Expires: Thursday, 17-Aug-06 06:31:28 GMT
> Client-Date: Thu, 17 Aug 2006 12:01:10 GMT
> Client-Peer: 193.62.197.151:80
> Client-Response-Num: 1
> Title: Web Proxy
> 
> <HTML>
> <TITLE>Web Proxy</TITLE>
> <HR>
> <H1>Web Proxy</H1>
> <HR>
> 
> <H3>This site is protected by firewall 126.
> [ryadav at inbgsc0125 ~/ry_files]$ perl bt2.pl
> Name "main::sequence_as_a_string" used only once: possible typo at
> bt2.plline 22.
> Use of uninitialized value in concatenation (.) or string at
> /usr/lib/perl5/site_perl/5.8.5/Bio/Perl.pm line 169.
> read_sequence() - usage incorrect at
> /usr/lib/perl5/site_perl/5.8.5/Bio/Perl.pm line 168
>         Bio::Perl::read_sequence('undef') called at bt2.pl line 5
> [ryadav at inbgsc0125 ~/ry_files]$ perl bt1.pl
> 
> ------------- EXCEPTION  -------------
> MSG: WebDBSeqI Request Error:
> HTTP/1.1 403 Forbidden
> Connection: close
> Date: Thursday, 17-Aug-06 06:43:03 GMT
> Server: Web_Proxy
> Content-Type: text/html
> Expires: Thursday, 17-Aug-06 06:43:03 GMT
> Client-Date: Thu, 17 Aug 2006 12:12:45 GMT
> Client-Peer: 193.62.197.151:80
> Client-Response-Num: 1
> Title: Web Proxy
> 
> <HTML>
> <TITLE>Web Proxy</TITLE>
> <HR>
> <H1>Web Proxy</H1>
> <HR>
> 
> <H3>This site is protected by firewall 126.
> All requests are screened and logged.</H3><P>
> 
> <H2>You are not permitted to access the requested URL
> http://www.ebi.ac.uk/cgi-bin/dbfetch.</H2><P>
> 
> <HR>
> <center>
> <H4>For further information contact:
> <ADDRESS>TP&amp;S Firewall
> Admin, Wilmington</ADDRESS></H4>
> </center>
> </HTML>
> 
> STACK Bio::DB::WebDBSeqI::_stream_request
> /usr/lib/perl5/site_perl/5.8.5/Bio/DB/WebDBSeqI.pm:728
> STACK Bio::DB::WebDBSeqI::get_seq_stream
> /usr/lib/perl5/site_perl/5.8.5/Bio/DB/WebDBSeqI.pm:460
> STACK Bio::DB::WebDBSeqI::get_Stream_by_id
> /usr/lib/perl5/site_perl/5.8.5/Bio/DB/WebDBSeqI.pm:287
> STACK Bio::DB::WebDBSeqI::get_Seq_by_id
> /usr/lib/perl5/site_perl/5.8.5/Bio/DB/WebDBSeqI.pm:153
> STACK Bio::Perl::get_sequence
> /usr/lib/perl5/site_perl/5.8.5/Bio/Perl.pm:511
> STACK toplevel bt1.pl:8
> 
> --------------------------------------
> 
> -------------------- WARNING ---------------------
> MSG: id (ROA1_HUMAN) does not exist
> ---------------------------------------------------
> Use of uninitialized value in length at
> /usr/lib/perl5/site_perl/5.8.5/Bio/Perl.pm line 271.
> Use of uninitialized value in concatenation (.) or string at
> /usr/lib/perl5/site_perl/5.8.5/Bio/Perl.pm line 283.
> You have a non object [] passed to write_sequence. It maybe that you want
> to
> use new_sequence to make this string into a sequence object? at
> /usr/lib/perl5/site_perl/5.8.5/Bio/Perl.pm line 283
>         Bio::Perl::write_sequence('>roa1.fasta', 'fasta', 'undef') called
> at
> bt1.pl line 10
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list