Error downloading GPL file with getGEO

918 views Asked by At

Using OSX 10.11 and R 3.3.0 I get this error using GEOQuery package:

library(GEOquery)
GSE56045 <- getGEO("GSE56045")

It downloads the GSE file but not the GPL:

Error in download.file(myurl, destfile, mode = mode, quiet = TRUE, method = getOption("download.file.method.GEOquery")) : 
  cannot open URL 'http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?targ=self&acc=GPL10558&form=text&view=full'
1

There are 1 answers

0
leonfrench On BEST ANSWER

It looks like the GPL file was redirected and the download method auto set in GEOquery fails to follow the redirect: setting options('download.file.method.GEOquery'='auto')

I was able to get it working by running this in R: options('download.file.method.GEOquery' = 'libcurl') Also, I had to delete the old downloaded GPL file - which was just the redirect message. It's easier to just set a download directory instead of finding the temp file, using destdir = for the getGEO command.