[BioC] biomaRt proxy issues
Raynor, Bill
Bill.Raynor at kcc.com
Wed May 28 22:45:40 CEST 2014
Jim,
Yes and No, the code failed on the useMart statement, which attempts to establish a connection through the firewall.
However, a google search on "RCurl Proxy authentication" turned up a passing mention to "RCurlOptions", which led me into the RCurl docs, where it is revealed that RCurl will look at that option automatically.
So this works:
options(RCurlOptions = list(proxy="uscache.kcc.com:80",proxyuserpwd="------:-------"))
# getOption("RCurlOptions") # just checking
getURLContent("http://www.omegahat.org")
mart <- useMart("ensembl","hsapiens_gene_ensembl")
Regards,
Bill
-----Original Message-----
From: James W. MacDonald [mailto:jmacdon at uw.edu]
Sent: Friday, May 23, 2014 1:28 PM
To: Bill Raynor [guest]
Cc: bioconductor at r-project.org; Raynor, Bill
Subject: Re: [BioC] biomaRt proxy issues
Hi Bill,
I am not sure you need to pass anything to listMarts() unless you aren't sure what mart to use. It seems to me that the critical function would be getBM() to which you can pass an already formed curl object.
Can you do something like this?
mart <- useMart("ensembl","hsapiens_gene_ensembl")
curl <- getCurlHandle()
curlSetOpt(.opts =
list(proxy="xxx.yyy.com:8080",proxyuserpwd="myid:mypassword"),curl = curl)
getBM(c("entrezgene","uniprot_genename"), "entrezgene", c(1,10,100,1000), mart, curl)
Best,
Jim
On 5/23/2014 12:00 PM, Bill Raynor [guest] wrote:
> biomart does not seem to honor the http_proxy and http_proxy_user settings. How can I pass Rcurl options into it.
>
> if I debug(listMart) and step through the function, it is attempting to request "http://www.biomart.org:80/biomart/martservice?type=registry&requestid=biomaRt", however bmRequest returns the error page from our proxy.
>
> if I do a
> curl = getCurlHandle()
> curlSetOpt( .opts = list(proxy="xxx.yyy.com:8080",proxyuserpwd="myid:mypassword"),curl = curl)
> getURL("http://www.biomart.org/biomart/martservice?type=registry&requestid=biomaRt", curl=curl)
>
> I get the same output that I would get via internet explorer.
>
> So how do I get biomaRt to work through a proxy that requires authentication?
>
>
>
> -- output of sessionInfo():
>
>> sessionInfo()
> R version 3.1.0 (2014-04-10)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] grDevices datasets splines graphics utils grid stats methods base
>
> other attached packages:
> [1] biomaRt_2.20.0 RCurl_1.95-4.1 bitops_1.0-6 graph_1.42.0 R2HTML_2.2.1 Hmisc_3.14-4
> [7] Formula_1.1-1 survival_2.37-7 lattice_0.20-29 foreign_0.8-61 ggplot2_1.0.0
>
> loaded via a namespace (and not attached):
> [1] AnnotationDbi_1.26.0 Biobase_2.24.0 BiocGenerics_0.10.0 cluster_1.15.2 colorspace_1.2-4
> [6] DBI_0.2-7 digest_0.6.4 GenomeInfoDb_1.0.2 gtable_0.1.2 IRanges_1.22.7
> [11] latticeExtra_0.6-26 MASS_7.3-33 munsell_0.4.2 parallel_3.1.0 plyr_1.8.1
> [16] proto_0.3-10 RColorBrewer_1.0-5 Rcpp_0.11.1 reshape2_1.4 RSQLite_0.11.4
> [21] scales_0.2.4 stats4_3.1.0 stringr_0.6.2 tools_3.1.0 XML_3.98-1.1
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099
________________________________
This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law. If you have received this message in error, please inform us promptly by reply e-mail, then delete the e-mail and destroy any printed copy. Thank you.
More information about the Bioconductor
mailing list