[BioC] postForm in RCurl

Duncan Temple Lang duncan at wald.ucdavis.edu
Wed Oct 12 19:49:34 CEST 2011


Hi Ovokeraye

  Your script is  okay. It works for me.
Somehow the communication between the server and RCurl
fell apart at some point.
You should try it again now and see if it works now.
Otherwise, are you behind some sort of firewall? proxy? etc.?

While your query works, it gives no results in the table.

I simplified the query to just one disease.

 data = postForm("http://www.genome.gov/GWAStudies/#searchForm",
                   disease = c("Fasting glucose-related traits"),
                   submit = "Search")

 tbl = readHTMLTable(htmlParse(data, asText = TRUE), which = 5, header = TRUE)

and tbl contains the result.

  D.

On 10/12/11 4:26 AM, Ovokeraye Achinike-Oduaran wrote:
> Hi all,
> 
> I was trying to retrieve some information from the GWAS catalog using
> the postForm() function. I get an error (below the script). I can't
> seem to figure out where I went wrong in my script. Please help.
> 
> -Avoks
> 
>>  data = postForm("http://www.genome.gov/GWAStudies/#searchForm",
> + disease = c("Fasting glucose-related traits",
> + "Fasting insulin-related traits",
> + "Fasting plasma glucose",
> + "Insulin resistance/response",
> + "Insulin traits",
> + "Type 2 diabetes",
> + "Type 2 diabetes and 6 quantitative traits",
> + "Type 2 diabetes and other traits"),
> + submit = "Search")
> 
> Error in postForm("http://www.genome.gov/GWAStudies/#searchForm",
> disease = c("Fasting glucose-related traits",  :
>   Failure when receiving data from the peer
> 
>> sessionInfo()
> R version 2.13.2 (2011-09-30)
> Platform: i386-pc-mingw32/i386 (32-bit)
> 
> locale:
> [1] LC_COLLATE=English_xxx  LC_CTYPE=English_xxx
> [3] LC_MONETARY=English_xxx LC_NUMERIC=C
> [5] LC_TIME=English_xxx
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> other attached packages:
> [1] RCurl_1.6-10.1  bitops_1.0-4.1  puma_2.4.0      mclust_3.4.10
> [5] affy_1.30.0     limma_3.8.3     GEOquery_2.19.4 Biobase_2.12.2
> 
> loaded via a namespace (and not attached):
> [1] affyio_1.20.0         preprocessCore_1.14.0 tools_2.13.2
> [4] XML_3.4-2.2
> 
> _______________________________________________
> 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



More information about the Bioconductor mailing list