[Bioperl-l] Bio::DB::GenBank and proxy

William Kenworthy billk at iinet.net.au
Tue Aug 12 10:38:52 EDT 2003


ach! - typo when I changed the files.  Also works normally if I elect
not to go through the proxy ('unset http_proxy').

Thanks, also for the hint about squid, will keep looking at that.

BillK

On Tue, 2003-08-12 at 21:24, simon andrews (BI) wrote:
> > -----Original Message-----
> > From: William Kenworthy [mailto:billk at iinet.net.au] 
> > Sent: 12 August 2003 12:51
> > To: simon andrews (BI)
> > Cc: BioPerl List
> > Subject: RE: [Bioperl-l] Bio::DB::GenBank and proxy
> > 
> > 
> > Unfortunately, this didn't work for me:
> > 
> > declare -x http_proxy="http://localhost:8081"
> > wdk at rattus tmp $ ./t.pl
> > Attempt to bless into a reference at 
> > /usr/lib/perl5/site_perl/5.8.0/LWP/UserAgent.pm line 221. 
> > wdk at rattus tmp $ 
> 
> I take it this is after you'd made the changes I put in my bug report?  I can't really diagnose this as I think I have a different version of UserAgent.pm to you.  Line 221 in mine sets up a cookie jar, which doesn't sound right.
> 
> When you changed the two bioperl modules were the lines you altered already calls to the new method of LWP::UserAgent?  The line numbers reported may only be correct for the 1.2 release of bioperl.
> 
> Can you run this small prog and see what you get (please unwrap the long line on the get call).
> 
> #!/usr/bin/perl -w
> use strict;
> use LWP::UserAgent;
> 
> my $ua = LWP::UserAgent -> new (env_proxy => 1,
> 				keep_alive => 1,
> 				timeout => 30);
> 
> my $response = $ua -> get('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?retmode=text&rettype=gb&db=nucleotide&tool=bioperl&id=gb%7CAL022723&usehistory=n');
> 
> my $text = $response -> as_string;
> 
> print substr($text,0,1000) , "\n";
> #################################################################
> 
> You should hopefully get something like this:
> 
> #####################
> HTTP/1.0 200 OK
> Date: Tue, 12 Aug 2003 13:16:55 GMT
> Via: 1.1 eutils.ncbi.nih.gov
> Server: Apache
> Content-Type: text/plain
> Client-Date: Tue, 12 Aug 2003 19:17:13 GMT
> Client-Response-Num: 1
> Proxy-Connection: close
> X-Cache: MISS from eutils.ncbi.nih.gov
> X-Cache: MISS from BBSRC-wwwcache-service
> 
> LOCUS       HS377H14              148834 bp    DNA     linear   PRI 14-SEP-2001
> DEFINITION  Human DNA sequence from clone RP3-377H14 on chromosome
>             6p21.32-22.1. Contains the HLA-G gene for major [andrewss at bilin2 Test]$ ./uatest.pl
> HTTP/1.0 200 OK
> Date: Tue, 12 Aug 2003 13:17:13 GMT
> Via: 1.1 eutils.ncbi.nih.gov
> Server: Apache
> Content-Type: text/plain
> Client-Date: Tue, 12 Aug 2003 19:17:32 GMT
> Client-Response-Num: 1
> Proxy-Connection: close
> X-Cache: MISS from eutils.ncbi.nih.gov
> X-Cache: MISS from BBSRC-wwwcache-service
> 
> LOCUS       HS377H14              148834 bp    DNA     linear   PRI 14-SEP-2001
> DEFINITION  Human DNA sequence from clone RP3-377H14 on chromosome
>             6p21.32-22.1. Contains the HLA-G gene for major histocompatibility
>             complex class I G (HLA 6.0) an MHC class I pseudogene, an RPL7A
>             (60S Ribosomal Protein L7A) pseudogene, a gene for a novel MHC
>             class 1 protein, an interferon-inducible protein 1-8U pseudogene,
>             an RPL23A (60S Ribosomal Protein L23A) pseudogene, an HCGIX
>             pseudogene, an MICB or PERB11.1 pseudogene,the HLA-F gene for major
>             histocompatibility complex class I F (CDA12), and four P5-1
>             pseudogenes. Con
> #####################
> 
> If this works can you go back and check the amendments you made to the two bioperl scripts as this is all they are doing.  If it still fails then its not a bioperl problem as such, but we can still try to track it down.
> 
>  
> > Noticed another thing: the cache (squid in my case) always 
> > reports a "miss", and fetches direct.
> 
> That's probably right.  Since you're fetching potentially dynamic content (albeit through a GET request) you may find that squid refuses to cache it and will refetch it every time.  Have a look in the squid documentation and there may be some way to tell it that it should cache dynamic GET requests as well.
> 
> Hope this helps
> 
> Simon.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
-- 
William Kenworthy <billk at iinet.net.au>



More information about the Bioperl-l mailing list